cFE Table Service

Note: We're working on getting new videos together. In the meantime, go ahead and turn up your volume.

 

Motivation

Tables are great at organizing information in easy-to-understand ways. If your temperature function needs to know what the maximum temperature limit is, it can look it up in a table. If your control algorithm needs to know what steps it should take every time the computer restarts, it can look it up in its table of steps.

While you could hard code these things into your functions, it's more robust to instead have a table that your code imports when it starts. This way, all you need to do to update everything is upload a new table. Why write a bunch of code to update things all over the place when you could just change one table?

You can also send a table of values to the ground. By packaging data up in a table, you can have one command send it all in one chunk instead of one variable at a time.

Another thing you might have a need for: some tables are more important than others. A table that the computer needs to import to start correctly isn't as important as a table that tells your camera what settings to use when looking at the ocean. For the critical tables, you'd want to make sure they were stored in a secure location with extra protection. For less critical tables, you could store them in normal memory.

 

The Table Service

NASA packages the functions related to tables in the Table Service, which lives in the Core Flight Executive layer since so many things use the service. This is one of the easier services to learn, too, since the functions do what you'd expect: load tables, access them, label which ones are critical, and so on.

One thing to note is that your apps are responsible for their own tables. So you don't need to write a new function that loads tables, you put that code right in your app. When the computer loads your app, it reads any instructions you have about tables and gets things ready for you.

 

Quick Notes

- You don't have to use the Table Service. Some programs stick with variables and messages and everything works great. This can work especially well if your apps only have a couple of variables anyway. But if you've got lots of variables and parameters, the Table Service can make it easier for everyone on your team to understand what's happening and make changes.

- In the code, the Table Service is called "TBL".