generic_safety_system
File to define a model via an external config file
GenericSafetySystem
Bases: SystemBase
A system that defines its hardware structure via an external config file.
Source code in src/ecc_analyzer/generic_safety_system.py
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 | |
__init__(name, total_fit, config_path)
Initializes a new safety system from an external configuration file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The descriptive name of the hardware system. |
required |
total_fit
|
float
|
The total failure rate (FIT) of the system used to calculate relative metrics. |
required |
config_path
|
str
|
The path to the JSON or YAML file containing the system's hardware block layout. |
required |
Source code in src/ecc_analyzer/generic_safety_system.py
11 12 13 14 15 16 17 18 19 20 21 22 | |
configure_system()
Reconstructs the layout from the provided configuration file.
Determines the file format (JSON or YAML) based on the extension of the config_path and executes the corresponding loading logic.
Raises:
| Type | Description |
|---|---|
ValueError
|
If the file extension is not supported. |
Source code in src/ecc_analyzer/generic_safety_system.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |