1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- /*
- * @Description:
- * @Version: 1.0
- * @Autor: lishengyin
- * @Date: 2022-01-11 10:44:52
- * @LastEditors: lishengyin
- * @LastEditTime: 2022-01-11 14:42:56
- */
- #pragma once
- #include <iostream>
- #include <iostream>
- #include <map>
- #include <time.h>
- #include <dirent.h>
- #include <time.h>
- #include <cstdlib>
- #include <dirent.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
- #include "Util/logger.h"
- #include "Util/NoticeCenter.h"
- #include "Poller/EventPoller.h"
- #include "Player/PlayerProxy.h"
- #include "Rtmp/RtmpPusher.h"
- #include "Common/config.h"
- #include "Pusher/MediaPusher.h"
- #include "Extension/Frame.h"
- #include "Util/SqlPool.h"
- #include "Network/TcpClient.h"
- #include "Poller/Timer.h"
- #include "monitor.h"
- #include <mutex>
- using namespace toolkit;
- using namespace std;
- namespace MIVA
- {
- class deviceState
- {
- public:
- using Ptr = std::shared_ptr<deviceState>;
- int CpuUsage;
- int GpuUsage;
- int MemoryUsage;
- int Temp;
- int FdUsage;
-
- public:
- deviceState();
- ~deviceState();
- /**
- * @description: 创建实例
- * @param {*}
- * @return {*}
- */
- static std::shared_ptr<deviceState> CreateNew();
- /**
- * @description: 获取设备数据
- * @param {*}
- * @return {*}
- */
- int32_t getDeviceState();
- /**
- * @description: 同步设备数据
- * @param {*}
- * @return {*}
- */
- int32_t SyncDeviceState(std::string& Ctime);
- private:
- mutex m_mutex;
- };
- } // namespace MIVA
|