IDBManager#
- class stixcore.idb.manager.IDBManager(data_root, force_version=None)[source]#
Bases:
objectManages IDB (definition of TM/TC packet structures) Versions and provides a IDB reader.
Attributes Summary
Get the data path root directory.
Get the forced IDB version.
Methods Summary
compile_version(version_label[, force, url])Download compiles and installs an IDB version of a public available URL.
convert_mib_2_sqlite(*, in_folder, out_file, ...)Convert a raw IDB version (set of .dat files) into a sqlite DB.
convert_version_label(version_label)Convert a label or version tuple into a version label.
download_version(version_label[, force, url])Download and installs an IDB version of a public available URL.
find_version([obt])Find IDB version operational at a given time.
get_idb([version_label, obt])Get the IDB for the specified version (or the latest available).
Get all available versions in the root directory.
has_version(version_label)Test if the IDB version is available.
Attributes Documentation
- data_root#
Get the data path root directory.
- Returns:
pathlib.Path– path of the root directory
- force_version#
Get the forced IDB version.
- Returns:
pathlib.Path– path to the IDB directory
Methods Documentation
- compile_version(version_label, force=False, url='https://pub099.cs.technik.fhnw.ch/data/idb/')[source]#
- Download compiles and installs an IDB version of a public available URL.
Some IDB parameters will be injected to support the raw tw engineering framework.
- Parameters:
- Returns:
bool– was the download and installation successfully- Raises:
- static convert_mib_2_sqlite(*, in_folder, out_file, version_label)[source]#
Convert a raw IDB version (set of .dat files) into a sqlite DB.
- Parameters:
in_folder (
Path) – path to the folder with the IDB raw data filesout_file (
Path) – path and filename of the sqlite DB file to generateversion_label (
str) – the version label to be included into the DB
- static convert_version_label(version_label)[source]#
Convert a label or version tuple into a version label.
- download_version(version_label, force=False, url='https://pub099.cs.technik.fhnw.ch/data/idb/')[source]#
Download and installs an IDB version of a public available URL.
- Parameters:
- Returns:
bool– was the download and installation successfully- Raises:
- get_idb(version_label='2.26.34', obt=None)[source]#
Get the IDB for the specified version (or the latest available).