Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef OPENNI2_DEVICE_MANAGER_H_
00033 #define OPENNI2_DEVICE_MANAGER_H_
00034
00035 #include "openni2_camera/openni2_device_info.h"
00036
00037 #include <boost/thread/mutex.hpp>
00038
00039 #include <vector>
00040 #include <string>
00041 #include <ostream>
00042
00043 namespace openni2_wrapper
00044 {
00045
00046 class OpenNI2DeviceListener;
00047 class OpenNI2Device;
00048
00049 class OpenNI2DeviceManager
00050 {
00051 public:
00052 OpenNI2DeviceManager();
00053 virtual ~OpenNI2DeviceManager();
00054
00055 static boost::shared_ptr<OpenNI2DeviceManager> getSingelton();
00056
00057 boost::shared_ptr<std::vector<OpenNI2DeviceInfo> > getConnectedDeviceInfos() const;
00058 boost::shared_ptr<std::vector<std::string> > getConnectedDeviceURIs() const;
00059 std::size_t getNumOfConnectedDevices() const;
00060
00061 boost::shared_ptr<OpenNI2Device> getAnyDevice();
00062 boost::shared_ptr<OpenNI2Device> getDevice(const std::string& device_URI);
00063
00064 std::string getSerial(const std::string& device_URI) const;
00065
00066 protected:
00067 boost::shared_ptr<OpenNI2DeviceListener> device_listener_;
00068
00069 static boost::shared_ptr<OpenNI2DeviceManager> singelton_;
00070 };
00071
00072
00073 std::ostream& operator <<(std::ostream& stream, const OpenNI2DeviceManager& device_manager);
00074
00075 }
00076
00077 #endif