Classes | Static Public Member Functions | Private Member Functions | List of all members
openni::OpenNI Class Reference

#include <OpenNI.h>

Classes

class  DeviceConnectedListener
 
class  DeviceDisconnectedListener
 
class  DeviceStateChangedListener
 

Static Public Member Functions

static Status addDeviceConnectedListener (DeviceConnectedListener *pListener)
 
static Status addDeviceDisconnectedListener (DeviceDisconnectedListener *pListener)
 
static Status addDeviceStateChangedListener (DeviceStateChangedListener *pListener)
 
static void enumerateDevices (Array< DeviceInfo > *deviceInfoList)
 
static const char * getExtendedError ()
 
static Status getLogFileName (char *strFileName, int nBufferSize)
 
static Version getVersion ()
 
static Status initialize ()
 
static void removeDeviceConnectedListener (DeviceConnectedListener *pListener)
 
static void removeDeviceDisconnectedListener (DeviceDisconnectedListener *pListener)
 
static void removeDeviceStateChangedListener (DeviceStateChangedListener *pListener)
 
static Status setLogConsoleOutput (bool bConsoleOutput)
 
static Status setLogFileOutput (bool bFileOutput)
 
static Status setLogMinSeverity (int nMinSeverity)
 
static Status setLogOutputFolder (const char *strLogOutputFolder)
 
static void shutdown ()
 
static Status waitForAnyStream (VideoStream **pStreams, int streamCount, int *pReadyStreamIndex, int timeout=TIMEOUT_FOREVER)
 

Private Member Functions

 OpenNI ()
 

Detailed Description

The OpenNI class is a static entry point to the library. It is used by every OpenNI 2.0 application to initialize the SDK and drivers to enable creation of valid device objects.

It also defines a listener class and events that enable for event driven notification of device connection, device disconnection, and device configuration changes.

In addition, it gives access to SDK version information and provides a function that allows you to wait for data to become available on any one of a list of streams (as opposed to waiting for data on one specific stream with functions provided by the VideoStream class)

Definition at line 1983 of file OpenNI.h.

Constructor & Destructor Documentation

openni::OpenNI::OpenNI ( )
inlineprivate

Definition at line 2398 of file OpenNI.h.

Member Function Documentation

static Status openni::OpenNI::addDeviceConnectedListener ( DeviceConnectedListener pListener)
inlinestatic

Add a listener to the list of objects that receive the event when a device is connected. See the OpenNI::DeviceConnectedListener class for details on utilizing the events provided by OpenNI.

Parameters
pListenerPointer to the Listener to be added to the list
Returns
Status code indicating success or failure of this operation.

Definition at line 2240 of file OpenNI.h.

static Status openni::OpenNI::addDeviceDisconnectedListener ( DeviceDisconnectedListener pListener)
inlinestatic

Add a listener to the list of objects that receive the event when a device is disconnected. See the OpenNI::DeviceDisconnectedListener class for details on utilizing the events provided by OpenNI.

Parameters
pListenerPointer to the Listener to be added to the list
Returns
Status code indicating success or failure of this operation.

Definition at line 2255 of file OpenNI.h.

static Status openni::OpenNI::addDeviceStateChangedListener ( DeviceStateChangedListener pListener)
inlinestatic

Add a listener to the list of objects that receive the event when a device's state changes. See the OpenNI::DeviceStateChangedListener class for details on utilizing the events provided by OpenNI.

Parameters
pListenerPointer to the Listener to be added to the list
Returns
Status code indicating success or failure of this operation.

Definition at line 2270 of file OpenNI.h.

static void openni::OpenNI::enumerateDevices ( Array< DeviceInfo > *  deviceInfoList)
inlinestatic

Fills up an array of DeviceInfo objects with devices that are available.

Parameters
[in,out]deviceInfoListAn array to be filled with devices.

Definition at line 2188 of file OpenNI.h.

static const char* openni::OpenNI::getExtendedError ( )
inlinestatic

Retrieves the calling thread's last extended error information. The last extended error information is maintained on a per-thread basis. Multiple threads do not overwrite each other's last extended error information.

The extended error information is cleared on every call to an OpenNI method, so you should call this method immediately after a call to an OpenNI method which have failed.

Definition at line 2179 of file OpenNI.h.

static Status openni::OpenNI::getLogFileName ( char *  strFileName,
int  nBufferSize 
)
inlinestatic

Get current log file name

Parameters
char* strFileName [out] returned file name buffer
intnBufferSize [in] Buffer size
Return values
STATUS_OKUpon successful completion.
STATUS_ERRORUpon any kind of failure.

Definition at line 2337 of file OpenNI.h.

static Version openni::OpenNI::getVersion ( )
inlinestatic

Returns the version of OpenNI

Definition at line 2161 of file OpenNI.h.

static Status openni::OpenNI::initialize ( )
inlinestatic

Initialize the library. This will load all available drivers, and see which devices are available It is forbidden to call any other method in OpenNI before calling initialize().

Definition at line 2144 of file OpenNI.h.

static void openni::OpenNI::removeDeviceConnectedListener ( DeviceConnectedListener pListener)
inlinestatic

Remove a listener from the list of objects that receive the event when a device is connected. See the OpenNI::DeviceConnectedListener class for details on utilizing the events provided by OpenNI.

Parameters
pListenerPointer to the Listener to be removed from the list
Returns
Status code indicating the success or failure of this operation.

Definition at line 2285 of file OpenNI.h.

static void openni::OpenNI::removeDeviceDisconnectedListener ( DeviceDisconnectedListener pListener)
inlinestatic

Remove a listener from the list of objects that receive the event when a device is disconnected. See the OpenNI::DeviceDisconnectedListener class for details on utilizing the events provided by OpenNI.

Parameters
pListenerPointer to the Listener to be removed from the list
Returns
Status code indicating the success or failure of this operation.

Definition at line 2297 of file OpenNI.h.

static void openni::OpenNI::removeDeviceStateChangedListener ( DeviceStateChangedListener pListener)
inlinestatic

Remove a listener from the list of objects that receive the event when a device's state changes. See the OpenNI::DeviceStateChangedListener class for details on utilizing the events provided by OpenNI.

Parameters
pListenerPointer to the Listener to be removed from the list
Returns
Status code indicating the success or failure of this operation.

Definition at line 2309 of file OpenNI.h.

static Status openni::OpenNI::setLogConsoleOutput ( bool  bConsoleOutput)
inlinestatic

Configures if log entries will be printed to console.

Parameters
constOniBool bConsoleOutput [in] TRUE to print log entries to console, FALSE otherwise.
Return values
STATUS_OKUpon successful completion.
STATUS_ERRORUpon any kind of failure.

Definition at line 2363 of file OpenNI.h.

static Status openni::OpenNI::setLogFileOutput ( bool  bFileOutput)
inlinestatic

Configures if log entries will be printed to file.

Parameters
constOniBool bConsoleOutput [in] TRUE to print log entries to file, FALSE otherwise.
Return values
STATUS_OKUpon successful completion.
STATUS_ERRORUpon any kind of failure.

Definition at line 2376 of file OpenNI.h.

static Status openni::OpenNI::setLogMinSeverity ( int  nMinSeverity)
inlinestatic

Set minimum severity for log produce

Parameters
intnMinSeverity [in] Logger severity
Return values
STATUS_OKUpon successful completion.
STATUS_ERRORUpon any kind of failure.

Definition at line 2350 of file OpenNI.h.

static Status openni::OpenNI::setLogOutputFolder ( const char *  strLogOutputFolder)
inlinestatic

Change the log output folder

Parameters
constchar * strLogOutputFolder [in] log required folder
Return values
STATUS_OKUpon successful completion.
STATUS_ERRORUpon any kind of failure.

Definition at line 2323 of file OpenNI.h.

static void openni::OpenNI::shutdown ( )
inlinestatic

Stop using the library. Unload all drivers, close all streams and devices. Once shutdown was called, no other calls to OpenNI is allowed.

Definition at line 2153 of file OpenNI.h.

static Status openni::OpenNI::waitForAnyStream ( VideoStream **  pStreams,
int  streamCount,
int *  pReadyStreamIndex,
int  timeout = TIMEOUT_FOREVER 
)
inlinestatic

Wait for a new frame from any of the streams provided. The function blocks until any of the streams has a new frame available, or the timeout has passed.

Parameters
[in]pStreamsAn array of streams to wait for.
[in]streamCountThe number of streams in pStreams
[out]pReadyStreamIndexThe index of the first stream that has new frame available.
[in]timeout[Optional] A timeout before returning if no stream has new data. Default value is TIMEOUT_FOREVER.

Definition at line 2205 of file OpenNI.h.


The documentation for this class was generated from the following file:


astra_camera
Author(s): Tim Liu
autogenerated on Wed Dec 16 2020 03:54:34