PROFINET Device4.2.0
 
Loading...
Searching...
No Matches

◆ PN_APP_IOD_cbDataRead()

PN_API_IOD_IOXS PN_APP_IOD_cbDataRead ( PN_API_IOD_Handle_t *const  pnHandle,
PN_API_IOD_DevAddr_t *const  addr,
const uint32_t  bufLen,
uint8_t *const  buffer,
const PN_API_IOD_IOXS  remoteIops 
)

Callback function to read output data from the IO controller to the physical output of a submodule. If output data is invalid, replacement substitute value is used.

This function reads data from the buffer provided by the stack to the global output data array if data is valid, else replacement substitute value is copied and used instead. It also turns ON/OFF some LEDs based on the value received. IOPS of the corresponding submodule is also updated while IOCS is sent back as a return value.

Parameters
[in]pnHandleProfinet API Handle.
[in]addrGeographical address (slot/subslot) of the submodule.
[in]bufLenLength of data.
[in]bufferPointer to data buffer to read from.
[in]remoteIopsIOPS from the IO controller, can be: PN_API_IOD_STATUS_BAD or PN_API_IOD_STATUS_GOOD.
Returns
Local IOCS as PN_API_IOD_IOXS.
Return values
PN_API_IOD_STATUS_GOODData received is good.
PN_API_IOD_STATUS_BADData received is bad.
See also
PN_API_IOD_dataReadCbf