Skip to main content

Module services

Module services 

Source
Expand description

Internal Modbus services. Contains logic for specific function codes (Coils, Registers, etc.) and the core ClientServices orchestration logic.

§Modbus Client Services Module

This module provides the core orchestration logic for a Modbus client. It acts as the bridge between the high-level application logic and the low-level transport protocols.

§Key Components

  • [ClientServices]: The main entry point for sending Modbus requests. It manages transaction state, handles timeouts, and performs automatic retries.
  • [ExpectedResponse]: A state tracking mechanism that maps outgoing requests to incoming responses using Transaction IDs (for TCP) or FIFO ordering (for Serial).
  • Sub-services: Specialized modules (coils, registers, etc.) that handle the serialization and deserialization of specific Modbus function codes.

§Features

  • Supports both TCP and Serial (RTU/ASCII) transport types.
  • Generic over TRANSPORT and APP traits for maximum flexibility in different environments.
  • Fixed-capacity response tracking using heapless for no_std compatibility.

Modules§

coil
Modbus Coils Client Services
diagnostic
Modbus Diagnostic Services
discrete_input
Modbus Discrete Input Service
fifo_queue
Modbus FIFO Queue Service
file_record
Modbus File Record Services
register
Modbus Register Service

Structs§

ClientServices
Core client services struct that manages the application logic, transport layer, and expected responses for Modbus communication. This is Main entry point for client operations, providing methods to send requests and process responses.
CoilsApi
Feature-scoped coils API facade.
DiagnosticApi
Feature-scoped diagnostics API facade.
DiscreteInputsApi
Feature-scoped discrete-inputs API facade.
FifoApi
Feature-scoped FIFO API facade.
FileRecordsApi
Feature-scoped file-record API facade.
RegistersApi
Feature-scoped registers API facade.

Traits§

ClientCommon
A marker trait that aggregates the necessary capabilities for a Modbus client application.

Type Aliases§

SerialClientServices
Convenience alias for serial clients where queue size is always one.