Add transmitter settings to config.
This commit is contained in:
parent
f6092a18bd
commit
8b8b6a0778
30
config.py
30
config.py
|
@ -24,9 +24,11 @@ import logging
|
|||
|
||||
|
||||
DEFAULT_CONFIG = {
|
||||
# Reader general configuration
|
||||
# Reader and transmitter general configuration
|
||||
'temperature': True, # Analyse and record temperature from reading
|
||||
'heartrate': True, # Analyse and record heartrate from reading
|
||||
|
||||
# Reader general configuration
|
||||
'reader_sleep_short': 0.1, # Sleep between inventory of detection
|
||||
'reader_sleep_long': 5, # Sleep before a long inventory
|
||||
|
||||
|
@ -40,15 +42,15 @@ DEFAULT_CONFIG = {
|
|||
'tag_in_field': '', # The last antenna the tag was detected
|
||||
|
||||
# Transmitter general configuration
|
||||
'metrics_path': 'entrouvert.research.veadista.patients.monitoring',
|
||||
'transmitter_sleep': 1,
|
||||
'patient_id': 1,
|
||||
'carbon_hostname': '127.0.0.1',
|
||||
'carbon_port': 2003,
|
||||
'carbon_hostname': '127.0.0.1', # carbon hostname
|
||||
'carbon_port': 2003, # carbon post
|
||||
'metrics_path': 'entrouvert.research.veadista.patients.monitoring', # whisper root path
|
||||
'patient_id': None, # patient id
|
||||
'transmitter_sleep': 1, # Waiting time between transmissions
|
||||
|
||||
# Flags to act during veadista sending
|
||||
'exit_transmitter': True,
|
||||
'transmitter_status': True,
|
||||
'exit_transmitter': False, # Exit reading function
|
||||
'pause_transmitter': False, # Suspend transmission
|
||||
}
|
||||
|
||||
|
||||
|
@ -94,3 +96,15 @@ class Config:
|
|||
config.get('reader_sleep_short'),
|
||||
config.get('temperature'),
|
||||
config.get('heartrate'))
|
||||
|
||||
def transmitter_config(self):
|
||||
config = self.get_config()
|
||||
return (config.get('exit_transmitter'),
|
||||
config.get('pause_transmitter'),
|
||||
config.get('transmitter_sleep'),
|
||||
config.get('patient_id'),
|
||||
config.get('carbon_hostname'),
|
||||
config.get('carbon_port'),
|
||||
config.get('temperature'),
|
||||
config.get('heartrate'),
|
||||
config.get('metrics_path'))
|
||||
|
|
Reference in New Issue