Driver class implemented as Singleton.
More...
#include <pcl/io/openni_camera/openni_driver.h>
|
| ~OpenNIDriver () noexcept |
| virtual Destructor that never throws an exception More...
|
|
unsigned | updateDeviceList () |
| enumerates all devices and updates the list of available devices. More...
|
|
unsigned | getNumberDevices () const noexcept |
|
OpenNIDevice::Ptr | createVirtualDevice (const std::string &path, bool repeat, bool stream) const |
| creates a virtual device from an ONI file. More...
|
|
OpenNIDevice::Ptr | getDeviceByIndex (unsigned index) const |
| returns the device with a given index, where the index is its position in the device list. More...
|
|
OpenNIDevice::Ptr | getDeviceBySerialNumber (const std::string &serial_number) const |
| returns the device with the given serial number. More...
|
|
const char * | getSerialNumber (unsigned index) const noexcept |
| method to retrieve the serial number of a device without creating it. More...
|
|
const char * | getConnectionString (unsigned index) const noexcept |
| method to retrieve the connection string of a device without creating it. More...
|
|
const char * | getVendorName (unsigned index) const noexcept |
| method to retrieve the vendor name of the USB device without creating it. More...
|
|
const char * | getProductName (unsigned index) const noexcept |
| method to retrieve the product name of the USB device without creating it. More...
|
|
unsigned short | getVendorID (unsigned index) const noexcept |
| method to retrieve the vendor id of the USB device without creating it. More...
|
|
unsigned short | getProductID (unsigned index) const noexcept |
| method to retrieve the product id of the USB device without creating it. More...
|
|
unsigned char | getBus (unsigned index) const noexcept |
| method to retrieve the bus id of the USB device without creating it. More...
|
|
unsigned char | getAddress (unsigned index) const noexcept |
| method to retrieve the vaddress of the USB device without creating it. More...
|
|
void | stopAll () |
| stops all streams from all devices. More...
|
|
|
static OpenNIDriver & | getInstance () |
| static access method to the only instance. More...
|
|
static void | getDeviceType (const std::string &connection_string, unsigned short &vendorId, unsigned short &productId) |
| decomposes the connection string into vendor id and product id. More...
|
|
Driver class implemented as Singleton.
This class contains the xn::Context object used by all devices. It \ provides methods for enumerating and accessing devices.
- Author
- Suat Gedikli
- Date
- 02.january 2011
Definition at line 65 of file openni_driver.h.
◆ ~OpenNIDriver()
openni_wrapper::OpenNIDriver::~OpenNIDriver |
( |
| ) |
|
|
noexcept |
virtual Destructor that never throws an exception
- Author
- Suat Gedikli
◆ OpenNIDriver()
openni_wrapper::OpenNIDriver::OpenNIDriver |
( |
| ) |
|
|
protected |
◆ createVirtualDevice()
OpenNIDevice::Ptr openni_wrapper::OpenNIDriver::createVirtualDevice |
( |
const std::string & |
path, |
|
|
bool |
repeat, |
|
|
bool |
stream |
|
) |
| const |
creates a virtual device from an ONI file.
- Author
- Suat Gedikli
- Parameters
-
[in] | path | the path to the ONI file |
[in] | repeat | whether the ONI playback should be repeated in an infinite loop or not. |
[in] | stream | whether the device should be created as a streaming or trigger-based device. |
- Returns
- the shared_ptr to the newly created virtual device.
◆ getAddress()
unsigned char openni_wrapper::OpenNIDriver::getAddress |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the vaddress of the USB device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the address of the USB device.
◆ getBus()
unsigned char openni_wrapper::OpenNIDriver::getBus |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the bus id of the USB device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the bus id of the USB device.
◆ getConnectionString()
const char* openni_wrapper::OpenNIDriver::getConnectionString |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the connection string of a device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the connection string of the device.
◆ getDevice()
◆ getDeviceByIndex()
OpenNIDevice::Ptr openni_wrapper::OpenNIDriver::getDeviceByIndex |
( |
unsigned |
index | ) |
const |
returns the device with a given index, where the index is its position in the device list.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | index of the device to be retrieved. |
- Returns
- shared_ptr to the device, null if no matching device found.
◆ getDeviceBySerialNumber()
OpenNIDevice::Ptr openni_wrapper::OpenNIDriver::getDeviceBySerialNumber |
( |
const std::string & |
serial_number | ) |
const |
returns the device with the given serial number.
- Author
- Suat Gedikli
- Parameters
-
[in] | serial_number | the serial number of the device to be retrieved. |
- Returns
- shared_ptr to the device, null if no matching device found.
◆ getDeviceType()
static void openni_wrapper::OpenNIDriver::getDeviceType |
( |
const std::string & |
connection_string, |
|
|
unsigned short & |
vendorId, |
|
|
unsigned short & |
productId |
|
) |
| |
|
static |
decomposes the connection string into vendor id and product id.
- Author
- Suat Gedikli
- Parameters
-
[in] | connection_string | the string containing the connection information |
[out] | vendorId | the vendor id |
[out] | productId | the product id |
◆ getInstance()
OpenNIDriver & openni_wrapper::OpenNIDriver::getInstance |
( |
| ) |
|
|
inlinestatic |
static access method to the only instance.
- Author
- Suat Gedikli
- Returns
- the only instance of this class.
Definition at line 241 of file openni_driver.h.
◆ getNumberDevices()
unsigned openni_wrapper::OpenNIDriver::getNumberDevices |
( |
| ) |
const |
|
inlinenoexcept |
◆ getProductID()
unsigned short openni_wrapper::OpenNIDriver::getProductID |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the product id of the USB device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the product id of the USB device.
◆ getProductName()
const char* openni_wrapper::OpenNIDriver::getProductName |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the product name of the USB device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the product name of the USB device.
◆ getSerialNumber()
const char* openni_wrapper::OpenNIDriver::getSerialNumber |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the serial number of a device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the serial number of the device.
◆ getVendorID()
unsigned short openni_wrapper::OpenNIDriver::getVendorID |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the vendor id of the USB device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the vendor id of the USB device.
◆ getVendorName()
const char* openni_wrapper::OpenNIDriver::getVendorName |
( |
unsigned |
index | ) |
const |
|
noexcept |
method to retrieve the vendor name of the USB device without creating it.
- Author
- Suat Gedikli
- Parameters
-
[in] | index | the index of the device in the device list. |
- Returns
- the vendor name of the USB device.
◆ stopAll()
void openni_wrapper::OpenNIDriver::stopAll |
( |
| ) |
|
stops all streams from all devices.
- Author
- Suat Gedikli
◆ updateDeviceList()
unsigned openni_wrapper::OpenNIDriver::updateDeviceList |
( |
| ) |
|
enumerates all devices and updates the list of available devices.
- Author
- Suat Gedikli
- Returns
- the number of devices found.
◆ bus_map_
std::map< unsigned char, std::map<unsigned char, unsigned > > openni_wrapper::OpenNIDriver::bus_map_ |
|
protected |
◆ connection_string_map_
std::map< std::string, unsigned > openni_wrapper::OpenNIDriver::connection_string_map_ |
|
protected |
◆ context_
xn::Context openni_wrapper::OpenNIDriver::context_ |
|
mutableprotected |
◆ device_context_
std::vector<DeviceContext> openni_wrapper::OpenNIDriver::device_context_ |
|
mutableprotected |
◆ serial_map_
std::map< std::string, unsigned > openni_wrapper::OpenNIDriver::serial_map_ |
|
protected |
The documentation for this class was generated from the following file: