b_asic.save_load_structure
¶
B-ASIC Save/Load Structure Module.
Contains functions for saving/loading SFGs and Schedules to/from strings that can be stored as files.
- b_asic.save_load_structure.python_to_sfg(path: str) tuple[SFG, dict[str, tuple[int, int]]] ¶
Given a serialized file, try to deserialize it and load it to the library.
- Parameters:
- pathstr
Path to file to read and deserialize.
- b_asic.save_load_structure.schedule_to_python(schedule: Schedule) str ¶
Given a schedule structure try to serialize it for saving to a file.
- Parameters:
- schedule
Schedule
The schedule to serialize.
- schedule
- b_asic.save_load_structure.sfg_to_python(sfg: SFG, counter: int = 0, suffix: str | None = None, schedule: bool = False) str ¶
Given an SFG structure try to serialize it for saving to a file.
- Parameters:
- sfg
SFG
The SFG to serialize.
- counterint, default: 0
Number used for naming the SFG. Enables SFGs in SFGs.
- suffixstr, optional
String to append at the end of the result.
- schedulebool, default: False
True if printing a schedule.
- sfg