40 lines
991 B
C++
40 lines
991 B
C++
#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
|