Skip to content
Start free evaluation

Modbus API reference

64 symbols
  • PDCOMM_MODBUS_ASCII C EnumeratorModbus ASCII over a serial line (Modbus over Serial Line specification).
  • PDCOMM_MODBUS_BUFFER_TOO_SMALL C EnumeratorThe output capacity is smaller than the data. The required size is reported and the output is unchanged.
  • PDCOMM_MODBUS_INTERNAL_ERROR C EnumeratorAn internal failure, such as a contained panic or a poisoned endpoint lock. Release the endpoint and create a new one.
  • PDCOMM_MODBUS_INVALID_HANDLE C EnumeratorThe handle is zero, released, unknown or of the wrong kind.
  • PDCOMM_MODBUS_INVALID_INPUT C EnumeratorA pointer, size or JSON document is invalid; nothing was changed.
  • PDCOMM_MODBUS_OK C EnumeratorThe call succeeded.
  • PDCOMM_MODBUS_RTU C EnumeratorModbus RTU over a serial line (Modbus over Serial Line specification).
  • PDCOMM_MODBUS_SECURITY C EnumeratorModbus/TCP Security: TLS with X.509 certificates and role-based authorization.
  • PDCOMM_MODBUS_SERVICE_ERROR C EnumeratorThe command ran and failed, for example with a timeout, a refused connection or an invalid configuration. An owned error buffer is returned.
  • PDCOMM_MODBUS_TCP C EnumeratorModbus TCP (MBAP header over TCP), client, server and gateway listener.
  • pdcomm_modbus_abi_version C FunctionReturns the ABI version of the loaded library.
  • pdcomm_modbus_buffer_copy C FunctionCopies a JSON reply buffer as UTF-8 without a terminator.
  • pdcomm_modbus_call C FunctionRuns one JSON command on an endpoint and returns the JSON reply.
  • pdcomm_modbus_capabilities C FunctionReturns the features compiled into the loaded library.
  • pdcomm_modbus_capability C EnumFeature bits reported by pdcomm_modbus_capabilities().
  • pdcomm_modbus_endpoint_create C FunctionCreates a disconnected endpoint with the default configuration.
  • pdcomm_modbus_handle C TypedefOpaque, library-local handle of an endpoint or a JSON buffer.
  • pdcomm_modbus_logging_configure C FunctionConfigures the optional diagnostic log of this library.
  • pdcomm_modbus_logging_flush C FunctionWaits until queued log records are written to the sink.
  • pdcomm_modbus_logging_status C FunctionCopies the diagnostic log status as UTF-8 JSON without a terminator.
  • pdcomm_modbus_release C FunctionReleases an endpoint or a JSON buffer.
  • pdcomm_modbus_status C EnumStatus code returned by every int32_t Modbus C ABI function.
  • modbus C++ NamespaceModbus C++ API: RAII handles, JSON command endpoints and diagnostic logging, plus the Qt and MFC adapters in bindings/.
  • DiagnosticLogging C++ ClassStatic functions that configure, inspect and flush the optional JSON Lines diagnostic log of the Modbus library.
  • DiagnosticLogging::configure C++ MethodApplies a logging configuration.
  • DiagnosticLogging::flush C++ MethodWaits up to two seconds until queued records are written.
  • DiagnosticLogging::status C++ MethodReturns the logging status as JSON.
  • Endpoint C++ ClassOne Modbus endpoint that runs JSON commands.
  • Endpoint::Endpoint C++ ConstructorCreates a disconnected endpoint with the default configuration.
  • Endpoint::call C++ MethodRuns one JSON command and returns the complete reply.
  • Handle C++ ClassMove-only owner of one ::pdcomm_modbus_handle.
  • Handle::Handle C++ ConstructorMoves ownership; other becomes empty.
  • Handle::Handle C++ ConstructorCopying is disabled: a handle has exactly one owner.
  • Handle::Handle C++ ConstructorTakes ownership of a handle.
  • Handle::get C++ MethodReturns the owned handle without giving up ownership.
  • Handle::operator= C++ MethodReleases the current handle, then takes ownership from other.
  • Handle::operator= C++ MethodCopy assignment is disabled: a handle has exactly one owner.
  • Handle::~Handle C++ MethodReleases the owned handle, if any.
  • License C++ ClassStatic functions that install license text and read the license status and this host id of the Modbus library.
  • License::hostId C++ MethodReturns this host id, PDH1-XXXX-XXXX-XXXX-XXXX.
  • License::install C++ MethodInstalls license text, replacing text installed earlier.
  • License::status C++ MethodReturns the license status as JSON.
  • MfcEndpoint C++ ClassModbus endpoint that runs CString JSON commands.
  • MfcEndpoint::Call C++ MethodRuns one JSON command and returns the complete reply.
  • QtEndpoint C++ ClassModbus endpoint that takes a QJsonObject command and returns the result object of the reply.
  • QtEndpoint::call C++ MethodRuns one JSON command and returns its result object.
  • DiagnosticLogging.Configure .NET MethodReplaces the diagnostic log configuration.
  • DiagnosticLogging.Flush .NET MethodWaits until the queued log records have been written.
  • DiagnosticLogging.Status .NET MethodGets the current logging state and counters.
  • Endpoint.Endpoint .NET ConstructorCreates a native Modbus endpoint.
  • Endpoint.Call .NET MethodRuns one JSON command on the endpoint and returns its result.
  • Endpoint.Dispose .NET MethodReleases the native endpoint.
  • Endpoint.pdcomm_modbus_capabilities .NET MethodGets the features compiled into the loaded native library.
  • License.HostId .NET MethodGets the host id of this machine, which host-bound licenses (SECS/GEM runtime licenses) name.
  • License.Install .NET MethodInstalls license text, replacing text installed earlier.
  • License.Status .NET MethodGets the license status of the Modbus library.
  • Modbus .NET Namespace
  • ModbusCommandException.Code .NET PropertyGets the machine-readable error code, or null for errors without one. Codes: license_required (a connect refused without a valid license for modbus, or for modbus-security when security is configured), license_invalid (a license_install without a verifiable license) and host_id_unavailable.
  • ModbusCommandException.Details .NET PropertyGets the license object of a license_required reply, with the refused module, its license state (for example missing or expired) and the deciding license_id; otherwise null.
  • ModbusCommandException.LicenseRequired .NET PropertyGets whether the command was refused for lack of a PDComm license (ModbusCommandException.Code is license_required). Connections that are already open are not affected.
  • DiagnosticLogging .NET ClassControls the optional diagnostic log of the PDComm Modbus native library.
  • Endpoint .NET ClassA PDComm Modbus endpoint driven by JSON commands: a Modbus TCP, RTU or ASCII client or server (simulator).
  • License .NET ClassInstalls and inspects the PDComm license of the Modbus native library.
  • ModbusCommandException .NET ClassThe exception thrown when a Modbus endpoint rejects a command (native status SERVICE_ERROR).