#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_modbus_client_write_single_coil(
client: *const PamojaModbusClient,
unit: u8,
address: u16,
on: bool,
out_error: *mut PamojaModbusClientError,
) -> PamojaStatusExpand description
Writes one coil, function 0x05.
§Arguments
client- the client.unit- the device, 1 to 247, or 0 to broadcast to every device.address- the coil’s address.on- the state to write.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, and out_error a writable pointer or null.