OpenNI 1.5.4: xn::ErrorStateCapability Class Reference


xn::ErrorStateCapability Class Reference

#include <XnCppWrapper.h>

Inheritance diagram for xn::ErrorStateCapability:

List of all members.

Public Member Functions

 ErrorStateCapability (XnNodeHandle hNode)
 ErrorStateCapability (const NodeWrapper &node)
XnStatus GetErrorState () const
XnStatus RegisterToErrorStateChange (StateChangedHandler handler, void *pCookie, XnCallbackHandle &hCallback)
void UnregisterFromErrorStateChange (XnCallbackHandle hCallback)

Detailed Description

Purpose: The Error State capability lets a node report that it has entered an error state, and so might not function correctly.

Usage: Do not instantiate directly. Instead, use ProductionNode::GetErrorStateCap() to obtain an instance.


An application can use the GetErrorState() method to get the error state of a node at any time, and it can also register a callback function to be called whenever the error 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.

Event: 'Error State Change'

Signals that the holder node's error state has changed.

This is the same value that can be obtained by the GetErrorState() method.

This event can be used by the application to get a signal as soon as any error occurs in the holder node. By handling all the error states of all nodes, the application can use this event to respond immediately to any error situation.

Use RegisterToErrorStateChange() and UnregisterFromErrorStateChange() for using this event.

Instead of registering to the error state callback of all the nodes in the context, an application may register to the 'Global Error State Change' event - see Event: 'Global Error State Change'.

Constructor & Destructor Documentation

xn::ErrorStateCapability::ErrorStateCapability ( XnNodeHandle  hNode) [inline]


[in]hNodeNode handle
xn::ErrorStateCapability::ErrorStateCapability ( const NodeWrapper node) [inline]

Member Function Documentation

XnStatus xn::ErrorStateCapability::GetErrorState ( ) const [inline]

Gets the current error state of the holding node.

XnStatus xn::ErrorStateCapability::RegisterToErrorStateChange ( StateChangedHandler  handler,
void *  pCookie,
XnCallbackHandle hCallback 
) [inline]

Registers an event handler for the 'Error State Change' event.

[in]handlerCallback function to be invoked when the event is raised.
[in]pCookieUser's cookie, to be delivered to the callback.
[out]hCallbackHandle to the callback. To be used for unregistering the callback.

For full details and usage of the parameters, see Registering to Events.

void xn::ErrorStateCapability::UnregisterFromErrorStateChange ( XnCallbackHandle  hCallback) [inline]

Unregisters the event handler for the 'Error State Change' event.

[in]hCallbackHandle received from registration.

For full details and usage of the parameter, see Unregistering from Events .

The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:07 for OpenNI 1.5.4 by   doxygen