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
TRANSPORTandAPPtraits for maximum flexibility in different environments. - Fixed-capacity response tracking using
heaplessforno_stdcompatibility.
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§
- Client
Services - 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.
- Coils
Api - Feature-scoped coils API facade.
- Diagnostic
Api - Feature-scoped diagnostics API facade.
- Discrete
Inputs Api - Feature-scoped discrete-inputs API facade.
- FifoApi
- Feature-scoped FIFO API facade.
- File
Records Api - Feature-scoped file-record API facade.
- Registers
Api - Feature-scoped registers API facade.
Traits§
- Client
Common - A marker trait that aggregates the necessary capabilities for a Modbus client application.
Type Aliases§
- Serial
Client Services - Convenience alias for serial clients where queue size is always one.