Skip to main content

pamoja_modbus_frame_function

Function pamoja_modbus_frame_function 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_modbus_frame_function( frame: *const PamojaModbusFrame, ) -> u8
Expand description

Returns a frame’s function code.

An exception response carries the request’s function code with its high bit set, so this returns that byte as it appeared on the wire.

§Returns

The function code, or 0 if frame is null.

§Safety

frame must be a live handle from pamoja_modbus_frame_parse, or null.