| slug | /model/modbus |
|---|---|
| title | Modbus package reference |
| sidebar_position | 2 |
BinaryParsec.Protocols.Modbus exposes transport-specific entry points over one shared Modbus PDU layer.
This package keeps the transport framing and the payload interpretation separate. ModbusRtu and ModbusTcp own the frame-level facades, while ModbusPduParser keeps the shared payload boundary in one place.
ModbusRtuModbusTcpModbusPduModbusRtuFrameModbusTcpFrame
The core user story is simple: parse a transport frame, normalize the PDU, and keep the transport-specific details in the frame model.
- Parse RTU and TCP frames from contiguous byte input.
- Use
TryParseFrameandParseFrameoverloads from F# or C#. - Inspect raw PDU bytes without making the core guess the transport policy.
- Preserve exception-response normalization in one place.
ModbusRtu.TryParseFrameModbusRtu.ParseFrameModbusTcp.TryParseFrameModbusTcp.ParseFrame
ModbusRtuFrameModbusTcpFrameModbusRtuCrcResult
ModbusPduModbusPduParser
ParseResult<'T>ParseErrorByteSlice
TryParseFrame(ReadOnlySpan<byte>, byref<...>, byref<ParseError>)TryParseFrame(byte[], byref<...>, byref<ParseError>)