-
Notifications
You must be signed in to change notification settings - Fork 0
/
instrumentoperator.h
65 lines (62 loc) · 1.63 KB
/
instrumentoperator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef INSTRUMENTOPERATOR_H
#define INSTRUMENTOPERATOR_H
#include <QObject>
#include <QList>
#include <QMap>
#include <memory>
#include <QJsonObject>
#include <QJsonArray>
#include "Responses/response.h"
/**
* @projectName SITS
* @brief 抽象类,所有测试模块的子类
* @author YangAn
* @date 2020-06-30
* @Email yangan@AutoBio.com.cn
*/
class Command;
class CommunicationCore;
class InstrumentOperator : public QObject
{
Q_OBJECT
public:
explicit InstrumentOperator(QObject *parent = nullptr);
protected:
/**
* @brief _commandList 命令序列
*/
QList<std::shared_ptr<Command>>_commandList;
/**
* @brief _responseList 响应序列
*/
QList<std::shared_ptr<Response>> _responseList;
QList<std::shared_ptr<Response>> _statusList;
/**
* @brief _core 通讯核心指针
*/
CommunicationCore *_core;
/**
* @brief _isSimulation 虚拟模式
*/
const bool _isSimulation = false;
protected:
/**
* @brief generateCommandList 产生命令序列
* @return 命令条数
*/
virtual int generateCommandList();
/**
* @brief insertCommandList 将测试模块命令序列插入到通讯核心命令序列
*/
virtual void insertCommandList();
public slots:
/**
* @brief getResponse 槽函数:接收从Command返回的应答信息,应在子类中继承
* @param response 应答信息必须注册为Qt元数据
*/
virtual void getResponse(std::shared_ptr<Response> response);
public:
virtual void getStatus(std::shared_ptr<Response> response);
signals:
};
#endif // INSTRUMENTOPERATOR_H