init
This commit is contained in:
39
device/deviceinfo.h
Normal file
39
device/deviceinfo.h
Normal 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
|
||||
Reference in New Issue
Block a user