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