Skip to main content

pamoja_modbus_client_read_holding_registers

Function pamoja_modbus_client_read_holding_registers 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_modbus_client_read_holding_registers( client: *const PamojaModbusClient, unit: u8, start: u16, quantity: u16, out_values: *mut u16, out_error: *mut PamojaModbusClientError, ) -> PamojaStatus
Expand description

Reads holding registers, function 0x03.

§Arguments

  • client - the client.
  • unit - the device, 1 to 247.
  • start - the first register’s address.
  • quantity - how many, 1 to 125.
  • out_values - receives the values, in address order.
  • out_error - receives why the call failed, or null.

§Returns

As pamoja_modbus_client_read_coils.

§Safety

client must be a live handle or null, out_values must point to quantity writable values, and out_error must be a writable pointer or null.