FieldTalk Modbus Slave C++ Library
Library version 2.9.1
|
Classes | |
class | MbusTcpSlaveProtocol |
This class realises the server side of the MODBUS/TCP slave protocol. More... | |
class | MbusRtuOverTcpSlaveProtocol |
This class realises the Encapsulated Modbus RTU slave protocol. More... | |
class | MbusUdpSlaveProtocol |
This class realises a Modbus server using MODBUS over UDP protocol variant. More... | |
Macros | |
#define | MAX_CONNECTIONS 32 |
Maximum concurrent TCP/IP connections handled by server engine. More... | |
The library provides several flavours of IP based Modbus protocols.
The Server Engine of the MODBUS/TCP slave protocol is implemented in the class MbusTcpSlaveProtocol and is the only IP based protocol officially specified by the Modbus organisation.
In addition to MODBUS/TCP, the library offers implementations of the serial protocol RTU transported over TCP streams. It is implemented in the class MbusRtuOverTcpSlaveProtocol.
Also an implementation for MODBUS/TCP packets transported via UDP is available in form of the class MbusUdpSlaveProtocol.
All classes provide functions to start-up and to execute the respective server engines. The server engines can handle multiple master connections and are implemented as single threaded TCP servers. Upon receipt of a valid master query the server engine calls Data Provider methods to exchange data with the user application. For a more detailed description which Modbus data and control functions have been implemented in the server engine see section Server Functions common to all Modbus Protocol Flavours.
See section The MODBUS/TCP Protocol for some background information about MODBUS/TCP.
See section Using MODBUS/TCP Protocol for an example how to use the MbusTcpSlaveProtocol class.
#define MAX_CONNECTIONS 32 |
Maximum concurrent TCP/IP connections handled by server engine.
This can be increased by re-defining this preprocessor macro (from the comannd line compiler using -DMAX_CONNECTIONS=64
).