Parameter Database #778
-
How do I use Parameter Database?I am asking this because I tried to connect my component to Parameter database and wasn't able to compile. So it there a guide for it? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 19 replies
-
@timcanham can you answer this question? |
Beta Was this translation helpful? Give feedback.
-
To answer your questions: 1. |
Beta Was this translation helpful? Give feedback.
-
Hi @timcanham , presumably parameters are intended to have initial values, so when are those set if parameters can only be defined by a command? When a spacecraft is deployed, there is no guarantee that the ground has access to send a parameter value command, so how is the database intended to be initialized? |
Beta Was this translation helpful? Give feedback.
-
Tim, it has been awhile but can you confirm that default parameter values
are compiled in. So if you start the system we design so doing nothing
brings us into a known good state for ground commands, etc. To operate.
|
Beta Was this translation helpful? Give feedback.
-
Yes, the defaults are in the autocoder, but the project has to make sure to pick the defaults so they are communicable.
|
Beta Was this translation helpful? Give feedback.
-
And of course Tim you in the process of baking in the AI so the coded
parameter defaults are always correct 😉
Thanks!
|
Beta Was this translation helpful? Give feedback.
-
I have created a parameter, and used the GDS to run the following commands:
I know these commands were successful because:
I also have instances of the prmDb component in my deployment, and included the lines in the deploymentTopology.cpp file:
However, when I kill the program and reboot the application/GDS, the updated value of the parameter is not retained. It reverts to whatever it defaulted as initially. It is my understanding that as long as those three commands are sent, the parameter database should be updated and saved to (which I seem to have evidence is occurring), and during boot up of the application, the I should also note that I checked out the MathComponent tutorial and am observing the same behavior--parameter values not being stored between runs even after save commands. |
Beta Was this translation helpful? Give feedback.
To answer your questions:
1.
PrmDb
is meant to store values persistently through a reboot. It allows one to changed the code's behavior without requiring a software update or repeated commanding. ThePrmDb
instance can serve all the components.2. See here for some tutorials that use it.
3. You can get an initial database by issuing the
_PRM_SET
and then_PRM_SAVE
for each of your components. That sends the values to the memory copy inPrmDb
. Then issue thePRM_SAVE_FILE
to save them to a file. The next time you boots, those values will be restored from disk.