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 = {
|
DEFAULT_CONFIG = {
|
||||||
# Reader general configuration
|
# Reader and transmitter general configuration
|
||||||
'temperature': True, # Analyse and record temperature from reading
|
'temperature': True, # Analyse and record temperature from reading
|
||||||
'heartrate': True, # Analyse and record heartrate 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_short': 0.1, # Sleep between inventory of detection
|
||||||
'reader_sleep_long': 5, # Sleep before a long inventory
|
'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
|
'tag_in_field': '', # The last antenna the tag was detected
|
||||||
|
|
||||||
# Transmitter general configuration
|
# Transmitter general configuration
|
||||||
'metrics_path': 'entrouvert.research.veadista.patients.monitoring',
|
'carbon_hostname': '127.0.0.1', # carbon hostname
|
||||||
'transmitter_sleep': 1,
|
'carbon_port': 2003, # carbon post
|
||||||
'patient_id': 1,
|
'metrics_path': 'entrouvert.research.veadista.patients.monitoring', # whisper root path
|
||||||
'carbon_hostname': '127.0.0.1',
|
'patient_id': None, # patient id
|
||||||
'carbon_port': 2003,
|
'transmitter_sleep': 1, # Waiting time between transmissions
|
||||||
|
|
||||||
# Flags to act during veadista sending
|
# Flags to act during veadista sending
|
||||||
'exit_transmitter': True,
|
'exit_transmitter': False, # Exit reading function
|
||||||
'transmitter_status': True,
|
'pause_transmitter': False, # Suspend transmission
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,3 +96,15 @@ class Config:
|
||||||
config.get('reader_sleep_short'),
|
config.get('reader_sleep_short'),
|
||||||
config.get('temperature'),
|
config.get('temperature'),
|
||||||
config.get('heartrate'))
|
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