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

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