123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef PROGUNIT_H
- #define PROGUNIT_H
- #include <QProcess>
- #include <QThread>
- #include <vector>
- #include <QtXml>
- // 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
|