openpectus.engine.archiver
Attributes
Classes
Base class for tags. Most tags do not need their own class but can just use this class. |
Functions
|
Return folder/drive free space (in megabytes). |
Module Contents
- openpectus.engine.archiver.logger
- openpectus.engine.archiver.LOW_DISKSPACE_MB = 50
- openpectus.engine.archiver.VERY_LOW_DISKSPACE_MB = 5
- openpectus.engine.archiver.encoding = 'utf-8'
- openpectus.engine.archiver.delimiter = ','
- openpectus.engine.archiver.quoting: Literal[3] = 3
- openpectus.engine.archiver.escapechar = None
- openpectus.engine.archiver.get_free_space_mb(dirname)
Return folder/drive free space (in megabytes).
- openpectus.engine.archiver.RunlogAccessor
- openpectus.engine.archiver.TagsAccessor
- class openpectus.engine.archiver.ArchiverTag(runlog_accessor, tags_accessor, data_log_interval_seconds)
Bases:
openpectus.lang.exec.tags.TagBase class for tags. Most tags do not need their own class but can just use this class.
Supports change tracking which is used by engine to detect changes between reads of hardware values.
Supports lifetime notification events that are automatically invoked by the engine.
Supports masking the actual value with a simulated value.
- Parameters:
runlog_accessor (RunlogAccessor)
tags_accessor (TagsAccessor)
data_log_interval_seconds (float)
- runlog_accessor
- tags_accessor
- tags: openpectus.lang.exec.tags.TagCollection | None = None
- data_path
- last_save_tick: float = 0.0
- data_log_interval_seconds
- file_path: str | None = None
- file_ready = False
- last_run_id: str | None = None
- last_run_file_path: str | None = None
- __str__()
- Return type:
str
- archive()
The value to write to archive or None to skip that tag from archival
- Return type:
str | None
- check_diskspace()
- Return type:
bool
- prepare_tags_file()
Create file and write header row
- write_tags_row()
- write_runlog()
- read_last_run_archive(run_id)
- Parameters:
run_id (str)
- on_start(run_id)
Is invoked by the Start command when method is started.
- Parameters:
run_id (str)
- on_tick(tick_time, increment_time)
Is invoked on each tick.
Intended for NA (calculated/derived) tags to calculate the value for the tick and apply it to the value property.
- Parameters:
tick_time (float)
increment_time (float)
- on_stop()
Is invoked by the Stop command when method is stopped.