39 #include <pcl/pcl_config.h>
43 #include "openni_exception.h"
44 #include "openni_device.h"
86 unsigned updateDeviceList ();
92 inline
unsigned getNumberDevices () const noexcept;
102 OpenNIDevice::Ptr createVirtualDevice (const std::
string& path,
bool repeat,
bool stream) const;
118 OpenNIDevice::Ptr getDeviceBySerialNumber (const std::
string& serial_number) const;
128 OpenNIDevice::Ptr getDeviceByAddress (
unsigned char bus,
unsigned char address)
const;
185 unsigned char getBus (
unsigned index)
const noexcept;
209 getDeviceType (
const std::string& connection_string,
unsigned short& vendorId,
unsigned short& productId);
214 DeviceContext (
const xn::NodeInfo& device_node, xn::NodeInfo* image_node, xn::NodeInfo* depth_node, xn::NodeInfo * ir_node);
229 void getDeviceInfos () noexcept;
235 std::map< unsigned char, std::map<unsigned char, unsigned > >
bus_map_;
Class representing an astract device for OpenNI devices: Primesense PSDK, Microsoft Kinect,...
pcl::shared_ptr< OpenNIDevice > Ptr
Driver class implemented as Singleton.
const char * getProductName(unsigned index) const noexcept
method to retrieve the product name of the USB device without creating it.
unsigned getNumberDevices() const noexcept
static void getDeviceType(const std::string &connection_string, unsigned short &vendorId, unsigned short &productId)
decomposes the connection string into vendor id and product id.
static OpenNIDriver & getInstance()
static access method to the only instance.
const char * getSerialNumber(unsigned index) const noexcept
method to retrieve the serial number of a device without creating it.
std::vector< DeviceContext > device_context_
unsigned char getAddress(unsigned index) const noexcept
method to retrieve the vaddress of the USB device without creating it.
unsigned char getBus(unsigned index) const noexcept
method to retrieve the bus id of the USB device without creating it.
std::map< unsigned char, std::map< unsigned char, unsigned > > bus_map_
unsigned short getVendorID(unsigned index) const noexcept
method to retrieve the vendor id of the USB device without creating it.
std::map< std::string, unsigned > serial_map_
~OpenNIDriver() noexcept
virtual Destructor that never throws an exception
void stopAll()
stops all streams from all devices.
const char * getConnectionString(unsigned index) const noexcept
method to retrieve the connection string of a device without creating it.
const char * getVendorName(unsigned index) const noexcept
method to retrieve the vendor name of the USB device without creating it.
OpenNIDevice::Ptr getDevice(unsigned index) const
unsigned short getProductID(unsigned index) const noexcept
method to retrieve the product id of the USB device without creating it.
std::map< std::string, unsigned > connection_string_map_
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.
DeviceContext(const xn::NodeInfo &device_node, xn::NodeInfo *image_node, xn::NodeInfo *depth_node, xn::NodeInfo *ir_node)
std::shared_ptr< xn::NodeInfo > ir_node
DeviceContext(const DeviceContext &)
DeviceContext(const xn::NodeInfo &device_node)
std::shared_ptr< xn::NodeInfo > depth_node
pcl::weak_ptr< OpenNIDevice > device
std::shared_ptr< xn::NodeInfo > image_node