Point Cloud Library (PCL)
1.7.0
|
Driver class implemented as Singleton. More...
#include <pcl/io/openni_camera/openni_driver.h>
Classes | |
struct | DeviceContext |
Public Member Functions | |
~OpenNIDriver () throw () | |
virtual Destructor that never throws an exception | |
unsigned | updateDeviceList () |
enumerates all devices and updates the list of available devices. | |
unsigned | getNumberDevices () const throw () |
boost::shared_ptr< OpenNIDevice > | createVirtualDevice (const std::string &path, bool repeat, bool stream) const |
creates a virtual device from an ONI file. | |
boost::shared_ptr< OpenNIDevice > | getDeviceByIndex (unsigned index) const |
returns the device with a given index, where the index is its position in the device list. | |
boost::shared_ptr< OpenNIDevice > | getDeviceBySerialNumber (const std::string &serial_number) const |
returns the device with the given serial number. | |
boost::shared_ptr< OpenNIDevice > | getDeviceByAddress (unsigned char bus, unsigned char address) const |
returns the device that is given by the USB bus/address combination. | |
const char * | getSerialNumber (unsigned index) const throw () |
method to retrieve the serial number of a device without creating it. | |
const char * | getConnectionString (unsigned index) const throw () |
method to retrieve the connection string of a device without creating it. | |
const char * | getVendorName (unsigned index) const throw () |
method to retrieve the vendor name of the USB device without creating it. | |
const char * | getProductName (unsigned index) const throw () |
method to retrieve the product name of the USB device without creating it. | |
unsigned short | getVendorID (unsigned index) const throw () |
method to retrieve the vendor id of the USB device without creating it. | |
unsigned short | getProductID (unsigned index) const throw () |
method to retrieve the product id of the USB device without creating it. | |
unsigned char | getBus (unsigned index) const throw () |
method to retrieve the bus id of the USB device without creating it. | |
unsigned char | getAddress (unsigned index) const throw () |
method to retrieve the vaddress of the USB device without creating it. | |
void | stopAll () |
stops all streams from all devices. | |
Static Public Member Functions | |
static OpenNIDriver & | getInstance () |
static access method to the only instance. | |
static void | getDeviceType (const std::string &connection_string, unsigned short &vendorId, unsigned short &productId) |
decomposes the connection string into vendor id and product id. | |
Protected Member Functions | |
OpenNIDriver () | |
boost::shared_ptr< OpenNIDevice > | getDevice (unsigned index) const |
void | getDeviceInfos () throw () |
Protected Attributes | |
std::vector< DeviceContext > | device_context_ |
xn::Context | context_ |
std::map< unsigned char, std::map< unsigned char, unsigned > > | bus_map_ |
std::map< std::string, unsigned > | serial_map_ |
std::map< std::string, unsigned > | connection_string_map_ |
Driver class implemented as Singleton.
This class contains the xn::Context object used by all devices. It \ provides methods for enumerating and accessing devices.
Definition at line 62 of file openni_driver.h.
openni_wrapper::OpenNIDriver::~OpenNIDriver | ( | ) | throw () |
virtual Destructor that never throws an exception
openni_wrapper::OpenNIDriver::OpenNIDriver | ( | ) | [protected] |
boost::shared_ptr<OpenNIDevice> openni_wrapper::OpenNIDriver::createVirtualDevice | ( | const std::string & | path, |
bool | repeat, | ||
bool | stream | ||
) | const |
creates a virtual device from an ONI file.
[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. |
unsigned char openni_wrapper::OpenNIDriver::getAddress | ( | unsigned | index | ) | const throw () |
method to retrieve the vaddress of the USB device without creating it.
[in] | index | the index of the device in the device list. |
unsigned char openni_wrapper::OpenNIDriver::getBus | ( | unsigned | index | ) | const throw () |
method to retrieve the bus id of the USB device without creating it.
[in] | index | the index of the device in the device list. |
const char* openni_wrapper::OpenNIDriver::getConnectionString | ( | unsigned | index | ) | const throw () |
method to retrieve the connection string of a device without creating it.
[in] | index | the index of the device in the device list. |
boost::shared_ptr<OpenNIDevice> openni_wrapper::OpenNIDriver::getDevice | ( | unsigned | index | ) | const [protected] |
boost::shared_ptr<OpenNIDevice> openni_wrapper::OpenNIDriver::getDeviceByAddress | ( | unsigned char | bus, |
unsigned char | address | ||
) | const |
returns the device that is given by the USB bus/address combination.
[in] | bus | the USB bus id |
[in] | address | the USB address |
boost::shared_ptr<OpenNIDevice> openni_wrapper::OpenNIDriver::getDeviceByIndex | ( | unsigned | index | ) | const |
returns the device with a given index, where the index is its position in the device list.
[in] | index | index of the device to be retrieved. |
boost::shared_ptr<OpenNIDevice> openni_wrapper::OpenNIDriver::getDeviceBySerialNumber | ( | const std::string & | serial_number | ) | const |
returns the device with the given serial number.
[in] | serial_number | the serial number of the device to be retrieved. |
void openni_wrapper::OpenNIDriver::getDeviceInfos | ( | ) | throw () [protected] |
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.
[in] | connection_string | the string containing teh connection information |
[out] | vendorId | the vendor id |
[out] | productId | the product id |
OpenNIDriver & openni_wrapper::OpenNIDriver::getInstance | ( | ) | [inline, static] |
static access method to the only instance.
Definition at line 238 of file openni_driver.h.
unsigned openni_wrapper::OpenNIDriver::getNumberDevices | ( | ) | const throw () [inline] |
Definition at line 245 of file openni_driver.h.
References device_context_.
unsigned short openni_wrapper::OpenNIDriver::getProductID | ( | unsigned | index | ) | const throw () |
method to retrieve the product id of the USB device without creating it.
[in] | index | the index of the device in the device list. |
const char* openni_wrapper::OpenNIDriver::getProductName | ( | unsigned | index | ) | const throw () |
method to retrieve the product name of the USB device without creating it.
[in] | index | the index of the device in the device list. |
const char* openni_wrapper::OpenNIDriver::getSerialNumber | ( | unsigned | index | ) | const throw () |
method to retrieve the serial number of a device without creating it.
[in] | index | the index of the device in the device list. |
unsigned short openni_wrapper::OpenNIDriver::getVendorID | ( | unsigned | index | ) | const throw () |
method to retrieve the vendor id of the USB device without creating it.
[in] | index | the index of the device in the device list. |
const char* openni_wrapper::OpenNIDriver::getVendorName | ( | unsigned | index | ) | const throw () |
method to retrieve the vendor name of the USB device without creating it.
[in] | index | the index of the device in the device list. |
stops all streams from all devices.
unsigned openni_wrapper::OpenNIDriver::updateDeviceList | ( | ) |
enumerates all devices and updates the list of available devices.
std::map< unsigned char, std::map<unsigned char, unsigned > > openni_wrapper::OpenNIDriver::bus_map_ [protected] |
Definition at line 232 of file openni_driver.h.
std::map< std::string, unsigned > openni_wrapper::OpenNIDriver::connection_string_map_ [protected] |
Definition at line 234 of file openni_driver.h.
xn::Context openni_wrapper::OpenNIDriver::context_ [mutable, protected] |
Definition at line 230 of file openni_driver.h.
std::vector<DeviceContext> openni_wrapper::OpenNIDriver::device_context_ [mutable, protected] |
Definition at line 229 of file openni_driver.h.
Referenced by getNumberDevices().
std::map< std::string, unsigned > openni_wrapper::OpenNIDriver::serial_map_ [protected] |
Definition at line 233 of file openni_driver.h.