adapnex::drivers::modbus::ModbusMaster::ReadDiscreteInputs

Reads contiguous discrete inputs from a slave device using function code 0x02 into an iterator range.

Synopsis

Declared in <adapnex/drivers/modbus.h>

Result
ReadDiscreteInputs(
    uint8_t slave_id,
    uint16_t address,
    std::vector<bool>::iterator const& begin,
    std::vector<bool>::iterator const& end);

Return Value

Result code indicating success or error.

Parameters

Name

Description

slave_id

The slave device address.

address

The starting discrete input address.

begin

The beginning of the destination range.

end

The end of the destination range.

Created with MrDocs