NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <ddm/ddm.h>KnError svDdmGetState(DevNode node, unsigned int *state);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
DDM
The svDdmGetState() call enables the client of the DDM to get the state value of the specified node.
There are in fact two independent state values that are returned in the state variable: the availability state, and the run state (see DDM(5FEA)).
In order to supply the two independent state values, the state variable will contain, on return, a bitmask that we can describe by the following logical equation:
state = (DDM_AVSTATE_ENABLED / DDM_AVSTATE_DISABLED) | (DDM_RUNSTATE_INACTIVE / DDM_RUNSTATE_OFFLINE / DDM_RUNSTATE_ONLINE)
where: / = exclusive OR and | = inclusive OR
The availability state can be any one of the following:
The normal state, where the device is able to activate a device driver to manage it, if required.
The device is locked which means that no device driver can be started to manage it.
The availability state resembles a flag more than a request. For example, if you have an enabled, online device but its availability state is set to DDM_AVSTATE_DISABLED, its run state will not change. This only implies that when you stop the driver (set the device to DDM_RUNSTATE_INACTIVE), no new drivers will be subsequently authorized to start for the node.
The run state can be any of the following:
The device is shutdown which means that there is no driver running to handle it. The only operation that can be performed in this situation is to set the device in the online or offline state.
The device cannot perform any operations. However, it is ready to perform any requested diagnostics.
The device is ready to perform any of the operations that it is capable of. These operations include DDM operations (the DDM is a client of the device through its mngt DDI) and other operations that are available to a client connected to any other DDI exported by the device. In this state it is possible to obtain statistics on the I/O activity and perform a non-intrusive audit of the health of the device driver.
Upon completion K_OK is returned if the state of the specified node has been successfully determined. Otherwise, a negative error code is returned which indicates why the svDdmGetState() call was unsuccessful.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
svDdmOpen(2K), svDdmClose(2K), svDdmEnable(2K), svDdmDisable(2K), svDdmShutdown(2K), svDdmOffline(2K), svDdmOnline(2K), svDdmGetStats(2K), svDdmAudit(2K), svDdmDiag(2K), svDdmGetInfo(2K), DDM(5FEA)
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO