Data Structures | |
struct | xMBStat |
This data structure is used by the statistic interface. More... | |
struct | xMBAnalyzerFrame |
This data structure is used by the protocol analyzer. More... | |
Defines | |
#define | MB_HDL_INVALID ( NULL ) |
#define | MB_ERROR_IS_EXCEPTION(eStatus) |
Typedefs | |
typedef void * | xMBHandle |
typedef void(* | pvMBAnalyzerCallbackCB )(xMBHandle xHdl, void *pxCtx, const xMBPTimeStamp *pxTime, const xMBAnalyzerFrame *peFrame) |
Enumerations | |
enum | eMBException { MB_PDU_EX_NONE = 0x00, MB_PDU_EX_ILLEGAL_FUNCTION = 0x01, MB_PDU_EX_ILLEGAL_DATA_ADDRESS = 0x02, MB_PDU_EX_ILLEGAL_DATA_VALUE = 0x03, MB_PDU_EX_SLAVE_DEVICE_FAILURE = 0x04, MB_PDU_EX_ACKNOWLEDGE = 0x05, MB_PDU_EX_SLAVE_BUSY = 0x06, MB_PDU_EX_NOT_ACKNOWLEDGE = 0x07, MB_PDU_EX_MEMORY_PARITY_ERROR = 0x08, MB_PDU_EX_GATEWAY_PATH_UNAVAILABLE = 0x0A, MB_PDU_EX_GATEWAY_TARGET_FAILED = 0x0B } |
enum | eMBErrorCode { MB_ENOERR = 0, MB_ENOREG = 1, MB_EINVAL = 2, MB_EPORTERR = 3, MB_ENORES = 4, MB_EIO = 5, MB_EILLSTATE = 6, MB_EAGAIN = 7, MB_ETIMEDOUT = 8, MB_EX_ILLEGAL_FUNCTION = 10, MB_EX_ILLEGAL_DATA_ADDRESS = 11, MB_EX_ILLEGAL_DATA_VALUE = 12, MB_EX_SLAVE_DEVICE_FAILURE = 13, MB_EX_ACKNOWLEDGE = 14, MB_EX_SLAVE_BUSY = 15, MB_EX_MEMORY_PARITY_ERROR = 16, MB_EX_GATEWAY_PATH_UNAVAILABLE = 17, MB_EX_GATEWAY_TARGET_FAILED = 18 } |
enum | eMBSerialMode { MB_RTU, MB_ASCII } |
enum | eMBSerialParity { MB_PAR_ODD, MB_PAR_EVEN, MB_PAR_NONE } |
Functions | |
eMBErrorCode | eMBExceptionToErrorcode (UBYTE ubMBException) |
eMBException | eMBErrorcodeToException (eMBErrorCode eCode) |
BOOL | bMBGuessRTUFrameIsComplete (UBYTE arubBuffer[], USHORT usLength) |
|
Value: ( ( ( eStatus ) >= MB_EX_ILLEGAL_FUNCTION ) && \ ( ( eStatus ) <= MB_EX_GATEWAY_TARGET_FAILED ) ? TRUE : FALSE )
|
|
An invalid MASTER handle.
|
|
A callback function used by the protocol analyzer. Note that for ASCII the request is already converted into its binary equivalent and the control characters are stripped. The reason for this is that otherwise the stack would require internally twice the amount of memory if requests would be stored in raw. Therefore they are automatically decoded and encoded during transmit and receive.
|
|
A handle used to hold either MASTER or SLAVE stack handles.
|
|
Error code reported by the protocol stack.
|
|
MODBUS exception defined for the MODBUS PDU.
|
|
Modes supported by the serial protocol stack.
|
|
Parity for serial transmission mode.
|
|
Check if the buffer contents is a standard MODBUS frame. This buffer quickly inspects a MODBUS frame and checks if it is a valid frame structure. It is used to implement quicker RTU timeouts on platforms where the timers have not a sufficient resolution. E.g. WIN32 and/or LINUX.
|
|
Map an application exception to a MODBUS exception.
|
|
Map a MODBUS exception code to an application error code.
|