跳转到内容

BM_StatusTypeDef 枚举参考

BMAPI 1.14.0.42 · bm_usb_def.h

typedef enum
{
BM_ERROR_OK = 0x00000,
BM_ERROR_XMTFULL = 0x00001,
BM_ERROR_OVERRUN = 0x00002,
BM_ERROR_BUSLIGHT = 0x00004,
BM_ERROR_BUSHEAVY = 0x00008,
BM_ERROR_BUSWARNING = BM_ERROR_BUSHEAVY,
BM_ERROR_BUSPASSIVE = 0x40000,
BM_ERROR_BUSTIMEOUT = 0x80000,
BM_ERROR_BUSOFF = 0x00010,
BM_ERROR_ANYBUSERR = (BM_ERROR_BUSWARNING | BM_ERROR_BUSLIGHT | BM_ERROR_BUSHEAVY | BM_ERROR_BUSOFF | BM_ERROR_BUSPASSIVE),
BM_ERROR_QRCVEMPTY = 0x00020,
BM_ERROR_QOVERRUN = 0x00040,
BM_ERROR_QXMTFULL = 0x00080,
BM_ERROR_REGTEST = 0x00100,
BM_ERROR_NODRIVER = 0x00200,
BM_ERROR_HWINUSE = 0x00400,
BM_ERROR_NETINUSE = 0x00800,
BM_ERROR_ILLHW = 0x01400,
BM_ERROR_ILLNET = 0x01800,
BM_ERROR_ILLCLIENT = 0x01C00,
BM_ERROR_ILLHANDLE = (BM_ERROR_ILLHW | BM_ERROR_ILLNET | BM_ERROR_ILLCLIENT), /* Invalid handle*/
BM_ERROR_RESOURCE = 0x02000,
BM_ERROR_ILLPARAMTYPE = 0x04000,
BM_ERROR_ILLPARAMVAL = 0x08000,
BM_ERROR_UNKNOWN = 0x10000,
BM_ERROR_ILLDATA = 0x20000,
BM_ERROR_CONFIG = 0X1000000,
BM_ERROR_CAUTION = 0x2000000,
BM_ERROR_INITIALIZE = 0x4000000,
BM_ERROR_ILLOPERATION = 0x8000000
} BM_StatusTypeDef;

Busmust device & operation status, most APIs would return a status code to indicate the result of an operation.

名称 值表达式 说明
BM_ERROR_OK 0x00000 SUCCESS: No error occurred
BM_ERROR_XMTFULL 0x00001 Low level Transmit buffer is full
BM_ERROR_OVERRUN 0x00002 Bus overrun (the device cannot keep up with the high bus throughput)
BM_ERROR_BUSLIGHT 0x00004 CAN Bus communication is light, see ISO11898 for details
BM_ERROR_BUSHEAVY 0x00008 CAN Bus communication is heavy, see ISO11898 for details
BM_ERROR_BUSWARNING BM_ERROR_BUSHEAVY CAN Bus communication is in warning state, see ISO11898 for details
BM_ERROR_BUSPASSIVE 0x40000 CAN node is in passive state, see ISO11898 for details
BM_ERROR_BUSTIMEOUT 0x80000 CAN node failed to transmit message within specified time, the node might be in PASSIVE or BUSOFF state
BM_ERROR_BUSOFF 0x00010 CAN bus is in BUSOFF state, see ISO11898 for details
BM_ERROR_ANYBUSERR (BM_ERROR_BUSWARNING | BM_ERROR_BUSLIGHT | BM_ERROR_BUSHEAVY | BM_ERROR_BUSOFF | BM_ERROR_BUSPASSIVE) CAN bus error occurred
BM_ERROR_QRCVEMPTY 0x00020 Receive buffer is empty, this might NOT be an error if you use BMAPI in polling mode
BM_ERROR_QOVERRUN 0x00040 BMAPI internal Q overrun
BM_ERROR_QXMTFULL 0x00080 High level Transmit queue is full
BM_ERROR_REGTEST 0x00100 Reserved
BM_ERROR_NODRIVER 0x00200 Reserved
BM_ERROR_HWINUSE 0x00400 Hardware is in use (opened by another application)
BM_ERROR_NETINUSE 0x00800 Reserved
BM_ERROR_ILLHW 0x01400 Hardware error or invalid hardware version/handle
BM_ERROR_ILLNET 0x01800 Invalid bus
BM_ERROR_ILLCLIENT 0x01C00 Invalid client
BM_ERROR_ILLHANDLE (BM_ERROR_ILLHW | BM_ERROR_ILLNET | BM_ERROR_ILLCLIENT) 原始素材未提供说明。
BM_ERROR_RESOURCE 0x02000 Out of resource
BM_ERROR_ILLPARAMTYPE 0x04000 Invalid parameter type in API call
BM_ERROR_ILLPARAMVAL 0x08000 Invalid parameter value in API call
BM_ERROR_UNKNOWN 0x10000 Unknown error
BM_ERROR_ILLDATA 0x20000 Invalid data received/transmitted
BM_ERROR_CONFIG 0X1000000 Invalid configuration
BM_ERROR_CAUTION 0x2000000 Reserved
BM_ERROR_INITIALIZE 0x4000000 The device/library is not initialized
BM_ERROR_ILLOPERATION 0x8000000 Invalid operation

来源:BMAPI 1.14.0.42 正式 Doxygen 文档。技术说明保留原文;安装包中的头文件和帮助文档定义对应版本的接口契约。