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

◆ PN_APP_IOD_cbOutSubmodSubstValRead()

PN_API_IOD_IOXS PN_APP_IOD_cbOutSubmodSubstValRead ( PN_API_IOD_Handle_t *const  pnHandle,
PN_API_IOD_DevAddr_t *const  addr,
const uint32_t  bufLen,
uint8_t *const  buffer,
uint16_t *const  substMode,
uint16_t *const  substActive 
)

Callback function to read substitute values for output submodule.

If the corresponding IOCS status is PN_API_IOD_STATUS_GOOD, this function copies output data from the global output data array to the buffer provided by Profinet stack. Otherwise, a substitute value is filled for input and output data.

Warning
This function is only called when PN_API_IOD_INCLUDE_REC8028_8029 is set to 1.
Parameters
[in]pnHandleProfinet API Handle.
[in]addrGeographical or logical address.
[in]bufLenLength of the submodule output substitute data.
[in]bufferPointer to submodule output substitute data.
[in,out]substModeSubstitution mode:
0: substitute value is set to zero.
1: last output value received from controller.
2: replacement value decided by the application.
[in,out]substActiveSubstitute active flag:
0: normal operation (IOXS are GOOD).
1: otherwise (substitute value active).
Returns
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_outSubmodSubstValReadCbf