This is a sample simulation model created to run on NASA's Trick simulator. This repository also contains unit tests and coverage infrastructure.
- Follow this guide to install Nasa Trick.
- Make sure to install trick under
${HOME}
- Make sure to add
${HOME}/trick/bin
to thePATH
environment variable. - Make sure to create a permanent envirtonment variable with the value of
${HOME}/trick
namedTRICK_HOME
.
sudo apt install build-essential # Install GNU compilers.
sudo apt install libboost-all-dev # Install boost libraries.
sudo apt install clangd # Install clangd language server.
cd /tmp/
git clone https://github.com/google/googletest.git -b v1.14.0 # Clone project from github to a specific release.
cd googletest # Main directory of the cloned repository.
mkdir build # Create a directory to hold the build output.
cd build # Change current dir to build dir.
cmake .. # Generate native build scripts for GoogleTest.
make # Compile gtest
sudo make install # Install in /usr/local/ by default
rm -rf /tmp/googletest/ # Remove temporarily create files.
cd ~
sudo apt install python3-pip # Install python package manager.
pip install gcovr # Install gcovr code coverage tool.
sudo apt install gdb # Install GNU GDB debugger.
sudo apt install clang-tidy # Install clang-tidy.
build.sh
: Build the unit tests.clean.sh
: Clean the unit tests.coverage.sh
: Generate unit test code coverage.run.sh
: Run the unit tests without code coverage.
Service | Description |
---|---|
Client | Allows the creation of a TCP client. |
Server | Allows the creation of a TCP server. |
Data Flow | A variable type that allows the flow of data between models. |
Load | A service that allows the usage of loads that use power and dissipate heat. |
Model Event | A service that allows the creation of events that can be triggered by the simulator. |
Model | Description |
---|---|
Root | The Root of all models. This model is a container of all other models. |
ModelWithEvents | A sample trick model to demonstrate events. |
ModelWithLoad | A sample trick model to demonstrate loads. |
ModelX and ModelY | Sample trick models created to demonstrate inter model communication between ModelX and ModelY. |
ModelDummy | A sample trick model that only showcases minimal sim features. |
Math | A model that doesn't really do much. It is only created to showcase unit test coverage analysis. |