Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
openni::OpenNI::DeviceConnectedListener Class Referenceabstract

#include <OpenNI.h>

Inheritance diagram for openni::OpenNI::DeviceConnectedListener:
Inheritance graph
[legend]

Public Member Functions

 DeviceConnectedListener ()
 
virtual void onDeviceConnected (const DeviceInfo *)=0
 
virtual ~DeviceConnectedListener ()
 

Static Private Member Functions

static void ONI_CALLBACK_TYPE deviceConnectedCallback (const OniDeviceInfo *pInfo, void *pCookie)
 

Private Attributes

OniDeviceCallbacks m_deviceConnectedCallbacks
 
OniCallbackHandle m_deviceConnectedCallbacksHandle
 

Friends

class OpenNI
 

Detailed Description

The OpenNI::DeviceConnectedListener class provides a means of registering for, and responding to when a device is connected.

onDeviceConnected is called whenever a new device is connected to the system (ie this event would be triggered when a new sensor is manually plugged into the host system running the application)

To use this class, you should write a new class that inherits from it, and override the onDeviceConnected method. Once you instantiate your class, use the OpenNI::addDeviceConnectedListener() function to add your listener object to OpenNI's list of listeners. Your handler function will then be called whenever the event occurs. A OpenNI::removeDeviceConnectedListener() function is also provided, if you want to have your class stop listening to these events for any reason.

Definition at line 2002 of file OpenNI.h.

Constructor & Destructor Documentation

openni::OpenNI::DeviceConnectedListener::DeviceConnectedListener ( )
inline

Definition at line 2005 of file OpenNI.h.

virtual openni::OpenNI::DeviceConnectedListener::~DeviceConnectedListener ( )
inlinevirtual

Definition at line 2013 of file OpenNI.h.

Member Function Documentation

static void ONI_CALLBACK_TYPE openni::OpenNI::DeviceConnectedListener::deviceConnectedCallback ( const OniDeviceInfo pInfo,
void *  pCookie 
)
inlinestaticprivate

Definition at line 2030 of file OpenNI.h.

virtual void openni::OpenNI::DeviceConnectedListener::onDeviceConnected ( const DeviceInfo )
pure virtual

Callback function for the onDeviceConnected event. This function will be called whenever this event occurs. When this happens, a pointer to the DeviceInfo object for the newly connected device will be supplied. Note that once a device is removed, if it was opened by a Device object, that object can no longer be used to access the device, even if it was reconnected. Once a device was reconnected, Device::open() should be called again in order to use this device.

If you wish to open the new device as it is connected, simply query the provided DeviceInfo object to obtain the URI of the device, and pass this URI to the Device.Open() function.

Implemented in astra_wrapper::AstraDeviceListener.

Friends And Related Function Documentation

friend class OpenNI
friend

Definition at line 2036 of file OpenNI.h.

Member Data Documentation

OniDeviceCallbacks openni::OpenNI::DeviceConnectedListener::m_deviceConnectedCallbacks
private

Definition at line 2037 of file OpenNI.h.

OniCallbackHandle openni::OpenNI::DeviceConnectedListener::m_deviceConnectedCallbacksHandle
private

Definition at line 2038 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