Process Data API.
Functions | |
IOL_FUNC_DECL IOL_EErrorInfo | IOLM_API_AL_eGetInput (INT8U u8Port_p, INT8U **ppu8Data_p, INT8U *pu8Length_p) |
Read input data. More... | |
IOL_FUNC_DECL IOL_EErrorInfo | IOLM_API_AL_eSetOutput (INT8U u8Port_p, INT8U *pu8Data_p, INT8U u8Length_p) |
Write output data. More... | |
IOL_FUNC_DECL IOL_EErrorInfo | IOLM_API_AL_eControlReq (INT8U u8Port_p, IOL_EPDOutStatus eControlCode_p) |
Send control code for PDOutStatus indication. More... | |
IOL_FUNC_DECL void | IOLM_Port_AL_vNewInput (INT8U u8Port_p) |
New input indication. More... | |
IOL_FUNC_DECL void | IOLM_Port_AL_vPDCycle (INT8U u8Port_p) |
Process Data cycle. More... | |
IOL_FUNC_DECL void | IOLM_Port_AL_vControlInd (INT8U u8Port_p, IOL_EPDInStatus eControlCode_p) |
Control indication. More... | |
IOL_FUNC_DECL IOL_EErrorInfo IOLM_API_AL_eControlReq | ( | INT8U | u8Port_p, |
IOL_EPDOutStatus | eControlCode_p | ||
) |
Send control code for PDOutStatus indication.
The control request function is used to set the Process Data valid or invalid. This function needs only to be called once if the state of Process Data changes. The default state is IOL_ePDOutStatus_PDOUTINVALID. The Process Data needs to be set valid after each reconnect (i.e. port changes to IOL_ePortMode_SM_OPERATE).
[in] | u8Port_p | The port number of the affected port. |
[in] | eControlCode_p | IOL_ePDOutStatus_PDOUTINVALID or IOL_ePDOutStatus_PDOUTVALID. |
IOL_FUNC_DECL IOL_EErrorInfo IOLM_API_AL_eGetInput | ( | INT8U | u8Port_p, |
INT8U ** | ppu8Data_p, | ||
INT8U * | pu8Length_p | ||
) |
Read input data.
The get input function is used to read the most recent Process Data. The data pointer is valid until the next call of the function for this port.
If the port is in DI mode, the Process Data length is 1 byte and interpreted as boolean. The value held the state of the Input pin.
The data consistency depends on the PD buffer configuration. For details see IOLM_PD_BUFFER_COUNT.
[in] | u8Port_p | The port number of the affected port. |
[out] | ppu8Data_p | Pointer to the most recent Process Data. |
[out] | pu8Length_p | Length of the Process Data. |
IOL_FUNC_DECL IOL_EErrorInfo IOLM_API_AL_eSetOutput | ( | INT8U | u8Port_p, |
INT8U * | pu8Data_p, | ||
INT8U | u8Length_p | ||
) |
Write output data.
The set output function is used to set the process output image. The caller has to take care that the length corresponds to the Device's Process Data length. Otherwise invalid data can be transfered.
If the port is in DO mode, the first byte is interpreted as boolean and set as pin output state.
The data consistency depends ont the PD buffer configuration. For details see IOLM_PD_BUFFER_COUNT.
[in] | u8Port_p | The port number of the affected port. |
[in] | pu8Data_p | Pointer to the most recent Process Data. |
[in] | u8Length_p | Length of the Process Data. |
IOL_FUNC_DECL void IOLM_Port_AL_vControlInd | ( | INT8U | u8Port_p, |
IOL_EPDInStatus | eControlCode_p | ||
) |
Control indication.
This function is called if the Process Data status has changed. The control code indicates the new Process Data state.
[in] | u8Port_p | The port number of the affected port. |
[in] | eControlCode_p | Input data status. |
IOL_FUNC_DECL void IOLM_Port_AL_vNewInput | ( | INT8U | u8Port_p | ) |
New input indication.
This function is called if new input data are available. They can be read by call of IOLM_API_AL_eGetInput().
[in] | u8Port_p | The port number of the affected port. |
IOL_FUNC_DECL void IOLM_Port_AL_vPDCycle | ( | INT8U | u8Port_p | ) |
Process Data cycle.
This function is called if the Process Data cycle is finished. The application can provide new Process Data using IOLM_API_AL_eSetOutput().
[in] | u8Port_p | The port number of the affected port. |