• Libraries
  • Shop
  • Doc
  • Free Modbus
  • Support
  • Login
FieldTalk Modbus Slave C++ Library  Library version 2.10.0
  • Introduction
  • Chapters
  • Modules
  • Classes
Classes | Macros
IP based Protocols

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...
 

Detailed Description

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.

Note
If the configured TCP port is below IPPORT_RESERVED (usually 1024), the process has to run with root privilege! This applies if you are using the default MODBUS/TCP port 502.

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.

Macro Definition Documentation

◆ MAX_CONNECTIONS

#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).

  • FieldTalk Modbus Slave C++ Library Library version 2.10.0
Speak to the Experts
Modbus Organization Member logo

We are member of the Modbus Organization, Inc.

Buy with Confidence
30-day money back guarantee All our FieldTalk web sales are backed by a 30-day Money Back Guarantee.
We Accept
Bank VISA MasterCard PayPal
Customer Info
  • Info & Contact
  • Customer Login
  • Terms of Service
  • Terms of Sale
  • Privacy Policy
© 2005-2025 proconX Pty Ltd. All rights reserved. proconX and FieldTalk are trademarks of proconX Pty Ltd.
All other trademarks and registered trademarks appearing on www.modbusdriver.com are the property of their respective owners.