nasa / CTF

This is a new repository for a new tool to be added to the cFS ecosystem called cFS Test Framework (CTF).
27 stars 6 forks source link

Duplicate MID key error triggered across different MID sets #24

Closed LaGammaNASA closed 2 years ago

LaGammaNASA commented 2 years ago

A minor error is triggered when parsing our MID json file

We use the same MID names across different MID sets (example APP_CONFIG_TLM_MID exists with a value in set1 and different values in set2/set3/set4). Intuitively, each set of MIDs should be an independent set and reusing the MID names in different target sets should be allowed, but this triggers a duplicate MID error when CTF attempts to parse it: https://github.com/nasa/CTF/blob/aaf67d3a9439853d63839b484ee9449361f0d391/plugins/ccsds_plugin/readers/ccdd_export_reader.py#L404

blueoceanwater commented 2 years ago

test ctf with the provided MID json file, CTF does not generate errors for duplicated MID key, but it does generate error info for duplicate MID value. After examining the json file, we think CTF provides the valid warnings. For example, in set 1, { "mid_name": "CFE_TIME_DIAG_TLM_MID", "mid_value": "0x4850410" }, { "mid_name": "CFE_MAX_TLM_MID", "mid_value": "0x4850410" }, "CFE_TIME_DIAG_TLM_MID" and "CFE_MAX_TLM_MID" have the same "mid_value": "0x4850410". In set 1, there are 8 such duplicated mid values. The same for set2, set3, set4.

LaGammaNASA commented 2 years ago

Discovered the issue with duplicate MID keys is actually caused by CTF trying to load up all of the MID json files in the json directory (including auto_cfs_grp1_MIDS.json (grp2,3,4) which we don't currently use). Thanks for also notifying me of the duplicate MID values.