Manager.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * @Description:
  3. * @Version: 1.0
  4. * @Autor: lishengyin
  5. * @Date: 2022-01-11 11:47:37
  6. * @LastEditors: lishengyin
  7. * @LastEditTime: 2022-01-11 14:40:35
  8. */
  9. #pragma once
  10. #include <iostream>
  11. #include <iostream>
  12. #include <map>
  13. #include <time.h>
  14. #include <dirent.h>
  15. #include <time.h>
  16. #include <cstdlib>
  17. #include <dirent.h>
  18. #include <sys/types.h>
  19. #include <sys/stat.h>
  20. #include <unistd.h>
  21. #include "Util/logger.h"
  22. #include "Util/NoticeCenter.h"
  23. #include "Poller/EventPoller.h"
  24. #include "Player/PlayerProxy.h"
  25. #include "Rtmp/RtmpPusher.h"
  26. #include "Common/config.h"
  27. #include "Pusher/MediaPusher.h"
  28. #include "Extension/Frame.h"
  29. #include "Util/SqlPool.h"
  30. #include "Network/TcpClient.h"
  31. #include "Poller/Timer.h"
  32. #include "monitor.h"
  33. #include "Notices.h"
  34. #include "inference.h"
  35. #include "deviceState.h"
  36. using namespace toolkit;
  37. using namespace std;
  38. namespace MIVA{
  39. class Manager
  40. {
  41. private:
  42. int MemoryThreshold;
  43. int TempThreshold;
  44. public:
  45. Manager();
  46. ~Manager();
  47. /**
  48. * @description: 创建实例
  49. * @param {*}
  50. * @return {*}
  51. */
  52. static std::shared_ptr<Manager> CreateNew();
  53. /**
  54. * @description: 设置MemoryThreshold
  55. * @param {int} MemoryThreshold
  56. * @return {*}
  57. */
  58. void setMemoryThreshold(int memoryThreshold);
  59. /**
  60. * @description: 设置温度阈值
  61. * @param {int} TempThreshold
  62. * @return {*}
  63. */
  64. void setTempThreshold(int tempThreshold);
  65. /**
  66. * @description: 获取启动资格
  67. * @param {*}
  68. * @return {*}
  69. */
  70. int32_t getStartPower();
  71. /**
  72. * @description: 获取停止的资格
  73. * @param {*}
  74. * @return {*}
  75. */
  76. int32_t getStopPower();
  77. /**
  78. * @description: 获取清理的资格
  79. * @param {*}
  80. * @return {*}
  81. */
  82. int32_t getClearPower();
  83. /**
  84. * @description: 获取同步数据的资格
  85. * @param {*}
  86. * @return {*}
  87. */
  88. int32_t getSyncDataPower();
  89. /**
  90. * @description: 获取上层数据的资格
  91. * @param {*}
  92. * @return {*}
  93. */
  94. int32_t getHostDataPower();
  95. public:
  96. using Ptr = std::shared_ptr<Manager>;
  97. };
  98. }