A Generator node is a production node that also generates continuous data. It supports all Production Node functions, and adds additional functions.
◆ xnGetData()
Gets the current data.
- Parameters
-
hInstance | [in] A handle to the instance. |
- Returns
- NULL if this production node is not a generator.
◆ xnGetDataSize()
Gets the size of current data, in bytes.
- Parameters
-
hInstance | [in] A handle to the instance. |
- Returns
- (XnUInt32)-1 if this production node is not a generator.
◆ xnGetFrameID()
Gets the frame ID of current data.
- Parameters
-
hInstance | [in] A handle to the instance. |
- Returns
- (XnUInt32)-1 if this production node is not a generator.
◆ xnGetTimestamp()
Gets the timestamp of current data, in microseconds.
- Parameters
-
hInstance | [in] A handle to the instance. |
- Returns
- (XnUInt64)-1 if this production node is not a generator.
◆ xnIsDataNew()
◆ xnIsGenerating()
Checks if this node is currently generating.
- Parameters
-
hInstance | [in] A handle to the instance. |
- Returns
- FALSE if this production node is not a generator.
◆ xnIsNewDataAvailable()
Checks whether this node has new data (and so a call to xnWaitAndUpdateData() will not block).
- Parameters
-
hInstance | [in] A handle to the instance. |
pnTimestamp | [out] [Optional] If not NULL, will be filled with that data timestamp. |
◆ xnRegisterToGenerationRunningChange()
Registers a callback function to be called when generation starts or stops.
- Parameters
-
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(). |
◆ xnRegisterToNewDataAvailable()
Registers a callback function to be called when new data is available.
- Parameters
-
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(). |
◆ xnStartGenerating()
Starts generation of the output. This will also cause all dependencies to start generating.
- Parameters
-
hInstance | [in] A handle to the instance to start generating. |
- Returns
- XN_STATUS_INVALID_OPERATION if this production node is not a generator.
◆ xnStopGenerating()
Stops generation of the output.
- Parameters
-
hInstance | [in] A handle to the instance to stop generating. |
- Returns
- XN_STATUS_INVALID_OPERATION if this production node is not a generator.
◆ xnUnregisterFromGenerationRunningChange()
◆ xnUnregisterFromNewDataAvailable()
◆ xnWaitAndUpdateData()
Updates the data to the latest available one. If needed, the call will block until new data is available.
- Parameters
-
hInstance | [in] A handle to the instance to be updated. |
- Returns
- XN_STATUS_INVALID_OPERATION if this production node is not a generator.