-
Notifications
You must be signed in to change notification settings - Fork 49
Biogears IO Library
#Introduction Traditionally BioGears has required a number of runtime files in order to properly function. These files include XML Schema Definition files, and Material and Data definitions including Patients, Scenarios, Substances, and Environments. When BioGears is embedded in IoT hardware or included as part of a larger project like a Unity or Unreal Game. It can be difficult for the downstream development team to properly bundle and deploy these files on the device in a way BioGears understands. For this reason we know offer a libiogears_io dynamic library which can seralize these files as binary and embedded the as part of the BioGears library itself. Obviously, this comes with a large memory cost when loading these libraries so the use of it is optional at compile time, but on by default for simplicity. This documentation runs through the types of files we embedded how to modify, remove, or add additional files in addition to how to toggle this functionality off.
Name | Default | Note |
---|---|---|
Biogears_BUILD_IO_LIBRARY | ON | Toggles the existence of libbiogears_io. All functionality for this library is stripped when it is set to off. |
Biogears_IO_INCLUDE_DATA_TEMPLATES | OFF | Embedded CSV files that contain the source values for supported data files. Mostly used for offical Biogears releases to allow bg-cli to generate a complete runtime directory. |
Biogears_IO_INCLUDE_SCENARIOS | OFF | Includes all Scenario files known at compile time files are generally smaller then state files, but by default arbitrary and not needed. This option is very useful for library embedding as developers can replace the default scenarios with implementation specific ones. |
Biogears_IO_INCLUDE_STATES | OFF | Includes All State files known at compile time state files are about 1.1M apiece so it greatly increases the size of the library and slows down initial generation. |
Biogears_IO_USE_SHORT_TARGET_NAMES | OFF | Changes the Target Names for IO Embedding to a less human friendly name which may have name collisions. This is intended to assist windows developers dealing with PATH and FILENAME length limitations and is safe to use as of 2022-03-18, but is not tested daily. |
Embedded files are in <root>/share/data
and <root>/share/Scenarios
. They represent the standard files for a release of BioGears. All files found at the time CMake is invoked will be recorded and included for embedding. You are free to remove, modify, or add additional files to the shared space but it is important to know that BioGears does expect a subset of substances to exist at standup and must have access either physically or through embedding to the xsd files needed to validate all input XML files as our XML reader does not have network based validation support as of BioGears 7.X.
You are free to add as many data files to the embedding as you need. Incorporation to the library is mostly automatic and you simply need to play the file in the correct folder and rerun CMake configure.
Patient, State, and Scenario files are easily removed and modified. Substance, Environment, and XSD files can be modified if care is taken, but only expert BioGears users should remove these files as it can cause issues at runtime if key files are missing.
Each time you build BioGears it will HAS the known data files and if any changes were made it will embedded the modified files for that build.
share/data/
├── BioGearsConfiguration.xml
├── OverrideConfig.xml
├── PopulationTemplate.xml
├── config/
├── docs/
├── ecg/
├── environments/
├── nutrition/
├── override/
├── patients/
├── states/
├── substances/
├── templates/
└── validation/
share/Scenarios/
├── AnesthesiaMachine/
├── Burncare/
├── BurncareStates/
├── Combined/
├── Compartments/
├── ConsumeMeal/
├── Drug/
├── EnergyEnvironment/
├── EngineState.xml
├── InitialPatientState.xml
├── InitialPatientStateAll.xml
├── Miscellaneous/
├── OverrideTest.xml
├── Patient/
├── Showcase/
└── Validation/
#XSD Files
../share/xsd/
├── BioGearsDataModel.xsd
├── CommonDataModel.xsd
├── biogears/
└── cdm/