OpenNI 1.5.4: Error State Capability

OpenNI

Error State Capability

Functions

XN_C_API XnStatus XN_C_DECL xnGetNodeErrorState (XnNodeHandle hInstance)
XN_C_API XnStatus XN_C_DECL xnRegisterToNodeErrorStateChange (XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback)
XN_C_API void XN_C_DECL xnUnregisterFromNodeErrorStateChange (XnNodeHandle hInstance, XnCallbackHandle hCallback)

Detailed Description

The Error State capability (XN_CAPABILITY_ERROR_STATE) allows a node to report it is now in an error state, and so, might not function correctly. An application may, at all times, check the error state of a node, and it may also register a callback function to be called whenever that state changes.

The error state of a node is represented using XnStatus. A value of XN_STATUS_OK means the node is OK. Any other value represents some sort of error situation in the node.


Function Documentation

XN_C_API XnStatus XN_C_DECL xnGetNodeErrorState ( XnNodeHandle  hInstance)

Gets current error state of this node.

Parameters:
hInstance[in] A handle to the instance.
Returns:
The error state of this node.
XN_C_API XnStatus XN_C_DECL xnRegisterToNodeErrorStateChange ( XnNodeHandle  hInstance,
XnStateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle phCallback 
)

Registers a callback function to error state changes.

Parameters:
hInstance[in] A handle to the instance.
handler[in] A pointer to a function that will be called when error state changes.
pCookie[in] A user cookie that will be passed to the callback function.
phCallback[out] Optional. Will be filled with a handle to be passed to xnUnregisterFromNodeErrorStateChange().
XN_C_API void XN_C_DECL xnUnregisterFromNodeErrorStateChange ( XnNodeHandle  hInstance,
XnCallbackHandle  hCallback 
)

Unregisters a callback function which was registered using xnRegisterToNodeErrorStateChange().

Parameters:
hInstance[in] A handle to the instance.
hCallback[in] The handle to the callback returned from xnRegisterToNodeErrorStateChange().
Generated on Wed May 16 2012 10:16:06 for OpenNI 1.5.4 by   doxygen 1.7.5.1