Skip to main content

pamoja_modbus_line_port

Function pamoja_modbus_line_port 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_modbus_line_port( line: *const PamojaModbusLine, settings: PamojaSerialSettings, out_port: *mut *mut PamojaSerialPort, ) -> PamojaStatus
Expand description

Makes a serial port with a line on its far end: every frame written reaches each device, and whatever they answer waits to be read.

§Arguments

  • line - the line; devices put on it later are on the port too.
  • settings - the speed and character format the line runs at.
  • out_port - receives the port, which the caller releases with pamoja_serial_port_free.

§Returns

PamojaStatus::Ok, or PamojaStatus::InvalidArgument for a null argument or settings the port does not have.

§Safety

line must be a live handle or null, and out_port a writable pointer or null.