|
|
@ -30,12 +30,12 @@ public:
|
|
|
|
waitTime = time;
|
|
|
|
waitTime = time;
|
|
|
|
expectedOutputs = QStringList();
|
|
|
|
expectedOutputs = QStringList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ReturnTrigger(QStringList outputs)
|
|
|
|
ReturnTrigger(const QStringList& outputs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
waitTime = 10000;
|
|
|
|
waitTime = 10000;
|
|
|
|
expectedOutputs = outputs;
|
|
|
|
expectedOutputs = outputs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ReturnTrigger(unsigned long time, QStringList outputs)
|
|
|
|
ReturnTrigger(unsigned long time, const QStringList& outputs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
waitTime = time;
|
|
|
|
waitTime = time;
|
|
|
|
expectedOutputs = outputs;
|
|
|
|
expectedOutputs = outputs;
|
|
|
@ -46,12 +46,12 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
explicit Util(QObject *parent = nullptr);
|
|
|
|
explicit Util(QObject *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
|
|
void execCMD(QString cmd);
|
|
|
|
void execCMD(const QString& cmd);
|
|
|
|
QString execCMDWithOutput(QString cmd, ReturnTrigger trigger = 10000);
|
|
|
|
QString execCMDWithOutput(const QString& cmd, ReturnTrigger trigger = 10000);
|
|
|
|
void delay(unsigned int msec);
|
|
|
|
void delay(unsigned int msec);
|
|
|
|
ClientType getClientType();
|
|
|
|
ClientType getClientType();
|
|
|
|
public slots:
|
|
|
|
public slots:
|
|
|
|
void processOutput(QString output);
|
|
|
|
void processOutput(const QString& output);
|
|
|
|
void setClientType(Util::ClientType clientType);
|
|
|
|
void setClientType(Util::ClientType clientType);
|
|
|
|
void setRunningState(bool st);
|
|
|
|
void setRunningState(bool st);
|
|
|
|
|
|
|
|
|
|
|
@ -63,7 +63,7 @@ private:
|
|
|
|
ClientType clientType;
|
|
|
|
ClientType clientType;
|
|
|
|
signals:
|
|
|
|
signals:
|
|
|
|
void refreshOutput(const QString& output);
|
|
|
|
void refreshOutput(const QString& output);
|
|
|
|
void write(QString data);
|
|
|
|
void write(QString data); // connected to PM3Process::write(QString data);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // UTIL_H
|
|
|
|
#endif // UTIL_H
|
|
|
|