Skip to main content

Module function_code_handler

Module function_code_handler 

Source
Expand description

Modbus function code dispatch table: routes PDU requests to typed handlers. Modbus function code dispatch table.

Provides a registry of handlers for each Modbus function code, dispatching incoming PDU requests to the correct handler and returning PDU responses.

Structs§

DispatchTable
A mapping from function code bytes to boxed FunctionCodeHandlers.
EchoHandler
A simple handler that echoes the request data back as the response data. Useful for testing and as a default placeholder.
FunctionCodeRequest
A raw Modbus function code request PDU (function code byte + data bytes).
FunctionCodeResponse
A raw Modbus function code response PDU.

Enums§

FunctionCode
The nine standard Modbus function codes supported by this implementation.

Traits§

FunctionCodeHandler
Trait for objects that can handle a specific Modbus function code.