Config Parser
get_sensors(config)
Get the list of Sensor objects from the previously loaded config
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
object
|
The config object |
required |
Returns:
Type | Description |
---|---|
list[GenericSensor]
|
Returns a list of Sensors (GenericSensor) |
Source code in software/sailowtech_ctd/methods/config_parser.py
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 |
|
is_mock(config)
Check if the config file has the mock attribute, which means the software is running in a test environment
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
object
|
The config object |
required |
Returns:
Type | Description |
---|---|
bool
|
Returns a boolean to check if it is a mock config |
Source code in software/sailowtech_ctd/methods/config_parser.py
29 30 31 32 33 34 35 36 37 38 |
|
load_file_to_yaml(path)
Tries to load the config file at the specified path
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to the config file |
required |
Returns:
Type | Description |
---|---|
object
|
Returns a python object of the yaml file to be further used |
Source code in software/sailowtech_ctd/methods/config_parser.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|