This project was auto-generated by the F' utility tool.
F´ (F Prime) is a component-driven framework that enables rapid development and deployment of spaceflight and other embedded software applications. Please Visit the F´ Website: https://nasa.github.io/fprime/.
I am using this project as a way to learn the FPrime system and topology on a deeper level, in order to contribute to SRL's avionics team.
Following JPL's tutorials, I will learn how to create Components, learn how they interact and get more familiar with the groundstation architecture as well.
In the first tutorial, the HelloWorld Component is created.
-
First the files are created through the
fprime-util new --componentcommand in the command line. -
We can add events and commands by editing the
.fppscript. -
The
.cppand.hppfiles can be automatically changed by using thefprime-util implcommand. (Make sure that you save the.fppfile before this)- Use commands
mv HelloWorld.template.hpp HelloWorld.hppandmv HelloWorld.template.cpp HelloWorld.cppto overwrite the previous c++ files.
- Use commands
-
Certain specific details are added to both
.hppand.cppfiles which are implementation-specific.
A deployment is the actual executable within which all the components run. To create it:
-
Run command
fprime-util new --deploymentand input the desired parameters -
Add the components that you want. This is done by adding the component to the topology in
<nameOfDeployment>/Top/topology.fpp, which instantiates and links together the components in the system.-
Most of the time, those connections are made automatically
-
Done by adding to the list with
instance <nameOfInstance> -
We also have to add the instance to the deployment, by creating a statement inside
<deploymentName>/Top/instances.fpp
-
-
New telemetry channel should be added to telemetry packet specification. Basically we have to say that we have a new channel of data coming through to gds. This will involve the file
<deploymentName>/Top/<deploymentName>DeploymentPackets.xml -
Ensure that everything builds, by running
fprime-util build -j4inside of the<projectName>/<deploymentName>Deploymentdirectory
This seems relatively simple, but I'm still unsure of how it works with uplink/downlink systems. For now,
- Go into the deployment directory and run
fprime-gds - A website should open, or if not navigate to
http://127.0.0.1:5000. Check for a green dot in the upper right. If there is a red X, go to thelogstab and look for errors.
You should be able to send commands, along with view logs etc. from this webpage. Thats it!
Type definitions define kinds of data that you can pass between components (telemetry data, commands etc.). For this tutorial, its a math operation named MathOp.
Basically, all you need to do is add a folder in the main directory with a .fpp file and a CMakeLists.txt file.
- Then, once you add the CMake file to the general
project.cmake, do your classicfprime-util purge,fprime-util generate, andfprime-util buildto make sure that everything builds properly.
First, we create a new directory, where we make a .fpp file to hold the port definitions. Inside module MathModule{} we define the two ports:
port OpRequestto request an operation on two numbersport MathResultto send back the result.
Inside of these we define the data types that will be sent along with our own defined Types in \Types.