OpenNI 1.3.2

Global Error State

The Error State capability allow a node implementation to notify OpenNI about being in an error state, meaning it cannot function properly. An application may check each node error state, but most of the times it only needs to know if any node is in an error state, and does not really care which one (except for user notification purposes).

OpenNI aggregates the error state of all the nodes together into a single error state, making it easier for application to find out about current state. A global error state of XN_STATUS_OK means all the nodes are OK. If only one node is in an error state, that error state will also become the global error state (for example, if one sensor is disconnected, OpenNI global error state will be XN_STATUS_DEVICE_NOT_CONNECTED). If more than one node is in an error state, the global error state will be XN_STATUS_MULTIPLE_NODES_ERROR. In such a case, if needed, the application may go over all nodes and check which one is in an error state and why.