#ifndef PROGUNIT_H #define PROGUNIT_H #include #include #include #include // Used For Program Monitor #include "cpumem.h" #include "QtDBus/QDBusMessage" #include "QtDBus/QDBusConnection" class ProgUnit { public: /* Launch Name */ std::string strlaunch; /* App Directory */ std::string strappdir; /* App modulename */ std::string strmodulename; /* Is Auto Start */ bool mbautostart; /* App Execution Command */ std::string strcmd; /* Group Name */ std::string strgroup; /* Process */ QProcess * mProcess; /* run state */ bool mbRun = false; /* processid */ qint64 mpid; /* Start Count */ int mnStartCount = 0; /* CPU */ float mfCPU; /* Mem (Unit M)*/ float mfMem; /* Thread Num */ int mnThread; int state;//模块调度设定运行状态:0 停止,1 启动 QTime timeRec;//当前时间 int count;//次数 bool mbSavestdout = false; unsigned long mnLastCPUTotal = 0; unsigned long mnLastProcTotal = 0; public: /* Get CPU Mem Thread */ void UpdateResState(); }; #endif // PROGUNIT_H