Newer
Older
Malaurie Bernard
committed
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
78
79
80
81
82
#include "syringefilled.h"
//SET METHODES
void SyringeFilled :: set_exchange_throughput_uL_per_sec(float exchange_throughput_uL_per_sec)
{
SyringeFilledJSON["throughput_uL_per_sec"] = exchange_throughput_uL_per_sec;
}
void SyringeFilled :: set_exchange_volume_mL(float exchange_volume_mL)
{
SyringeFilledJSON["exchange_volume_mL"] = exchange_volume_mL;
}
void SyringeFilled :: set_remaining_volume_mL(float remaining_volume_mL)
{
SyringeFilledJSON["remaining_volume_mL"] = remaining_volume_mL;
}
void SyringeFilled :: set_push(bool push)
{
SyringeFilledJSON["push"] = push;
}
void SyringeFilled :: set_id(int* id){
SyringeFilledJSON["id"] = id;
}
//GET METHODES
float SyringeFilled :: get_exchange_throughput_uL_per_sec()
{
return SyringeFilledJSON["exchange_throughput_uL_per_sec"].as<float>();
}
float SyringeFilled :: get_exchange_volume_mL()
{
return SyringeFilledJSON["exchange_volume_mL"].as<float>();
}
float SyringeFilled :: get_remaining_volume_mL()
{
return SyringeFilledJSON["remaining_volume_mL"].as<float>();
}
bool SyringeFilled :: get_push()
{
return SyringeFilledJSON["push"].as<bool>();
}
int* SyringeFilled :: get_id()
{
return SyringeFilledJSON["id"].as<int*>();
}
void SyringeFilled :: setupJsonSyringeFilled(float exchange_throughput_uL_per_sec, float exchange_volume_mL, float remaining_volume_mL, bool push, int* id)
{
//ADD INITIALISATION VALUES TO THE DOC
SyringeFilledJSON["exchange_throughput_uL_per_sec"] = exchange_throughput_uL_per_sec;
SyringeFilledJSON["exchange_volume_mL"] = exchange_volume_mL;
SyringeFilledJSON["remaining_volume_mL"] = remaining_volume_mL;
SyringeFilledJSON["push"] = push;
SyringeFilledJSON["id"] = SyringeJSON["id"];
//GENERATE THE MINIFIED JSON AND SEND IT TO THE SERIAL PORT
serializeJson(SyringeFilledJSON, Serial);
}