cfs-tools / cfs-basecamp

Provides a framework and tools for developing, downloading, and integrating core Flight System (cFS) applications into an operational system.
Other
24 stars 2 forks source link

TBLMGR service should call user table validation function (also improve dump service) #59

Closed dmccomas closed 5 months ago

dmccomas commented 7 months ago

The current design requires the user's table load function to manage calling a table validation function and responding to the return status. This has a couple of issues:

  1. The validation status is not fed back to TBLMGR service, so it reports a valid table load when the validation fails. The Hello Table coding tutorial lesson 2 telemetry is shown below for a rejected table. The command invalid count increments and the table service shows a valid load.
  2. Each user must supply logic that prevents a new table's data from being copied if the validation fails. This common logic should be in TBLMGR service
  3. While improving common load services, the dump service could be improved so TBLMGR opens/closes file and writes a standard JSON dump header.

This is related to #32

Screenshot 2023-12-09 Table Validation

dmccomas commented 5 months ago

The following text can be used in issues written for each cfs-app that needs to update to comply with the table changes in Basecamp v1.12:

Title: Update to Basecamp v1.12's app_c_fw TBLMGR API

The following changes were made to app_c_fw's TBLMGR API in Basecamp v1.12 Basecamp Issue 59:

  1. TblId enum used in commands changed from 8 to 16 bits. Added Load/Dump CmdPayload definitions to app_c-fw.xml that serves as template for app's. EDS doesn't support templates so it's a manual compliance.
  2. Removed unused Dump type command parameter.
  3. Enhanced app_c-fw TBLMGR dump command to open/close the dump. It also writes a common header fields including: app name, table name, and dump time.
  4. AppName passed to TBLMG constructor.
  5. TblName defined in app's app_cfg.h file and passed to table registration.
  6. Remove TBLMGR #define macros that are defined in EDS
  7. Design/coding conventions:
    • Register tables from object that owns the table not the main app
    • Remove residual app LoadStatus state variables and use TBLMGR's status in HK/Status telemetry.
    • Replace old TBLMGR #define macros with EDS typedefs

Since many app files are being edited update the following to the following design/coding conventions: