
 
#ifndef __STATUS_CODE_H__
#define __STATUS_CODE_H__

//=================================================================================================
#define MI_OK                           (char)(0)
#define STATUS_SUCCESS                  (char)(0)		// 操作成功

#define STATUS_IO_TIMEOUT               (char)(-1)	// 无应答错误
#define STATUS_CRC_ERROR                (char)(-2)	// CRC校验错误
#define STATUS_PARITY_ERROR             (char)(-3)	// 奇偶校验错误
#define STATUS_BITCOUNT_ERROR           (char)(-4)	// 接收位计数器错误
#define STATUS_FRAMING_ERROR            (char)(-5)	// 帧错误
#define STATUS_COLLISION_ERROR          (char)(-6)	// 位冲突错误
#define STATUS_BUFFER_TOO_SMALL         (char)(-7)	// 缓冲区过小
#define STATUS_ACCESS_DENIED            (char)(-8)	// 写禁止
#define STATUS_BUFFER_OVERFLOW         (char) (-9)	// BUF溢出错误
#define STATUS_PROTOCOL_ERROR          (char) (-10)   // 通信协议有误
#define STATUS_ERROR_NY_IMPLEMENTED    (char) (-11)   // 未执行
#define STATUS_FIFO_WRITE_ERROR        (char) (-12)	// FIFO写错误
#define STATUS_USERBUFFER_FULL         (char) (-13)   // 用户缓冲区满
#define STATUS_INVALID_PARAMETER       (char) (-14)   // 参数错误
#define STATUS_UNSUPPORTED_PARAMETER    (char)(-15)   // 无效参数
#define STATUS_UNSUPPORTED_COMMAND      (char)(-16)   // 无效命令
#define STATUS_INTERFACE_ERROR         (char) (-17)   // 主机接口错误
#define STATUS_INVALID_FORMAT          (char) (-18)   // 无效格式
#define STATUS_INTERFACE_NOT_ENABLED    (char)(-19)   // 接口未激活
#define STATUS_AUTHENT_ERROR            (char)(-20)   // 验证错误
#define STATUS_ACK_SUPPOSED             (char)(-21)   // NACK
#define STATUS_BLOCKNR_NOT_EQUAL       (char) (-22)   // 通信块错误



#define STATUS_TARGET_DEADLOCKED       (char) (-23)   // 目标死锁
#define STATUS_TARGET_SET_TOX         (char)  (-24)   // 目标发送草食
#define STATUS_TARGET_RESET_TOX       (char)  (-25)  
#define STATUS_WRONG_UID_CHECKBYTE    (char)  (-26)   // 目标UID检测错误
#define STATUS_WRONG_HALT_FORMAT      (char)  (-27)	// 挂起格式错误

#define STATUS_ID_ALREADY_IN_USE       (char) (-28)   // ID已被使用
#define STATUS_INSTANCE_ALREADY_IN_USE (char) (-29)   // INSTANCE 已被使用
#define STATUS_ID_NOT_IN_USE          (char)  (-30)   // 指定的ID不存在
#define STATUS_NO_ID_AVAILABLE         (char) (-31)   // 无空闲ID可用

#define STATUS_OTHER_ERROR              (char)(-32)	// 其他错误
#define STATUS_INSUFFICIENT_RESOURCES   (char)(-33)   // 系统资源不足
#define STATUS_INVALID_DEVICE_STATE    (char) (-34)   // 驱动错误
#define STATUS_TEMP_ERROR        	    (char)(-35)   // 温度有误

#define STATUS_INIT_ERROR				(char)(-36)   // 初始化错误
#define STATUS_NOBITWISEANTICOLL	(char)	(-37)
#define STATUS_SERNR_ERROR				(char)(-38)
#define STATUS_NY_IMPLEMENTED			(char)(-39)
#define STATUS_ACCESS_TIMEOUT			(char)(-40)

#define STATUS_ATS_ERROR			    (char)(-50)   // ATS错误
#define STATUS_PPSS_ERROR  			    (char)(-51)   // PPSS错误
#define STATUS_BLOCK_FORMAT_ERROR       (char)(-52)   // 分组帧格式错误 
#define STATUS_CID_ERROR  			    (char)(-53)   // PPSS错误      
//=======================================================================================
#endif          // __STATUS_CODE_H__

