You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
660 B

11 months ago
#ifndef CSCI_OPERATOR_H
#define CSCI_OPERATOR_H
11 months ago
#include <QVariant>
#include <QCryptographicHash>
11 months ago
class Operator {
11 months ago
private:
int _modeType;
int _signalType;
QMap<QString, QVariant> _params;
QString _paramsHash;
11 months ago
11 months ago
QString _motionLib;
QString _signalLib;
11 months ago
11 months ago
QList<QVariant> _states;
11 months ago
11 months ago
private:
11 months ago
11 months ago
void _deduceMotionLib();
11 months ago
11 months ago
void _deduceSignalLib();
11 months ago
11 months ago
QString _hash();
11 months ago
11 months ago
public:
11 months ago
11 months ago
/// 初始化
void init(int modelType, int signalType, const QMap<QString, QVariant>& params);
11 months ago
11 months ago
/// 更新
void update();
11 months ago
11 months ago
/// 上报状态
QVariant report(int beat);
11 months ago
11 months ago
bool shouldUpdate();
11 months ago
};
#endif //CSCI_OPERATOR_H