📄 ab_stat.h
字号:
/****************************************************************************
*****************************************************************************
**
** File Name
** ---------
**
** AB_STAT.H
**
*****************************************************************************
*****************************************************************************
**
** Description
** -----------
**
** Common status codes for the ControlNet example code.
** User defined status codes are defined in the file ABU_STAT.H.
**
*****************************************************************************
*****************************************************************************
**
** Source Change Indices
** ---------------------
**
** Porting: <none>0----<major> Customization: <none>0----<major>
**
*****************************************************************************
*****************************************************************************
** **
** ETHERNET/IP EXAMPLE CODE **
** COPYRIGHT (c) 2000-2005 ODVA (Open DeviceNet Vendor Association) **
** & ControlNet International Ltd. **
** **
** All rights reserved, except as specifically licensed in writing. **
** Use of the Ethernet/IP Example Protocol Software is subject to **
** ODVA's and ControlNet International's Terms of Use Agreement. **
** The following work constitutes example program code and is intended **
** merely to illustrate useful programming techniques. The user is **
** responsible for applying the code correctly. The code is provided **
** AS IS without warranty and is in no way guaranteed to be error-free. **
** **
*****************************************************************************
*****************************************************************************
*/
/****************************************************************************
*****************************************************************************
**
** Change Log
** ----------
**
**
*****************************************************************************
*****************************************************************************
*/
/*
** The status codes are defined via 1 macro:
**
** STATUS_S defines a status code (and it's matching text string)
** with a specific number.
**
** STATUS_S has 3 parameters:
** Status code name,
** Status code number,
** Status code text string.
**
** The status code range 0x0000 - 0x1FFF is reserved for example code use.
** The status code range 0x2000 - 0x7FFE is available for application use.
**
** Specific example code ranges:
**
** 0x0000 - 0x00FF = General use codes
** 0x0100 - 0x017F = BF
** 0x0180 - 0x01FF = CA
** 0x0200 - 0x027F = CACW
** 0x0280 - 0x02FF = CAEQ
** 0x0300 - 0x037F = CB
** 0x0380 - 0x03FF = CC
** 0x0400 - 0x047F = CD
** 0x0480 - 0x04FF = CM
** 0x0500 - 0x057F = CN
** 0x0580 - 0x05FF = CS
** 0x0600 - 0x067F = DB
** 0x0680 - 0x06FF = EA
** 0x0700 - 0x077F = GS
** 0x0780 - 0x07FF = ID
** 0x0800 - 0x087F = KP
** 0x0880 - 0x08FF = MR
** 0x0900 - 0x097F = NV
** 0x0980 - 0x09FF = OS
** 0x0A00 - 0x0A7F = RK
** 0x0A80 - 0x0AFF = SM
** 0x0B00 - 0x0B7F = SY
** 0x0B80 - 0x0BFF = UM
** 0x0C00 - 0x0C7F = NL
** 0x0C80 - 0x0CFF = ED
** 0x0D00 - 0x0D7F = ICP
** 0x0D80 - 0x0DFF = Reserved
** 0x0E00 - 0x0E7F = Reserved
** 0x0E80 - 0x0EFF = Reserved
** 0x0F00 - 0x0F7F = Reserved
** 0x0F80 - 0x0FFF = Reserved
** 0x1000 - 0x1FFF = Reserved
** 0x2000 - 0x7FFE = Available for application use
*/
/****************************************************************************
*****************************************************************************
**
** Common example code status codes definitions.
**
*****************************************************************************
*****************************************************************************
*/
/*
** General use status codes.
*/
STATUS_S( SUCCESS, 0x0000, "Success" )
STATUS_S( FAILURE, 0x0001, "Unspecified general failure" )
STATUS_S( UNKNOWN_TRRBL_REQUEST, 0x0002, "Unsupported tribble request code" )
STATUS_S( BAD_TRIBBLE_MUTATION, 0x0003, "Bad tribble mutation" )
STATUS_S( CREATE_RESOURCE_FAILED, 0x0004, "Unable to create resource(s)" )
STATUS_S( INIT_RESOURCE_FAILED, 0x0005, "Unable to initialize resource(s)" )
STATUS_S( CREATE_TASK_FAILED, 0x0006, "Unable to create task(s)" )
STATUS_S( INIT_TASK_FAILED, 0x0007, "Unable to initialize task(s)" )
/*
** Buffer Fragment manager status codes.
*/
STATUS_S( BF_FAULT_TYPE, 0x0100, "BF-General fault" )
STATUS_S( BF_NO_SUCH_MAPPING, 0x0101, "BF-No such mapping entry found" )
STATUS_S( BF_CPU_TIME_EXCEEDED, 0x0102, "BF-App data area CPU limit exceeded" )
STATUS_S( BF_MAPPING_BOUND_ERROR, 0x0103, "BF-Mapping beyond boundary of data" )
/*
** ComBuf status codes.
*/
STATUS_S( CB_FAULT_TYPE, 0x0300, "CB-General fault" )
STATUS_S( CB_DELETE_WITH_ZERO_USECOUNT, 0x0301, "CB-Delete ComBuf with zero UseCount" )
STATUS_S( CB_OVERFLOW, 0x0302, "CB-Buffer overflow" )
STATUS_S( CB_UNDERFLOW, 0x0303, "CB-Buffer underflow" )
/*
** ControlNet Connection Object status codes.
*/
STATUS_S( CC_FAULT_TYPE, 0x0380, "CC-General fault" )
STATUS_S( CC_INVALID_RECORD, 0x0381, "CC-Invalid record" )
STATUS_S( CC_NV_DATA_GOOD, 0x0382, "CC-NV copy of connection data good" )
STATUS_S( CC_NV_DATA_BAD, 0x0383, "CC-NV copy of connection data bad" )
STATUS_S( CC_INVALID_SCHEDULE, 0x0384, "CC-Invalid schedule for connection" )
STATUS_S( CC_SESSION_TIMEOUT, 0x0385, "CC-Edit session timed out" )
/*
** Communications Device status codes.
*/
STATUS_S( CD_FAULT_TYPE, 0x0400, "CD-General fault" )
STATUS_S( CD_BAD_MODE_AFTER_RESET, 0x0401, "CD-Bad net mode after reset" )
STATUS_S( CD_BAD_TX_TRIBBLE_REQUEST, 0x0402, "CD-Unsupported Tx tribble request" )
STATUS_S( CD_COMM_DEV_INIT_FAIL, 0x0403, "CD-Initialization failed" )
STATUS_S( CD_COMM_PROC_SELFTEST_FAIL, 0x0404, "CD-Comm processor selftest failed" )
STATUS_S( CD_COMM_ON_LINE, 0x0405, "CD-On line" )
STATUS_S( CD_COMM_CHECK_4_CABLE, 0x0406, "CD-Check for cable" )
STATUS_S( CD_COMM_WAITING_2_ROGUE, 0x0407, "CD-Waiting to rogue" )
STATUS_S( CD_COMM_CHECK_4_MODERATOR, 0x0408, "CD-Check for moderator" )
STATUS_S( CD_COMM_IM_ALIVE, 0x0409, "CD-Im Alive!" )
STATUS_S( CD_COMM_DUP_NODE, 0x040A, "CD-Dup node detected" )
STATUS_S( CD_COMM_FORCED_LISTEN_ONLY, 0x040B, "CD-Forced listen only entered" )
STATUS_S( CD_COMM_SHUTDOWN_COMPLETE, 0x040C, "CD-Shutdown complete" )
STATUS_S( CD_COMM_NET_PARAM_CHANGE, 0x040D, "CD-Net parameter change" )
STATUS_S( CD_DEVICE_FAULTED, 0x040E, "CD-Device faulted" )
STATUS_S( CD_DEVICE_HEALTHY, 0x040F, "CD-ASIC alive and healthy" )
STATUS_S( CD_INCOMPATIBLE_ASIC_FIRMWARE, 0x0410, "CD-Incompatible version of firmware" )
STATUS_S( CD_MAC_PROC_SELFTEST_FAIL, 0x0411, "CD-Mac processor self test failed" )
STATUS_S( CD_ONLINE_FAIL, 0x0412, "CD-Going online failed" )
STATUS_S( CD_ONLINE_SUCCEEDED, 0x0413, "CD-Going online succeeded" )
STATUS_S( CD_INVALID_TRANSPORT, 0x0414, "CD-Invalid transport" )
STATUS_S( CD_TRANSPORT_ALLOC_FAIL, 0x0415, "CD-Transport allocation failed" )
STATUS_S( CD_TX_BUF_OVERRUN, 0x0416, "CD-Transmit buffer overflow" )
STATUS_S( CD_RX_OVERFLOW, 0x0417, "CD-Receive overflow" )
STATUS_S( CD_RX_UNDERFLOW, 0x0418, "CD-Receive underflow" )
STATUS_S( CD_TX_OVERFLOW, 0x0419, "CD-Transmit overflow" )
STATUS_S( CD_TX_UNDERFLOW, 0x041A, "CD-Transmit underflow" )
STATUS_S( CD_TX_BLOCKED, 0x041B, "CD-Transmission blocked" )
STATUS_S( CD_RX_ON_DEAD_TRANSPORT, 0x041C, "CD-Rx on dead transport" )
STATUS_S( CD_TX_ON_DEAD_TRANSPORT, 0x041D, "CD-Tx on dead transport" )
STATUS_S( CD_BAD_TAG_INDEX, 0x041E, "CD-Bad tag index" )
STATUS_S( CD_FLUSH_FAILED, 0x041F, "CD-Flush failed" )
STATUS_S( CD_BUFFER_NOT_AVAILABLE, 0x0420, "CD-Buffer not available" )
STATUS_S( CD_BUFFER_NOT_HELD, 0x0421, "CD-Buffer not held" )
STATUS_S( CD_RESOURCE_UNAVAILABLE, 0x0422, "CD-Resource unavailable" )
STATUS_S( CD_UNSUPPORTED_BANDWIDTH, 0x0423, "CD-Unsupported transmission rate" )
STATUS_S( CD_UNSUPPORTED_CONFIG_REQUEST, 0x0424, "CD-Unsupported configuration request" )
STATUS_S( CD_UNSUPPORTED_FIXED_TAG, 0x0425, "CD-Unsupported fixed tag received" )
STATUS_S( CD_UNSUPPORTED_INT_NUMBER, 0x0426, "CD-Unsupported interrupt number" )
STATUS_S( CD_UNSUPPORTED_TRANSPORT, 0x0427, "CD-Unsupported transport type" )
STATUS_S( CD_UNSUPPORTED_TRIGGER, 0x0428, "CD-Unsupported trigger mode" )
STATUS_S( CD_AUTO_TUNE_CYCLE_START, 0x0429, "CD-Auto tune cycle start" )
STATUS_S( CD_AUTO_TUNE_CYCLE_END, 0x042A, "CD-Auto tune cycle end" )
STATUS_S( CD_AUTO_TUNE_PAD_BACKOFF, 0x042B, "CD-Auto tune pad backoff" )
/*
** start edits: October,10th 2005, H.F.
*/
STATUS_S( CD_BAD_API_TIMER, 0x042C, "CD-Bad API Timer" )
/*
** end edits: October,10th 2005, H.F.
*/
#ifdef CD_EN_OBJECTS
STATUS_S( EN_FAULT_TYPE, 0x0440, "EN-General fault" )
STATUS_S( EN_RESOURCE, 0x0441, "Low Resources" )
STATUS_S( EN_UNKNOWN_HOST, 0x0442, "EN-Unknown Host" )
STATUS_S( EN_TYPE_ERR, 0x0443, "EN-Command Type Fault" )
STATUS_S( EN_SOCKET_ERR, 0x0444, "EN-Error returned by 'socket' call." )
STATUS_S( EN_ACCEPT_ERR, 0x0445, "EN-Error returned by 'accept' call." )
STATUS_S( EN_BIND_ERR, 0x0446, "EN-Error returned by 'bind' call." )
STATUS_S( EN_LISTEN_ERR, 0x0447, "EN-Error returned by 'listen' call." )
STATUS_S( EN_CONNECT_ERR, 0x0448, "EN-Error returned by 'connect' call." )
STATUS_S( EN_SOCKET_OPT, 0x0449, "EN-Error from setting socket options." )
STATUS_S( EN_WDOG_ERR, 0x044A, "EN-Error returned by 'wdCreate or wdStart' call." )
STATUS_S( EN_TASK_SP_ERR, 0x044B, "EN-Error returned by task spawn." )
STATUS_S( EN_QUEUE_CR_ERR, 0x044C, "EN-Error returned by queue create." )
STATUS_S( EN_PARTIAL_PACKET_RECVD, 0x044D, "EN-Received partial packet on socket" )
STATUS_S( EN_ENCAP_INVALID_OR_UNSUP, 0x044E, "EN-Received invalid or unsupported ENCAP request" )
STATUS_S( EN_NO_RESP_TRRBL, 0x044F, "EN-Received response with no request." )
STATUS_S( EN_PIPE_ERR, 0x0450, "EN-pipe creation/open error." )
STATUS_S( EN_PACKET_TOO_BIG, 0x0451, "EN-Data length of packet is too big for us to handle." )
STATUS_S( EN_NO_HOST, 0x0452, "EN-Can't convert the host name/IP address." )
STATUS_S( EN_NO_MULTICAST, 0x0453, "EN-Error returned by setsockopt, MULTICAST." )
STATUS_S( EN_SESS_OPEN_ERR, 0x0454, "EN-Session established on a UDP socket." )
#endif
/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -