-
Notifications
You must be signed in to change notification settings - Fork 0
/
static_variables.py
76 lines (51 loc) · 1.76 KB
/
static_variables.py
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
from threading import Lock
_singleton = None
_lock = Lock()
def get_singleton():
with _lock:
global _singleton
if _singleton is None:
_singleton = Variables()
return _singleton
class Variables:
def __init__(self):
self.emg_filename = None
self.ventilator_filename = None
self.emg = None
self.emg_freq = None
self.ventilator = None
self.ventilator_freq = None
self.emg_processed = None
self.emg_processed_default = None
def set_emg_filename(self, emg_filename):
self.emg_filename = emg_filename
def get_emg_filename(self):
return self.emg_filename
def set_ventilator_filename(self, ventilator_filename):
self.ventilator_filename = ventilator_filename
def get_ventilator_filename(self):
return self.ventilator_filename
def set_emg(self, emg):
self.emg = emg
def get_emg(self):
return self.emg
def set_ventilator(self, ventilator):
self.ventilator = ventilator
def get_ventilator(self):
return self.ventilator
def set_emg_freq(self, emg_freq):
self.emg_freq = emg_freq
def get_emg_freq(self):
return self.emg_freq
def set_ventilator_freq(self, ventilator_freq):
self.ventilator_freq = ventilator_freq
def get_ventilator_freq(self):
return self.ventilator_freq
def set_emg_processed(self, emg_processed):
self.emg_processed = emg_processed
def get_emg_processed(self):
return self.emg_processed
def set_emg_processed_default(self, emg_processed_default):
self.emg_processed_default = emg_processed_default
def get_emg_processed_default(self):
return self.emg_processed_default