1.2.4.4.3 SYS_CONSOLE_Status Function
C
SYS_STATUS SYS_CONSOLE_Status ( SYS_MODULE_OBJ object )
Summary
Returns status of the specific instance of the Console module.
Description
This function returns the status of the specific module instance.
Precondition
The SYS_CONSOLE_Initialize function should have been called before calling this function.
Parameters
Param | Description |
---|---|
object | SYS CONSOLE object handle, returned from SYS_CONSOLE_Initialize |
Returns
SYS_STATUS_READY - Indicates that the driver is initialized and is ready to accept new requests from the clients.
SYS_STATUS_BUSY - Indicates that the driver is busy with a previous requests from the clients. However, depending on the configured queue size for transmit and receive, it may be able to queue a new request.
SYS_STATUS_ERROR - Indicates that the driver is in an error state. Any value less than SYS_STATUS_ERROR is also an error state.
SYS_STATUS_UNINITIALIZED - Indicates that the driver is not initialized.
Example
// Given "object" returned from SYS_CONSOLE_Initialize SYS_STATUS consStatus; consStatus = SYS_CONSOLE_Status (object); if (consStatus == SYS_STATUS_READY) { // Console is initialized and is ready to accept client requests. }
Remarks
Application must ensure that the SYS_CONSOLE_Status returns SYS_STATUS_READY before performing console read/write.