Parses sensor information from a sensor-file or save sensor information (also from the GUI) to a sensor-file.
More...
|
def | save_file |
| Save given sensors and their parameters to a sensor file (text file). More...
|
|
def | parse_file |
| Parse a sensor file to several dictionaries. More...
|
|
def | separate_sections |
| Separate the complete string of a sensor file into header and different sections. More...
|
|
def | parse_header |
| Parse the settings,variables and defaults to 3 different dictionaries. More...
|
|
def | parse_sensor_section |
| Parse a sensor section to a dictionary, in which one key represents one sensor, its value holds the sensor's parameters. More...
|
|
def | parse_sensor_line |
| Parse a single line of a sensor section (= parameters for a single sensor) to a dictionary. More...
|
|
Parses sensor information from a sensor-file or save sensor information (also from the GUI) to a sensor-file.
- Author
- Ilyas Kuhlemann ilyas.nosp@m.p.ku.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
- Date
- 20.01.15
def CompoundPye.src.Parser.sensor_parser.parse_file |
( |
|
fname | ) |
|
Parse a sensor file to several dictionaries.
- Parameters
-
fname | Name of the source file. |
def CompoundPye.src.Parser.sensor_parser.parse_header |
( |
|
h | ) |
|
Parse the settings,variables and defaults to 3 different dictionaries.
- Parameters
-
- Returns
- 3 separate dictionaries in the following order: settings, variables, defaults.
def CompoundPye.src.Parser.sensor_parser.parse_sensor_line |
( |
|
l, |
|
|
|
d |
|
) |
| |
Parse a single line of a sensor section (= parameters for a single sensor) to a dictionary.
- Parameters
-
l | One line of text from a sensor section. |
d | Pointer to the dictionary in parse_sensor_section, to which the new dicionary containing one sensor's parameters will be added. |
def CompoundPye.src.Parser.sensor_parser.parse_sensor_section |
( |
|
s | ) |
|
Parse a sensor section to a dictionary, in which one key represents one sensor, its value holds the sensor's parameters.
- Parameters
-
s | String of the sensor section. |
- Returns
- Dictionary in which keys represent sensors, their values hold the sensors' parameters.
def CompoundPye.src.Parser.sensor_parser.save_file |
( |
|
fname, |
|
|
|
settings, |
|
|
|
variables, |
|
|
|
defaults, |
|
|
|
sensors |
|
) |
| |
Save given sensors and their parameters to a sensor file (text file).
- Parameters
-
fname | Name of target file. |
settings | Global settings to be stored in the header of the sensor file. |
variables | Global variables to be stored in the header of the sensor file |
defaults | Global defaults to be stored in the header of the sensor file. |
def CompoundPye.src.Parser.sensor_parser.separate_sections |
( |
|
s | ) |
|
Separate the complete string of a sensor file into header and different sections.