OpenNI 1.5.4

#include <XnCppWrapper.h>

Inheritance diagram for xn::ErrorStateCapability:

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)
 
- Public Member Functions inherited from xn::Capability
 Capability (XnNodeHandle hNode)
 
 Capability (const NodeWrapper &node)
 
- Public Member Functions inherited from xn::NodeWrapper
 NodeWrapper (XnNodeHandle hNode)
 
 NodeWrapper (const NodeWrapper &other)
 
NodeWrapperoperator= (const NodeWrapper &other)
 
 ~NodeWrapper ()
 
 operator XnNodeHandle () const
 
XnNodeHandle GetHandle () const
 
XnBool operator== (const NodeWrapper &other)
 
XnBool operator!= (const NodeWrapper &other)
 
XnBool IsValid () const
 
const XnChar * GetName () const
 
XnStatus AddRef ()
 
void Release ()
 
void SetHandle (XnNodeHandle hNode)
 
void TakeOwnership (XnNodeHandle hNode)
 

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.

Remarks:

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

◆ ErrorStateCapability() [1/2]

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

Ctor

Parameters
[in]hNodeNode handle

◆ ErrorStateCapability() [2/2]

xn::ErrorStateCapability::ErrorStateCapability ( const NodeWrapper & node)
inline

Member Function Documentation

◆ GetErrorState()

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

Gets the current error state of the holding node.

◆ RegisterToErrorStateChange()

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

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

Parameters
[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.

◆ UnregisterFromErrorStateChange()

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

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

Parameters
[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: