Skip to content
Start free evaluation

Modbus C++ API

The public C++ API of Modbus.

24 symbols
  • modbus NamespaceModbus C++ API: RAII handles, JSON command endpoints and diagnostic logging, plus the Qt and MFC adapters in bindings/.
  • DiagnosticLogging ClassStatic functions that configure, inspect and flush the optional JSON Lines diagnostic log of the Modbus library.
  • DiagnosticLogging::configure MethodApplies a logging configuration.
  • DiagnosticLogging::flush MethodWaits up to two seconds until queued records are written.
  • DiagnosticLogging::status MethodReturns the logging status as JSON.
  • Endpoint ClassOne Modbus endpoint that runs JSON commands.
  • Endpoint::Endpoint ConstructorCreates a disconnected endpoint with the default configuration.
  • Endpoint::call MethodRuns one JSON command and returns the complete reply.
  • Handle ClassMove-only owner of one ::pdcomm_modbus_handle.
  • Handle::Handle ConstructorMoves ownership; other becomes empty.
  • Handle::Handle ConstructorCopying is disabled: a handle has exactly one owner.
  • Handle::Handle ConstructorTakes ownership of a handle.
  • Handle::get MethodReturns the owned handle without giving up ownership.
  • Handle::operator= MethodReleases the current handle, then takes ownership from other.
  • Handle::operator= MethodCopy assignment is disabled: a handle has exactly one owner.
  • Handle::~Handle MethodReleases the owned handle, if any.
  • License ClassStatic functions that install license text and read the license status and this host id of the Modbus library.
  • License::hostId MethodReturns this host id, PDH1-XXXX-XXXX-XXXX-XXXX.
  • License::install MethodInstalls license text, replacing text installed earlier.
  • License::status MethodReturns the license status as JSON.
  • MfcEndpoint ClassModbus endpoint that runs CString JSON commands.
  • MfcEndpoint::Call MethodRuns one JSON command and returns the complete reply.
  • QtEndpoint ClassModbus endpoint that takes a QJsonObject command and returns the result object of the reply.
  • QtEndpoint::call MethodRuns one JSON command and returns its result object.