-
Notifications
You must be signed in to change notification settings - Fork 48
HowTos
BioGears includes a number HowTo API examples which are short BioGears simulations snippits that exercise one or two simple Patient Actions before closing a simulation. Each one can be built as an independent executable and launched from inside a BioGears runtime directory where all the relevant requirements are located. While the BioGears API does allow for the runtime directory to be specified when the physiology is created most HowTo's simply assume it is the current directory.
HowTos are toggled as a group by the Biogears_BUILD_HOWTOS CMake variable and are individually togged using the BUILD_EX_howto-${NAME} variables
Existing HowTos
- AirwayObstruction
- AnesthesiaMachine
- Asthma
- BolusDrug
- BrainInjury
- CMakeLists.txt
- common-source
- ConcurrentEngines
- ConsumeNutrients
- COPD
- CPR
- CreateAPatient
- CWD_Change
- EngineUse
- EnvironmentChange
- Exercise
- Fasciculation
- Hemorrhage
- InfusionDrug
- LobarPneumonia
- MechanicalVentilation
- PainStimulus
- ParameterOverride
- PulmonaryFunctionTest
- RunScenario
- SarinExposure
- SceanrioBase
- SepsisDynamic
- Smoke
- TensionPneumothorax
- ThreadedBioGears
- VasopressinShockTherapy
export BIOGEARS_ROOT=/opt/biogears
cd BIOGERARS_ROOT}/build-gcc5.4
cd runtime
../outputs/bin/howto-bolusdrug
One of the easiest ways to prototype with the BioGears API is by cloning a HowTo and creating your own example inside the BioGears code base yourself. This is easily done by simply copying the directroy of bolusdrug to myexample
export BIOGEARS_ROOT=/opt/biogears
cd ${BIOGERARS_ROOT}/projects/howto
cp -r BolusDrug MyExample
rename 's/BolusDrug/MyExample/' MyExample/src/*
Now simply rerun cmake in your build dir and it will add the new MyExample howto as a final target
export BIOGEARS_ROOT=/opt/biogears
cd ${BIOGERARS_ROOT}/build-gcc5.4
cmake .
ninja
Once you have verified your howto runs you can edit all of the files in MyExample/src until you have proven out your integration prototye. CMake will handle the discovery of any new files and linking to libBioGears for you automatically, provided it is manually run each time a new file is created. This is a good way to start integrating BioGears early and to figure out how to properly use the API