Skip to main content

ModbusInputRegister

Trait ModbusInputRegister 

Source
pub trait ModbusInputRegister: ModbusParam {
    // Required method
    fn decode_from_input_register(words: &[Word]) -> Result<Self, Error>;
}
Expand description

A trait for Modbus input registers.

Input registers are used to indicate the present values of the measured and calculated electrical quantities. Modbus Protocol function code 04 is used to access all parameters.

Note: Each request for data must be restricted to 30 parameters or less. Exceeding the 30 parameter limit will cause a Modbus Protocol exception code to be returned.

Required Methods§

Source

fn decode_from_input_register(words: &[Word]) -> Result<Self, Error>

Decodes a value from a slice of Modbus input register words.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§