Crate modbus_core
source ·Expand description
§modbus-core
A no-std Rust modbus library.
§Installation
Add this to your Cargo.toml
:
[dependencies]
modbus-core = "*"
If you like to use Modbus TCP only:
[dependencies]
modbus-core = { version = "*", default-features = false, features = ["tcp"] }
If you like to use Modbus RTU only:
[dependencies]
modbus-core = { version = "*", default-features = false, features = ["rtu"] }
§Protocol-Specification
- MODBUS Application Protocol Specification v1.1b3 (PDF)
- MODBUS over serial line specification and implementation guide v1.02 (PDF)
- MODBUS Messaging on TCP/IP Implementation Guide v1.0b (PDF)
§License
Copyright 2018-2024 slowtec GmbH
MIT/Apache-2.0
Modules§
- Modbus RTU
- Modbus RTU
Structs§
- Packed coils
- Coils iterator.
- Modbus data (u16 values)
- Data iterator
- A server (slave) exception response.
- Represents a message from the client (slave) to the server (master).
- Represents a message from the server (slave) to the client (master).
Enums§
- modbus-core Error
- A server (slave) exception.
- A Modbus function code.
- A request represents a message from the client (master) to the server (slave).
- The response data of a successfull request.
Functions§
- Turn a bool into a u16 coil value
- Pack coils into a byte array.
- Calculate the number of bytes required for a given number of coils.
- Turn a u16 coil value into a boolean value.
- Unpack coils from a byte array.