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.

84 lines
2.1 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. {
  19. private:
  20. basicLogCollection * m_pLog;
  21. config_setting_t * m_pSettings;
  22. vectorSensors m_vSensors;
  23. public:
  24. // Method to fetch singleton instance.
  25. static objectSensorsEnumirator * getInstance();
  26. // Destructor
  27. virtual ~objectSensorsEnumirator();
  28. bool isUsed(int id);
  29. objectLGS * addSensor(SENSOR_INFO * SRC);
  30. // bool addSource( basicMediaSource *SRC );
  31. size_t getCount(void);
  32. objectLGS * getSensor(int index);
  33. protected:
  34. // Constructor - protected so users cannot call it.
  35. objectSensorsEnumirator();
  36. private:
  37. bool loadDefinedSensors(void);
  38. // private static member referencing the single instance of the object
  39. // TODO: Replace mediaVideoSourceManager with the type of object you want to
  40. // return the single instance of
  41. static objectSensorsEnumirator * _instance;
  42. // Copy constructor
  43. // Declared but not defined to prevent auto-generated
  44. // copy constructor. Refer to "Effective C++" by Meyers
  45. // SensorsEnumirator(const mediaVideoSourceManager& src);
  46. // Assignment operator
  47. // Declared but not defined to prevent auto-generated
  48. // assignment operator. Refer to "Effective C++" by Meyers
  49. // SensorsEnumirator& operator=(const mediaVideoSourceManager& src);
  50. };
  51. // TODO: Uncomment the copy constructor when you need it.
  52. // inline mediaVideoSourceManager::mediaVideoSourceManager(const mediaVideoSourceManager& src)
  53. //{
  54. // // TODO: copy
  55. //}
  56. // TODO: Uncomment the assignment operator when you need it.
  57. // inline mediaVideoSourceManager& mediaVideoSourceManager::operator=(const mediaVideoSourceManager& rhs)
  58. //{
  59. // if (this == &rhs) {
  60. // return *this;
  61. // }
  62. //
  63. // // TODO: assignment
  64. //
  65. // return *this;
  66. //}
  67. #endif // __MEDIAVIDEOSOURCEMANAGER_H_INCL__