API  2.3.0
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
xMBAnalyzerFrame Struct Reference

This data structure is used by the protocol analyzer. More...

#include <mbtypes.h>

Public Types

enum  { MB_FRAME_SEND, MB_FRAME_RECEIVE }
 Direction of the frame. More...
 
enum  {
  MB_FRAME_RTU, MB_FRAME_ASCII, MB_FRAME_TCP, MB_FRAME_UDP,
  MB_FRAME_DAMAGED
}
 Depending on the instance of the MODBUS stack different protocols can be analyzed. The implementation selects the approriate protocol and initializes the member eFrameType to this type. More...
 

Data Fields

enum xMBAnalyzerFrame:: { ... }  eFrameDir
 Direction of the frame.
 
enum xMBAnalyzerFrame:: { ... }  eFrameType
 Depending on the instance of the MODBUS stack different protocols can be analyzed. The implementation selects the approriate protocol and initializes the member eFrameType to this type.
 
union {
x
 Shared structure for protocol headers. You are only allowed to access the element specified by eFrameType.
 
const UBYTE * ubDataPayload
 In case of MB_FRAME_RTU, MB_FRAME_ASCII or MB_FRAME_TCP contains the MODBUS PDU. In case of MB_FRAME_DAMAGED contains the raw frame including the header.
 
USHORT usDataPayloadLength
 Number of bytes in ubDataPayload which can be accessed.
 

Detailed Description

This data structure is used by the protocol analyzer.

Member Enumeration Documentation

anonymous enum

Direction of the frame.

Enumerator
MB_FRAME_SEND 

Frame has been sent.

MB_FRAME_RECEIVE 

Frame has been received.

anonymous enum

Depending on the instance of the MODBUS stack different protocols can be analyzed. The implementation selects the approriate protocol and initializes the member eFrameType to this type.

Enumerator
MB_FRAME_RTU 

Frame is a valid MODBUS RTU frame.

MB_FRAME_ASCII 

Frame is a valid MODBUS ASCII frame.

MB_FRAME_TCP 

Frame is a valid MODBUS TCP frame.

MB_FRAME_UDP 

Frame is a valid MODbUS UDP frame.

MB_FRAME_DAMAGED 

Only raw data because of invalid frame.