This commit is contained in:
Chenwenxuan
2024-03-06 14:54:30 +08:00
commit edac2715f0
1525 changed files with 809982 additions and 0 deletions

39
device/deviceinfo.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef DEVICEINFO_H
#define DEVICEINFO_H
#include<QObject>
#include"base.h"
#define DEVICE_INFO DeviceInfo::instance()
class DeviceInfo:public QObject
{
Q_OBJECT
public:
static DeviceInfo* instance();
static void deleteInstance();
//dm add
void printDeviceSystemInfo(const QString text,SYS_INFO_LEVEL level=D_NOTHING);
void printDeviceSalamInfo(const QString text,SYS_INFO_LEVEL level=D_CRITICAL);
signals:
void deviceSystemInfoSGL(const QString,SYS_INFO_LEVEL level);
void deviceSalamInfoSGL(const QString,SYS_INFO_LEVEL level);
private:
DeviceInfo();
DeviceInfo(const DeviceInfo&)=delete;
DeviceInfo& operator = (const DeviceInfo&)=delete;
DeviceInfo(DeviceInfo&&)=delete;
DeviceInfo& operator = (DeviceInfo&&)=delete;
void printAlarm(const char* format ...);
void printInfo(const char* format ...);
private:
static DeviceInfo* uniqueInstance;
FILE* streamInfo;
FILE* streamAlarm;
};
#endif // DEVICEINFO_H