-
Notifications
You must be signed in to change notification settings - Fork 0
/
syringecontroller.h
77 lines (49 loc) · 1.58 KB
/
syringecontroller.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
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef SYRINGECONTROLLER_H
#define SYRINGECONTROLLER_H
// Windows
#include <windows.h>
// Program specific
#include <mainmodel.h>
#include <mainview.h>
class SyringeController : public QObject
{
Q_OBJECT
public:
SyringeController(MainModel* main_model, MainView* main_view);
void setup_connections();
QThread* syringe_thread_;
public slots:
// Model commands
void receive_request_set_local();
void receive_request_set_remote();
void receive_request_set_forward();
void receive_request_set_stop();
void receive_request_set_reverse();
void receive_request_switch_direction();
void receive_request_get_rate();
void receive_request_set_rate();
// View commands
void receive_state_update_model_operating_mode_local();
void receive_state_update_model_operating_mode_remote();
void receive_state_update_model_direction_forward();
void receive_state_update_model_direction_reverse();
void receive_state_update_model_motion_moving();
void receive_state_update_model_motion_stopped();
void receive_state_update_model_rate(double rate);
// Syringe commands
signals:
void command_syringe_set_local();
void command_syringe_set_remote();
void command_syringe_set_forward();
void command_syringe_set_stop();
void command_syringe_set_reverse();
void command_syringe_switch_direction();
void command_syringe_get_rate();
void command_syringe_set_rate(QString rate);
private:
// Handles
MainModel* main_model_;
MainView* main_view_;
// Methods
};
#endif // SYRINGECONTROLLER_H