-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal_attributes.py
More file actions
128 lines (120 loc) · 3.79 KB
/
global_attributes.py
File metadata and controls
128 lines (120 loc) · 3.79 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# -*-coding:utf-8 -*-
import os
import sys
current_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.append(current_dir)
sys.path.append("..")
lvp_project_path = 'C:/Users/MSHALWang/Desktop/Workspace/C9LVPProject/PumpLibrary/'
lvp_project_dll_path = r'C:/Users/MSHALWang/Desktop/Workspace/C9LVPProject/PumpLibrary/ParserProtocol/ProtocolParser_x64.dll'
PRODUCT_ID = 0x02
def getCommandFormat():
global commandFormat
return commandFormat
def setCommandFormat(conn):
global command_format
command_format = conn
return command_format
def alarmMatrix():
alarm = {
0: "",
1: "Rate Out Of Range",
2: "CapacityVolume Out Of Range",
3: "Parameter Not Set",
4: "Invalid Time",
5: "VTBI Out of Range",
6: "Time out of range",
7: "Rate Out Of Range",
8: "Priming Reach Max",
9: "Battery Temp. Abnormal",
10: "Tube Not Calibrated",
11: "Pressure Sensor Not Calibrated",
12: "Dose Out Of Range",
13: "Concentration Out Of Range",
14: "Secondary Infusion Completed",
15: "Low Battery",
16: "Drip Sensor Fall",
17: "System Idle",
18: "Infusion Near Complete",
19: "Standby time End",
20: "Battery Depleted",
21: "Occlusion",
22: "Over Air",
23: "Infusion Completed",
24: "Secondary Infusion Completed",
25: "Door Opened",
26: "Tube Not install",
27: "Drip sensor rate error",
28: "Drip sensor data lost",
29: "System Error 01",
30: "System Error 02",
31: "System Error 03",
32: "System Error 04",
33: "System Error 05",
34: "System Error 06",
35: "System Error 07",
36: "System Error 08",
37: "System Error 09",
38: "System Error 10",
39: "System Error 11",
40: "System Error 12",
41: "System Error 13",
42: "System Error 14",
43: "System Error 15",
44: "System Error 16",
45: "Main FCT Not Test",
46: "UI FCT Not Test",
47: "System Error 19",
}
return alarm
# def alarm_matrix():
# alarm = {
# 0: "",
# 1: "Rate Out Of Range",
# 2: "Parameter Not Set",
# 2: "Parameter Not Set",
# 3: "Invalid Time",
# 4: "VTBI Out of Range",
# 5: "Time out of range",
# 6: "Rate Out Of Range",
# 7: "Priming Reach Max",
# 8: "Battery Temp. Abnormal",
# 9: "Tube Not Calibrated",
# 10: "Pressure Sensor Not Calibrated",
# 11: "Dose Out Of Range",
# 12: "Concentration Out Of Range",
# 13: "Secondary Infusion Completed",
# 14: "Low Battery",
# 15: "Drip Sensor Fall",
# 16: "System Idle",
# 17: "Infusion Near Complete",
# 18: "Standby time End",
# 19: "Battery Depleted",
# 20: "Occlusion",
# 21: "Over Air",
# 22: "Infusion Completed",
# 23: "Secondary Infusion Completed",
# 24: "Door Opened",
# 25: "Tube Not install",
# 26: "Drip sensor rate error",
# 27: "Drip sensor data lost",
# 28: "System Error 01",
# 29: "System Error 02",
# 30: "System Error 03",
# 31: "System Error 04",
# 32: "System Error 05",
# 33: "System Error 06",
# 34: "System Error 07",
# 35: "System Error 08",
# 36: "System Error 09",
# 37: "System Error 10",
# 38: "System Error 11",
# 39: "System Error 12",
# 40: "System Error 13",
# 41: "System Error 14",
# 42: "System Error 15",
# 43: "System Error 16",
# 44: "Main FCT Not Test",
# 45: "UI FCT Not Test",
# 46: "System Error 19",
# }
# return alarm