You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.4 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __LRF_SENSORS_ENUMIRATOR_H_INCL__
  2. #define __LRF_SENSORS_ENUMIRATOR_H_INCL__
  3. #ifndef __linux__
  4. #include <winsock2.h>
  5. #include <ws2tcpip.h>
  6. #endif
  7. #include "../base/basicLogCollection.h"
  8. #include "../base/basicSettingsProvider.h"
  9. #include "objectLGS.h"
  10. #define BSI_TAG_SENSOR_TYPE "SENSOR_TYPE"
  11. #define BSI_TAG_CONNECTION_TYPE "CONNECTION_TYPE"
  12. /**
  13. * TODO: Add class description
  14. *
  15. * @author Gagua
  16. */
  17. class objectSensorsEnumirator {
  18. private:
  19. basicLogCollection *m_pLog;
  20. config_setting_t *m_pSettings;
  21. vectorSensors m_vSensors;
  22. public:
  23. // Method to fetch singleton instance.
  24. static objectSensorsEnumirator* getInstance();
  25. // Destructor
  26. virtual ~objectSensorsEnumirator();
  27. bool isUsed( int id);
  28. objectLGS *addSensor( SENSOR_INFO *SRC);
  29. //bool addSource( basicMediaSource *SRC );
  30. size_t getCount( void );
  31. objectLGS *getSensor( int index );
  32. protected:
  33. // Constructor - protected so users cannot call it.
  34. objectSensorsEnumirator();
  35. private:
  36. bool loadDefinedSensors(void);
  37. // private static member referencing the single instance of the object
  38. // TODO: Replace mediaVideoSourceManager with the type of object you want to
  39. // return the single instance of
  40. static objectSensorsEnumirator* _instance;
  41. // Copy constructor
  42. // Declared but not defined to prevent auto-generated
  43. // copy constructor. Refer to "Effective C++" by Meyers
  44. // SensorsEnumirator(const mediaVideoSourceManager& src);
  45. // Assignment operator
  46. // Declared but not defined to prevent auto-generated
  47. // assignment operator. Refer to "Effective C++" by Meyers
  48. // SensorsEnumirator& operator=(const mediaVideoSourceManager& src);
  49. };
  50. // TODO: Uncomment the copy constructor when you need it.
  51. //inline mediaVideoSourceManager::mediaVideoSourceManager(const mediaVideoSourceManager& src)
  52. //{
  53. // // TODO: copy
  54. //}
  55. // TODO: Uncomment the assignment operator when you need it.
  56. //inline mediaVideoSourceManager& mediaVideoSourceManager::operator=(const mediaVideoSourceManager& rhs)
  57. //{
  58. // if (this == &rhs) {
  59. // return *this;
  60. // }
  61. //
  62. // // TODO: assignment
  63. //
  64. // return *this;
  65. //}
  66. #endif // __MEDIAVIDEOSOURCEMANAGER_H_INCL__