Documentation

FieldTalk Modbus Slave C++ Library  Library version 2.11.0
MasterInfo Struct Reference

The MasterInfo object holds additional information about the currently processed Modbus request. More...

Public Types

enum  {
  RTU, ASCII, TCP, RTU_OVER_TCP,
  UDP
}
 Protocol types. More...
 

Public Attributes

int protocol
 Protocol type of the currently processed master request.
 
unsigned short transactionId
 Transaction ID of the currently processed master request if MODBUS/TCP.
 
int slaveAddr
 Slave address of the currently processed master request.
 
const char * connection
 IP address in dot notation or serial port name of the currently processed master request.
 

Detailed Description

The MasterInfo object holds additional information about the currently processed Modbus request.

Access to the MasterInfo is through a call to MbusDataTableInterface::getMasterInfo() from any data table callback function.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Protocol types.

Enumerator
RTU 

Modbus RTU protocol is used.

ASCII 

Modbus ASCII protocol is used.

TCP 

MODBUS/TCP is used.

RTU_OVER_TCP 

Encapsulated Modbus RTU used.

UDP 

MODBUS/UDP is used.