Modules | |
Mirror Capability | |
Alternative View Point Capability | |
Frame-Sync Capability | |
Controlling Generation | |
The following functions allows controlling if a node is currently generating data or not. | |
XN_C_API XnStatus | xnStartGenerating (XnNodeHandle hInstance) |
Starts generation of the output. This will also cause all dependencies to start generating. | |
XN_C_API XnBool | xnIsGenerating (XnNodeHandle hInstance) |
Checks if this node is currently generating. | |
XN_C_API XnStatus | xnStopGenerating (XnNodeHandle hInstance) |
Stops generation of the output. | |
XN_C_API XnStatus | xnRegisterToGenerationRunningChange (XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback) |
Registers a callback function to be called when generation starts or stops. | |
XN_C_API void | xnUnregisterFromGenerationRunningChange (XnNodeHandle hInstance, XnCallbackHandle hCallback) |
Unregisters a callback function which was registered using xnRegisterToGenerationRunningChange(). | |
Checking if new data is available | |
The following functions allows an application to know if and when a node has new data available. When new data is available, the node data is still not replaced, until explicitly done so using one of the update data functions. | |
XN_C_API XnStatus | xnRegisterToNewDataAvailable (XnNodeHandle hInstance, XnStateChangedHandler handler, void *pCookie, XnCallbackHandle *phCallback) |
Registers a callback function to be called when new data is available. | |
XN_C_API void | xnUnregisterFromNewDataAvailable (XnNodeHandle hInstance, XnCallbackHandle hCallback) |
Unregisters a callback function which was registered using xnRegisterToNewDataAvailable(). | |
XN_C_API XnBool | xnIsNewDataAvailable (XnNodeHandle hInstance, XnUInt64 *pnTimestamp) |
Checks whether this node has new data (and so a call to xnWaitAndUpdateData() will not block). | |
Getting new data | |
XN_C_API XnStatus | xnWaitAndUpdateData (XnNodeHandle hInstance) |
Updates the data to the latest available one. If needed, the call will block until new data is available. | |
Data properties | |
XN_C_API XnBool | xnIsDataNew (XnNodeHandle hInstance) |
Checks whether current data is new. Meaning, did the data change on the last call to xnWaitAndUpdateAll(), xnWaitOneUpdateAll() or xnWaitAndUpdateData(). | |
XN_C_API XnUInt32 | xnGetDataSize (XnNodeHandle hInstance) |
Gets the size of current data, in bytes. | |
XN_C_API XnUInt64 | xnGetTimestamp (XnNodeHandle hInstance) |
Gets the timestamp of current data, in microseconds. | |
XN_C_API XnUInt32 | xnGetFrameID (XnNodeHandle hInstance) |
Gets the frame ID of current data. |
A Generator node is a production node that also generates continuous data. It supports all Production Node functions, and adds additional functions.
XN_C_API XnUInt32 xnGetDataSize | ( | XnNodeHandle | hInstance | ) |
Gets the size of current data, in bytes.
hInstance | [in] A handle to the instance. |
XN_C_API XnUInt32 xnGetFrameID | ( | XnNodeHandle | hInstance | ) |
Gets the frame ID of current data.
hInstance | [in] A handle to the instance. |
XN_C_API XnUInt64 xnGetTimestamp | ( | XnNodeHandle | hInstance | ) |
Gets the timestamp of current data, in microseconds.
hInstance | [in] A handle to the instance. |
XN_C_API XnBool xnIsDataNew | ( | XnNodeHandle | hInstance | ) |
Checks whether current data is new. Meaning, did the data change on the last call to xnWaitAndUpdateAll(), xnWaitOneUpdateAll() or xnWaitAndUpdateData().
hInstance | [in] A handle to the instance. |
XN_C_API XnBool xnIsGenerating | ( | XnNodeHandle | hInstance | ) |
Checks if this node is currently generating.
hInstance | [in] A handle to the instance. |
XN_C_API XnBool xnIsNewDataAvailable | ( | XnNodeHandle | hInstance, |
XnUInt64 * | pnTimestamp | ||
) |
Checks whether this node has new data (and so a call to xnWaitAndUpdateData() will not block).
hInstance | [in] A handle to the instance. |
pnTimestamp | [out] [Optional] If not NULL, will be filled with that data timestamp. |
XN_C_API XnStatus xnRegisterToGenerationRunningChange | ( | XnNodeHandle | hInstance, |
XnStateChangedHandler | handler, | ||
void * | pCookie, | ||
XnCallbackHandle * | phCallback | ||
) |
Registers a callback function to be called when generation starts or stops.
hInstance | [in] A handle to the instance. |
handler | [in] A pointer to a function that will be called when generation starts/stops. |
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 xnUnregisterFromGenerationRunningChange(). |
XN_C_API XnStatus xnRegisterToNewDataAvailable | ( | XnNodeHandle | hInstance, |
XnStateChangedHandler | handler, | ||
void * | pCookie, | ||
XnCallbackHandle * | phCallback | ||
) |
Registers a callback function to be called when new data is available.
hInstance | [in] A handle to the instance. |
handler | [in] A pointer to a function that will be called when new data is available. |
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 xnUnregisterFromNewDataAvailable(). |
XN_C_API XnStatus xnStartGenerating | ( | XnNodeHandle | hInstance | ) |
Starts generation of the output. This will also cause all dependencies to start generating.
hInstance | [in] A handle to the instance to start generating. |
XN_C_API XnStatus xnStopGenerating | ( | XnNodeHandle | hInstance | ) |
Stops generation of the output.
hInstance | [in] A handle to the instance to stop generating. |
XN_C_API void xnUnregisterFromGenerationRunningChange | ( | XnNodeHandle | hInstance, |
XnCallbackHandle | hCallback | ||
) |
Unregisters a callback function which was registered using xnRegisterToGenerationRunningChange().
hInstance | [in] A handle to the instance. |
hCallback | [in] The handle to the callback returned from xnRegisterToGenerationRunningChange(). |
XN_C_API void xnUnregisterFromNewDataAvailable | ( | XnNodeHandle | hInstance, |
XnCallbackHandle | hCallback | ||
) |
Unregisters a callback function which was registered using xnRegisterToNewDataAvailable().
hInstance | [in] A handle to the instance. |
hCallback | [in] The handle to the callback returned from xnRegisterToNewDataAvailable(). |
XN_C_API XnStatus xnWaitAndUpdateData | ( | XnNodeHandle | hInstance | ) |
Updates the data to the latest available one. If needed, the call will block until new data is available.
hInstance | [in] A handle to the instance to be updated. |