1.4.3.2 PAL_PLC_Status Function
C
PAL_PLC_STATUS PAL_PLC_Status(SYS_MODULE_OBJ object);
Summary
Returns status of the specific instance of the PLC PAL module.
Description
This function returns the status of the specific PLC PAL module instance.
Precondition
The PAL_PLC_Initialize function should have been called before calling this function.
Parameters
Param | Description |
---|---|
object | PLC PAL object handle, returned from PAL_PLC_Initialize. |
Returns
PAL_PLC_STATUS_READY: Indicates that the module is initialized and is ready to accept new requests from the client.
PAL_PLC_STATUS_BUSY: Indicates that the module is busy with a previous initialization request from the client.
PAL_PLC_STATUS_ERROR: Indicates that the module is in an error state. Any value lower than SYS_STATUS_ERROR is also an error state.
PAL_PLC_STATUS_UNINITIALIZED: Indicates that the module is not initialized.
Example
// "object" returned from PAL_PLC_Initialize PAL_PLC_STATUS palPlcStatus; palPlcStatus = PAL_PLC_Status (object); if (palPlcStatus == PAL_PLC_STATUS_READY) { // PLC PAL is initialized and is ready to accept client requests. }
Remarks
The upper layer must ensure that PAL_PLC_Status returns PAL_PLC_STATUS_READY before performing PLC PAL operations.