1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #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 = 0;
- qint64 mpid_launch;
- /* 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;
- QProcess * mProcessGetpid;
- public:
- /* Get CPU Mem Thread */
- void UpdateResState();
- };
- #endif // PROGUNIT_H
|