From c60b1aa9a068e996f892a106dba64ef223a15169 Mon Sep 17 00:00:00 2001 From: Zogby Date: Mon, 9 Feb 2026 10:32:56 -0500 Subject: [PATCH 01/39] Fix #15: Draft: In-progress. --- .../cfs_fm.py | 308 +++++++++++++++++- 1 file changed, 293 insertions(+), 15 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index a5ee06b..ad66cb3 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -1,12 +1,13 @@ from openc3.script.suite import Group +# Verify FM commands work properly. Not testing error cases. # Group class name should indicate what the scripts are testing class cfs_test_group_cfs_fm(Group): """ - Methods beginning with script_ or test_ are added to Script dropdown """ - - def test_aliveness(self): + + def test_00_Aliveness(self): """ FSW Aliveness Test - Send a no-op command @@ -14,23 +15,288 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "FM" + + Group.print("Testing FM aliveness on <%= target_name %>") + + wait_check_packet("<%= target_name %>", "FM_HK", 1, 100) + + # Assuming no one else is sending commands, grab the latest command count + cmd_count = tlm("<%= target_name %> FM_HK COMMAND_COUNTER") + + # Send NOOP command, then check result to prove application is up and running + cmd("<%= target_name %> FM_CMD_NOOP") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Send Reset Counters command, check resullt + cmd("<%= target_name %> FM_CMD_RESET_COUNTERS") + wait_check("<%= target_name %> FM_HK COMMAND_COUNTER == 0", 100) + + + def test_01_NoOp(self): + """ + Test the no-op command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_NOOP") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") - # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + def test_01_CopyFile(self): + """ + Test the CopyFile command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE 'source.txt', TARGET 'target.txt'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_02_MoveFile(self): + """ + Test the MoveFile command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE 'source.txt', TARGET 'target.txt'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + - # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + def test_03_RenameFile(self): + """ + Test the RenameFile command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE 'source.txt', TARGET 'target.txt'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_04_DeleteFile(self): + """ + Test the DeleteFile command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME 'filename.txt'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_05_DeleteAllFiles(self): + """ + Test the DeleteAllFiles command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with DIRECTORY '/ram/delete-these'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_06_DecompressFile(self): + """ + Test the DecompressFile command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE 'source.txt', TARGET 'target.txt'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_07_ConcatFiles(self): + """ + Test the ConcatFiles command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE1 'source1.txt', SOURCE2 'source2.txt', TARGET 'target.txt'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_07_GetFileInfo(self): + """ + Test the GetFileInfo command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with FILENAME 'file.txt', FILE_CRC NONE") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_08_GetOpenFiles(self): + """ + Test the GetOpenFiles command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_GET_OPEN_FILES") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) - # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + def test_09_CreateDirectory(self): + """ + Test the CreateDirectory command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/ram/new-directory'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_10_DeleteDirectory(self): + """ + Test the DeleteDirectory command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/delete-this'") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_11_GetDirListFile(self): + """ + Test the GetDirListFile command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY '/ram/directory', FILENAME 'filename.txt', GET_SIZE_TIME_MODE FALSE") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_12_GetDirListPkt(self): + """ + Test the GetDirListPkt command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + # FIXME: Does this need SPARE1/2/3? + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/directory', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_13_MonitorFilesystemSpace(self): + """ + Test the MonitorFilesystemSpace command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_MONITOR_FILESYSTEM_SPACE") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_14_SetTableState(self): + """ + Test the SetTableState command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_SET_TABLE_STATE with TABLE_ENTRY_INDEX 0, TABLE_ENTRY_STATE DISABLED") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_14_SetPermissions(self): + """ + Test the SetPermissions command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with FILENAME 'filename.txt', MODE 777") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_15_ResetCounters(self): + """ + Test the ResetCounters command. + """ + + # These should already be incremented from earlier tests. + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER > 0", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_COUNTER > 0", 100) + + + + # FIXME: Update this: Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to be non-zero (one bad cmd causes both) + # + # Send FM_ChildDeleteDirectoryCmd() with a non-existant directory. <------- + # + # Send an X command, which should increment COMMAND_ERROR_COUNTER because + # [[[the CFE_PLATFORM_TIME_CFG_CLIENT config is set FALSE (currently)]]] + cmd(f"<%= target_name %> CFE_TIME_CMD_ADD_DELAY with SECONDS 1, MICROSECONDS 2") + + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_ERROR_COUNTER > 0", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_ERR_COUNTER > 0", 100) + + + + + # FIXME: Cause CHILD_CMD_WARN_COUNTER to be non-zero (requires a specific cmd failure) + # + # Send FM_ChildDirListPktCmd() with extremely-long directory/file path. <------- + + wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_WARN_COUNTER > 0", 100) + + + + + # Send ResetCounters command + cmd(f"<%= target_name %> CFE_TIME_CMD_RESET_COUNTERS") + + # Verify counters are reset to zero + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_ERROR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_WARN_COUNTER == 0", 100) def setup(self): @@ -39,12 +305,24 @@ def setup(self): - Runs when Group Setup button is pressed - Runs before all scripts when Group Start is pressed """ + # Wait for a new housekeeping packet, to ensure we're using its latest status info + wait_check_packet(f"<%= target_name %>", "FM_HK", 1, 100) + + # Ensure that FM events are enabled + cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_APP_EVENTS with APP_NAME 'FM'") + wait(1) + + # Ensure that DEBUG and INFO events are enabled + cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK DEBUG") + cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK INFO") + wait(1) pass + def teardown(self): """ Test Group Setup - Runs when Group Teardown button is pressed - Runs after all scripts when Group Start is pressed """ - pass + pass \ No newline at end of file From a346972977b6b2737db35940f52f80da24e05b62 Mon Sep 17 00:00:00 2001 From: Zogby Date: Tue, 10 Feb 2026 20:21:44 -0500 Subject: [PATCH 02/39] Fix #15: Draft: In-progress. --- .../cfs_fm.py | 31 +++++++------------ 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index ad66cb3..78c4546 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -50,9 +50,13 @@ def test_01_CopyFile(self): Test the CopyFile command. """ + # First, upload the file to be copied + # FIXME: How? + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE 'source.txt', TARGET 'target.txt'") + # FIXME: Needs to refer to SC filepaths, like "/ram/source.txt". How do we upload files to there? + #cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE '<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/etc/source.txt', TARGET '<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/etc/target.txt'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -263,31 +267,20 @@ def test_15_ResetCounters(self): wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER > 0", 100) wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_COUNTER > 0", 100) - - - # FIXME: Update this: Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to be non-zero (one bad cmd causes both) - # - # Send FM_ChildDeleteDirectoryCmd() with a non-existant directory. <------- - # - # Send an X command, which should increment COMMAND_ERROR_COUNTER because - # [[[the CFE_PLATFORM_TIME_CFG_CLIENT config is set FALSE (currently)]]] - cmd(f"<%= target_name %> CFE_TIME_CMD_ADD_DELAY with SECONDS 1, MICROSECONDS 2") + # Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to increment, + # by sending a DeleteDirectory command with a non-existant directory. + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/non-existant'") wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_ERROR_COUNTER > 0", 100) wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_ERR_COUNTER > 0", 100) - - - - # FIXME: Cause CHILD_CMD_WARN_COUNTER to be non-zero (requires a specific cmd failure) - # - # Send FM_ChildDirListPktCmd() with extremely-long directory/file path. <------- + # Cause CHILD_CMD_WARN_COUNTER to increment, + # by sending a DirListPkt command with an extremely-long directory/file path. + # FIXME: Does this need SPARE1/2/3? + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_WARN_COUNTER > 0", 100) - - - # Send ResetCounters command cmd(f"<%= target_name %> CFE_TIME_CMD_RESET_COUNTERS") From 797be88718a39c4332ccac1abe44cd31338f5aaa Mon Sep 17 00:00:00 2001 From: Zogby Date: Wed, 11 Feb 2026 19:42:56 -0500 Subject: [PATCH 03/39] Fix #15: Draft: Got test_01_CopyFile working, after much debugging. --- .../cfs_fm.py | 61 ++++++++++++++----- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index 78c4546..c4cccff 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -50,16 +50,33 @@ def test_01_CopyFile(self): Test the CopyFile command. """ - # First, upload the file to be copied - # FIXME: How? + # First, create the file to be copied + # ################################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # ################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - # FIXME: Needs to refer to SC filepaths, like "/ram/source.txt". How do we upload files to there? - #cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE '<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/etc/source.txt', TARGET '<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/etc/target.txt'") + # Send the command under test + cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE '/cf/file_rt.dat', TARGET '/cf/file_rt-cp.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Cleanup: Delete the files that were created + # ############################################ + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt-cp.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_02_MoveFile(self): @@ -69,6 +86,7 @@ def test_02_MoveFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE 'source.txt', TARGET 'target.txt'") # Verify command count incremented @@ -82,6 +100,7 @@ def test_03_RenameFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE 'source.txt', TARGET 'target.txt'") # Verify command count incremented @@ -95,6 +114,7 @@ def test_04_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME 'filename.txt'") # Verify command count incremented @@ -108,6 +128,7 @@ def test_05_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with DIRECTORY '/ram/delete-these'") # Verify command count incremented @@ -121,6 +142,7 @@ def test_06_DecompressFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE 'source.txt', TARGET 'target.txt'") # Verify command count incremented @@ -134,131 +156,140 @@ def test_07_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE1 'source1.txt', SOURCE2 'source2.txt', TARGET 'target.txt'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_07_GetFileInfo(self): + def test_08_GetFileInfo(self): """ Test the GetFileInfo command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with FILENAME 'file.txt', FILE_CRC NONE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_08_GetOpenFiles(self): + def test_09_GetOpenFiles(self): """ Test the GetOpenFiles command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_GET_OPEN_FILES") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_09_CreateDirectory(self): + def test_10_CreateDirectory(self): """ Test the CreateDirectory command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/ram/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_10_DeleteDirectory(self): + def test_11_DeleteDirectory(self): """ Test the DeleteDirectory command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/delete-this'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_11_GetDirListFile(self): + def test_12_GetDirListFile(self): """ Test the GetDirListFile command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY '/ram/directory', FILENAME 'filename.txt', GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_12_GetDirListPkt(self): + def test_13_GetDirListPkt(self): """ Test the GetDirListPkt command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - # FIXME: Does this need SPARE1/2/3? + # Send the command under test cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/directory', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_13_MonitorFilesystemSpace(self): + def test_14_MonitorFilesystemSpace(self): """ Test the MonitorFilesystemSpace command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_MONITOR_FILESYSTEM_SPACE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_14_SetTableState(self): + def test_15_SetTableState(self): """ Test the SetTableState command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_SET_TABLE_STATE with TABLE_ENTRY_INDEX 0, TABLE_ENTRY_STATE DISABLED") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_14_SetPermissions(self): + def test_16_SetPermissions(self): """ Test the SetPermissions command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # Send the command under test cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with FILENAME 'filename.txt', MODE 777") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_15_ResetCounters(self): + def test_17_ResetCounters(self): """ Test the ResetCounters command. """ From 0bf9b2e2c6764e70682f8c706a1b9faeaa2624b6 Mon Sep 17 00:00:00 2001 From: Zogby Date: Thu, 12 Feb 2026 16:17:47 -0500 Subject: [PATCH 04/39] Fix #15: Draft: Most things work. ResetCounters has issue, and CompressFile seems untestable currently. --- .../cfs_fm.py | 226 ++++++++++++++---- 1 file changed, 180 insertions(+), 46 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index c4cccff..0a4eefc 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -83,39 +83,82 @@ def test_02_MoveFile(self): """ Test the MoveFile command. """ + + # First, create the file to be moved + # ################################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # ################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE 'source.txt', TARGET 'target.txt'") + cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE '/cf/file_rt.dat', TARGET '/cf/file_rt-mv.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Cleanup: Delete the file that was created/moved + # ############################################### + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt-mv.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_03_RenameFile(self): """ Test the RenameFile command. """ - + # First, create the file to be renamed + # #################################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # #################################### + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE 'source.txt', TARGET 'target.txt'") + cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE '/cf/file_rt.dat', TARGET '/cf/file_rt-rnm.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Cleanup: Delete the file that was created/renamed + # ############################################### + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt-rnm.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_04_DeleteFile(self): """ Test the DeleteFile command. """ - + # First, create the file to be deleted + # #################################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # #################################### + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME 'filename.txt'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -125,11 +168,29 @@ def test_05_DeleteAllFiles(self): """ Test the DeleteAllFiles command. """ + # First, create the files to be deleted + # #################################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt1.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt2.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # #################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with DIRECTORY '/ram/delete-these'") + cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with DIRECTORY '/cf/'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -139,42 +200,92 @@ def test_06_DecompressFile(self): """ Test the DecompressFile command. """ + + # FIXME: This can't be tested until we have COSMOS CFDP working. - cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - # Send the command under test - cmd("<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE 'source.txt', TARGET 'target.txt'") + # # Send the command under test + # cmd("<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE 'source.txt', TARGET 'target.txt'") - # Verify command count incremented - wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_07_ConcatFiles(self): """ Test the ConcatFiles command. """ + + # First, create the files to be concatenated + # #################################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt1.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt2.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # #################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE1 'source1.txt', SOURCE2 'source2.txt', TARGET 'target.txt'") + cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE1 '/cf/file_rt1.dat', SOURCE2 '/cf/file_rt2.dat', TARGET '/cf/file_rt3.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Cleanup: Delete the files that were created + # ############################################ + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt1.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt2.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt3.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_08_GetFileInfo(self): """ Test the GetFileInfo command. """ + + # First, create the file + # ###################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # ###################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with FILENAME 'file.txt', FILE_CRC NONE") + cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with FILENAME '/cf/file_rt.dat', FILE_CRC CRC_NONE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Cleanup: Delete the file that was created + # ######################################### + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_09_GetOpenFiles(self): @@ -191,35 +302,29 @@ def test_09_GetOpenFiles(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_10_CreateDirectory(self): + def test_10_CreateAndDeleteDirectory(self): """ Test the CreateDirectory command. """ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - # Send the command under test - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/ram/new-directory'") + # Send the CreateDirectory command + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/cf/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - - def test_11_DeleteDirectory(self): - """ - Test the DeleteDirectory command. - """ - cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/delete-this'") + # Send the DeleteDirectory command + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/cf/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_12_GetDirListFile(self): + def test_11_GetDirListFile(self): """ Test the GetDirListFile command. """ @@ -227,13 +332,13 @@ def test_12_GetDirListFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY '/ram/directory', FILENAME 'filename.txt', GET_SIZE_TIME_MODE FALSE") + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY '/cf/', FILENAME 'dirlist.txt', GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_13_GetDirListPkt(self): + def test_12_GetDirListPkt(self): """ Test the GetDirListPkt command. """ @@ -241,13 +346,13 @@ def test_13_GetDirListPkt(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/directory', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/cf/', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_14_MonitorFilesystemSpace(self): + def test_13_MonitorFilesystemSpace(self): """ Test the MonitorFilesystemSpace command. """ @@ -261,7 +366,7 @@ def test_14_MonitorFilesystemSpace(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_15_SetTableState(self): + def test_14_SetTableState(self): """ Test the SetTableState command. """ @@ -275,52 +380,81 @@ def test_15_SetTableState(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_16_SetPermissions(self): + def test_15_SetPermissions(self): """ Test the SetPermissions command. """ + + # First, create the file + # ###################### + cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") + + # Send CFE_SB_CMD_WRITE_ROUTING_INFO command + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + + # Verify the command was successful + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # ###################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with FILENAME 'filename.txt', MODE 777") + cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with FILENAME '/cf/file_rt.dat', MODE 777") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # Cleanup: Delete the file that was created + # ######################################### + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + - def test_17_ResetCounters(self): + def test_16_ResetCounters(self): """ Test the ResetCounters command. """ - # These should already be incremented from earlier tests. - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER > 0", 100) - wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_COUNTER > 0", 100) + # Increment COMMAND_COUNTER and CHILD_CMD_COUNTER by sending CreateDirectory command + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/cf/new-directory'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_CMD_COUNTER > 0", 100) + + # Delete the created directory, for cleanup + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/cf/new-directory'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to increment, # by sending a DeleteDirectory command with a non-existant directory. cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/non-existant'") - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_ERROR_COUNTER > 0", 100) - wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_ERR_COUNTER > 0", 100) + wait_check(f"<%= target_name %> FM_HK COMMAND_ERROR_COUNTER > 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_CMD_ERR_COUNTER > 0", 100) # Cause CHILD_CMD_WARN_COUNTER to increment, # by sending a DirListPkt command with an extremely-long directory/file path. - # FIXME: Does this need SPARE1/2/3? + # + # FIXME: This generates runtime error "value of 144 bytes does not fit into 64 bytes for data_type STRING", + # which stops the script. Meant for it to have error in FSW and for the script to continue. + # What's the right way to do this? cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") - wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_WARN_COUNTER > 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_CMD_WARN_COUNTER > 0", 100) # Send ResetCounters command - cmd(f"<%= target_name %> CFE_TIME_CMD_RESET_COUNTERS") + cmd(f"<%= target_name %> FM_CMD_RESET_COUNTERS") # Verify counters are reset to zero - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_ERROR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_ERR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CFE_TIME_HK CHILD_CMD_WARN_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK COMMAND_ERROR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_CMD_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_CMD_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_CMD_WARN_COUNTER == 0", 100) def setup(self): From 978a5a1eab7b6e023ea9347b1f81b8a5f819f575 Mon Sep 17 00:00:00 2001 From: Zogby Date: Fri, 13 Feb 2026 12:43:38 -0500 Subject: [PATCH 05/39] Fix #15: Ready for review. All tests pass (but one isn't testable without CFDP). --- .../procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index 0a4eefc..20533bc 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -438,11 +438,7 @@ def test_16_ResetCounters(self): # Cause CHILD_CMD_WARN_COUNTER to increment, # by sending a DirListPkt command with an extremely-long directory/file path. - # - # FIXME: This generates runtime error "value of 144 bytes does not fit into 64 bytes for data_type STRING", - # which stops the script. Meant for it to have error in FSW and for the script to continue. - # What's the right way to do this? - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") wait_check(f"<%= target_name %> FM_HK CHILD_CMD_WARN_COUNTER > 0", 100) From 75d8003cc3218beaed78560604451c98b55124e5 Mon Sep 17 00:00:00 2001 From: Zogby Date: Fri, 13 Feb 2026 14:53:25 -0500 Subject: [PATCH 06/39] Fix #15: Ready for review. Fixed test numbering error. --- .../cfs_fm.py | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index 20533bc..013570e 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -45,7 +45,7 @@ def test_01_NoOp(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_01_CopyFile(self): + def test_02_CopyFile(self): """ Test the CopyFile command. """ @@ -79,7 +79,7 @@ def test_01_CopyFile(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_02_MoveFile(self): + def test_03_MoveFile(self): """ Test the MoveFile command. """ @@ -110,7 +110,7 @@ def test_02_MoveFile(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_03_RenameFile(self): + def test_04_RenameFile(self): """ Test the RenameFile command. """ @@ -140,7 +140,7 @@ def test_03_RenameFile(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_04_DeleteFile(self): + def test_05_DeleteFile(self): """ Test the DeleteFile command. """ @@ -164,7 +164,7 @@ def test_04_DeleteFile(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_05_DeleteAllFiles(self): + def test_06_DeleteAllFiles(self): """ Test the DeleteAllFiles command. """ @@ -196,7 +196,7 @@ def test_05_DeleteAllFiles(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_06_DecompressFile(self): + def test_07_DecompressFile(self): """ Test the DecompressFile command. """ @@ -212,7 +212,7 @@ def test_06_DecompressFile(self): # wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_07_ConcatFiles(self): + def test_08_ConcatFiles(self): """ Test the ConcatFiles command. """ @@ -257,7 +257,7 @@ def test_07_ConcatFiles(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_08_GetFileInfo(self): + def test_09_GetFileInfo(self): """ Test the GetFileInfo command. """ @@ -288,7 +288,7 @@ def test_08_GetFileInfo(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_09_GetOpenFiles(self): + def test_10_GetOpenFiles(self): """ Test the GetOpenFiles command. """ @@ -302,7 +302,7 @@ def test_09_GetOpenFiles(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_10_CreateAndDeleteDirectory(self): + def test_11_CreateAndDeleteDirectory(self): """ Test the CreateDirectory command. """ @@ -324,7 +324,7 @@ def test_10_CreateAndDeleteDirectory(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_11_GetDirListFile(self): + def test_12_GetDirListFile(self): """ Test the GetDirListFile command. """ @@ -338,7 +338,7 @@ def test_11_GetDirListFile(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_12_GetDirListPkt(self): + def test_13_GetDirListPkt(self): """ Test the GetDirListPkt command. """ @@ -352,7 +352,7 @@ def test_12_GetDirListPkt(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_13_MonitorFilesystemSpace(self): + def test_14_MonitorFilesystemSpace(self): """ Test the MonitorFilesystemSpace command. """ @@ -366,7 +366,7 @@ def test_13_MonitorFilesystemSpace(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_14_SetTableState(self): + def test_15_SetTableState(self): """ Test the SetTableState command. """ @@ -380,7 +380,7 @@ def test_14_SetTableState(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_15_SetPermissions(self): + def test_16_SetPermissions(self): """ Test the SetPermissions command. """ @@ -411,7 +411,7 @@ def test_15_SetPermissions(self): wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_16_ResetCounters(self): + def test_17_ResetCounters(self): """ Test the ResetCounters command. """ From b6cd34278835c60a697caa0d46ca8ea442fe62f6 Mon Sep 17 00:00:00 2001 From: Zogby Date: Fri, 13 Feb 2026 20:31:47 -0500 Subject: [PATCH 07/39] Fix #14: Draft: In-progress. --- .../cfs_ds.py | 196 ++++++++++++++++-- 1 file changed, 181 insertions(+), 15 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py index 3c233f2..b4688ef 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py @@ -1,12 +1,13 @@ from openc3.script.suite import Group +# Verify DS commands work properly. Not testing error cases. # Group class name should indicate what the scripts are testing class cfs_test_group_cfs_ds(Group): """ - Methods beginning with script_ or test_ are added to Script dropdown """ - - def test_aliveness(self): + + def test_00_Aliveness(self): """ FSW Aliveness Test - Send a no-op command @@ -14,23 +15,176 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "DS" + + Group.print("Testing DS aliveness on <%= target_name %>") + + wait_check_packet("<%= target_name %>", "DS_HK", 1, 100) + + # Assuming no one else is sending commands, grab the latest command count + cmd_count = tlm("<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send NOOP command, then check result to prove application is up and running + cmd("<%= target_name %> DS_CMD_NOOP") + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Send Reset Counters command, check resullt + cmd("<%= target_name %> DS_CMD_RESET_COUNTERS") + wait_check("<%= target_name %> DS_HK COMMAND_COUNTER == 0", 100) + + + def test_01_NoOp(self): + """ + Test the no-op command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> DS_CMD_NOOP") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") - # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + def test_02_SetAppState(self): + """ + Test the SetAppState command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_APP_STATE with ENABLE_STATE ENABLE'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify other telemetry changed as expected + wait_check(f"<%= target_name %> DS_HK APP_ENABLE_STATE == 1", 100) + + + def test_03_SetFilterFile(self): + """ + Test the SetFilterFile command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_FILTER_FILE with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, FILE_TABLE_IDX 0'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_04_SetFilterType(self): + """ + Test the SetFilterType command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_FILTER_TYPE with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, FILTER_TYPE BY_COUNT'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_05_SetFilterParms(self): + """ + Test the SetFilterParms command. + """ + + # NOTE: Source code abbreviates as "parms", while COSMOS file abbreviates as "params". + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_FILTER_PARAMS with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, ALGORITHM_N 0, ALGORITHM_X 0, ALGORITHM_O 0'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_06_SetDestType(self): + """ + Test the SetDestType command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_TYPE with FILE_TABLE_IDX 0, FILE_NAME_TYPE 0'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) - # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + + + + + # FIXME: Next: DS_CMD_SET_DEST_STATE + + + + +# DS_CMD_SET_DEST_PATH +# DS_CMD_SET_DEST_BASE +# DS_CMD_SET_DEST_EXT +# DS_CMD_SET_DEST_SIZE +# DS_CMD_SET_DEST_AGE +# DS_CMD_SET_DEST_COUNT +# DS_CMD_CLOSE_FILE +# DS_CMD_GET_FILE_INFO +# DS_CMD_ADD_MID +# DS_CMD_CLOSE_ALL +# DS_CMD_REMOVE_MID + + + # FIXME: Update this function for DS + # + def test_X_ResetCounters(self): + """ + Test the ResetCounters command. + """ + + # Increment COMMAND_COUNTER and CHILD_CMD_COUNTER by sending CreateDirectory command + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + cmd("<%= target_name %> DS_CMD_CREATE_DIRECTORY with DIRECTORY '/cf/new-directory'") + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER > 0", 100) + wait_check(f"<%= target_name %> DS_HK CHILD_CMD_COUNTER > 0", 100) + + # Delete the created directory, for cleanup + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + cmd("<%= target_name %> DS_CMD_DELETE_DIRECTORY with DIRECTORY '/cf/new-directory'") + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to increment, + # by sending a DeleteDirectory command with a non-existant directory. + cmd("<%= target_name %> DS_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/non-existant'") + + wait_check(f"<%= target_name %> DS_HK COMMAND_ERROR_COUNTER > 0", 100) + wait_check(f"<%= target_name %> DS_HK CHILD_CMD_ERR_COUNTER > 0", 100) + + # Cause CHILD_CMD_WARN_COUNTER to increment, + # by sending a DirListPkt command with an extremely-long directory/file path. + cmd("<%= target_name %> DS_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") + + wait_check(f"<%= target_name %> DS_HK CHILD_CMD_WARN_COUNTER > 0", 100) + + # Send ResetCounters command + cmd(f"<%= target_name %> DS_CMD_RESET_COUNTERS") + + # Verify counters are reset to zero + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK COMMAND_ERROR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK CHILD_CMD_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK CHILD_CMD_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK CHILD_CMD_WARN_COUNTER == 0", 100) def setup(self): @@ -39,12 +193,24 @@ def setup(self): - Runs when Group Setup button is pressed - Runs before all scripts when Group Start is pressed """ + # Wait for a new housekeeping packet, to ensure we're using its latest status info + wait_check_packet(f"<%= target_name %>", "DS_HK", 1, 100) + + # Ensure that DS events are enabled + cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_APP_EVENTS with APP_NAME 'DS'") + wait(1) + + # Ensure that DEBUG and INFO events are enabled + cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK DEBUG") + cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK INFO") + wait(1) pass + def teardown(self): """ Test Group Setup - Runs when Group Teardown button is pressed - Runs after all scripts when Group Start is pressed """ - pass + pass \ No newline at end of file From 4d8bade9e0fe53c822a5f05e94f482d652c21e9e Mon Sep 17 00:00:00 2001 From: Zogby Date: Thu, 19 Feb 2026 17:33:19 -0500 Subject: [PATCH 08/39] Fix #14: Draft: In-progress. --- .../cfs_ds.py | 181 ++++++++++++++++-- 1 file changed, 163 insertions(+), 18 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py index b4688ef..9c5728a 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py @@ -53,7 +53,7 @@ def test_02_SetAppState(self): cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> DS_CMD_SET_APP_STATE with ENABLE_STATE ENABLE'") + cmd("<%= target_name %> DS_CMD_SET_APP_STATE with ENABLE_STATE ENABLE") # Verify command count incremented wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -70,7 +70,7 @@ def test_03_SetFilterFile(self): cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> DS_CMD_SET_FILTER_FILE with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, FILE_TABLE_IDX 0'") + cmd("<%= target_name %> DS_CMD_SET_FILTER_FILE with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, FILE_TABLE_IDX 0") # Verify command count incremented wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -84,7 +84,7 @@ def test_04_SetFilterType(self): cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> DS_CMD_SET_FILTER_TYPE with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, FILTER_TYPE BY_COUNT'") + cmd("<%= target_name %> DS_CMD_SET_FILTER_TYPE with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, FILTER_TYPE BY_COUNT") # Verify command count incremented wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -100,7 +100,7 @@ def test_05_SetFilterParms(self): cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> DS_CMD_SET_FILTER_PARAMS with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, ALGORITHM_N 0, ALGORITHM_X 0, ALGORITHM_O 0'") + cmd("<%= target_name %> DS_CMD_SET_FILTER_PARAMS with MESSAGE_ID 0x1A00, FILTER_PARAMS_IDX 0, ALGORITHM_N 0, ALGORITHM_X 0, ALGORITHM_O 0") # Verify command count incremented wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -114,33 +114,178 @@ def test_06_SetDestType(self): cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> DS_CMD_SET_DEST_TYPE with FILE_TABLE_IDX 0, FILE_NAME_TYPE 0'") + cmd("<%= target_name %> DS_CMD_SET_DEST_TYPE with FILE_TABLE_IDX 0, FILE_NAME_TYPE 0") # Verify command count incremented wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + def test_07_SetDestState(self): + """ + Test the SetDestState command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_STATE with FILE_TABLE_IDX 0, ENABLE_STATE DISABLED") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + def test_08_SetDestPath(self): + """ + Test the SetDestPath command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_PATH with FILE_TABLE_IDX 0, PATHNAME '/cf/'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + def test_09_SetDestBase(self): + """ + Test the SetDestBase command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_BASE with FILE_TABLE_IDX 0, BASENAME 'base'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + def test_10_SetDestExt(self): + """ + Test the SetDestExt command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_EXT with FILE_TABLE_IDX 0, EXTENSION '.txt'") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + def test_11_SetDestSize(self): + """ + Test the SetDestSize command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_SIZE with FILE_TABLE_IDX 0, MAX_FILE_SIZE 1024") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # FIXME: Next: DS_CMD_SET_DEST_STATE - + def test_12_SetDestAge(self): + """ + Test the SetDestAge command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_AGE with FILE_TABLE_IDX 0, MAX_FILE_AGE 60") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) -# DS_CMD_SET_DEST_PATH -# DS_CMD_SET_DEST_BASE -# DS_CMD_SET_DEST_EXT -# DS_CMD_SET_DEST_SIZE -# DS_CMD_SET_DEST_AGE -# DS_CMD_SET_DEST_COUNT -# DS_CMD_CLOSE_FILE -# DS_CMD_GET_FILE_INFO -# DS_CMD_ADD_MID -# DS_CMD_CLOSE_ALL -# DS_CMD_REMOVE_MID + def test_13_SetDestCount(self): + """ + Test the SetDestCount command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_SET_DEST_COUNT with FILE_TABLE_IDX 0, SEQUENCE_COUNT 1") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_14_CloseFile(self): + """ + Test the CloseFile command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_CLOSE_FILE with FILE_TABLE_IDX 0") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_15_CloseAll(self): + """ + Test the CloseAll command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_CLOSE_ALL") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_16_GetFileInfo(self): + """ + Test the GetFileInfo command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_GET_FILE_INFO") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_17_AddMid(self): + """ + Test the AddMid command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_ADD_MID with MESSAGE_ID 0x1A00") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_18_RemoveMid(self): + """ + Test the RemoveMid command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_REMOVE_MID with MESSAGE_ID 0x1A00") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # FIXME: Update this function for DS From 8061d559c7f0743ee88eb8b668e343bc131f4172 Mon Sep 17 00:00:00 2001 From: Zogby Date: Fri, 20 Feb 2026 16:37:49 -0500 Subject: [PATCH 09/39] Fix #14: Draft: In-progress. --- .../cfs_ds.py | 46 ++++++++----------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py index 9c5728a..752110d 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py @@ -53,7 +53,7 @@ def test_02_SetAppState(self): cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> DS_CMD_SET_APP_STATE with ENABLE_STATE ENABLE") + cmd("<%= target_name %> DS_CMD_SET_APP_STATE with ENABLE_STATE ENABLED") # Verify command count incremented wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -288,38 +288,21 @@ def test_18_RemoveMid(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # FIXME: Update this function for DS - # def test_X_ResetCounters(self): """ Test the ResetCounters command. """ - # Increment COMMAND_COUNTER and CHILD_CMD_COUNTER by sending CreateDirectory command - cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") - cmd("<%= target_name %> DS_CMD_CREATE_DIRECTORY with DIRECTORY '/cf/new-directory'") - wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # NOTE: Current initial version is simplified to only increment COMMAND_COUNTER and COMMAND_ERROR_COUNTER before reset. + # Increment COMMAND_COUNTER by sending CreateDirectory command + cmd("<%= target_name %> DS_CMD_NOOP") wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER > 0", 100) - wait_check(f"<%= target_name %> DS_HK CHILD_CMD_COUNTER > 0", 100) - - # Delete the created directory, for cleanup - cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") - cmd("<%= target_name %> DS_CMD_DELETE_DIRECTORY with DIRECTORY '/cf/new-directory'") - wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to increment, - # by sending a DeleteDirectory command with a non-existant directory. - cmd("<%= target_name %> DS_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/non-existant'") - + # Cause COMMAND_ERROR_COUNTER to increment, + # by sending SetFilterFile cmd with invalid message ID + cmd("<%= target_name %> DS_CMD_SET_FILTER_FILE with MESSAGE_ID 0x9999, FILTER_PARAMS_IDX 0, FILE_TABLE_IDX 0") wait_check(f"<%= target_name %> DS_HK COMMAND_ERROR_COUNTER > 0", 100) - wait_check(f"<%= target_name %> DS_HK CHILD_CMD_ERR_COUNTER > 0", 100) - - # Cause CHILD_CMD_WARN_COUNTER to increment, - # by sending a DirListPkt command with an extremely-long directory/file path. - cmd("<%= target_name %> DS_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") - - wait_check(f"<%= target_name %> DS_HK CHILD_CMD_WARN_COUNTER > 0", 100) # Send ResetCounters command cmd(f"<%= target_name %> DS_CMD_RESET_COUNTERS") @@ -327,9 +310,18 @@ def test_X_ResetCounters(self): # Verify counters are reset to zero wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK COMMAND_ERROR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> DS_HK CHILD_CMD_COUNTER == 0", 100) - wait_check(f"<%= target_name %> DS_HK CHILD_CMD_ERR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> DS_HK CHILD_CMD_WARN_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK DISABLED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK IGNORED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILTERED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK PASSED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILE_WRITE_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILE_WRITE_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILE_WRITE_UPDATE_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILE_WRITE_UPDATE_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK DEST_TBL_LOAD_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK DEST_TBL_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILTER_TBL_LOAD_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILTER_TBL_ERR_COUNTER == 0", 100) def setup(self): From b8aa89d9e33d64d8baa9d99d40538862fc885a87 Mon Sep 17 00:00:00 2001 From: Zogby Date: Fri, 20 Feb 2026 16:40:39 -0500 Subject: [PATCH 10/39] Fix #15: Simplified ResetCounters test a little. --- .../procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index 013570e..fbfeded 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -417,10 +417,7 @@ def test_17_ResetCounters(self): """ # Increment COMMAND_COUNTER and CHILD_CMD_COUNTER by sending CreateDirectory command - cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/cf/new-directory'") - wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) wait_check(f"<%= target_name %> FM_HK CHILD_CMD_COUNTER > 0", 100) @@ -432,14 +429,12 @@ def test_17_ResetCounters(self): # Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to increment, # by sending a DeleteDirectory command with a non-existant directory. cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/non-existant'") - wait_check(f"<%= target_name %> FM_HK COMMAND_ERROR_COUNTER > 0", 100) wait_check(f"<%= target_name %> FM_HK CHILD_CMD_ERR_COUNTER > 0", 100) # Cause CHILD_CMD_WARN_COUNTER to increment, # by sending a DirListPkt command with an extremely-long directory/file path. cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") - wait_check(f"<%= target_name %> FM_HK CHILD_CMD_WARN_COUNTER > 0", 100) # Send ResetCounters command From ad54f879c194726258c0a1d440d25a1aa53d318e Mon Sep 17 00:00:00 2001 From: Zogby Date: Tue, 24 Feb 2026 12:00:34 -0500 Subject: [PATCH 11/39] Fix #14: Ready for review. --- targets/CFS/cmd_tlm/ds_cmd_def.txt | 10 +-- .../cfs_ds.py | 66 +++++++++---------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/targets/CFS/cmd_tlm/ds_cmd_def.txt b/targets/CFS/cmd_tlm/ds_cmd_def.txt index e2ee8ec..533a3b7 100644 --- a/targets/CFS/cmd_tlm/ds_cmd_def.txt +++ b/targets/CFS/cmd_tlm/ds_cmd_def.txt @@ -32,6 +32,8 @@ <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_TYPE', 6, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" APPEND_PARAMETER FILE_NAME_TYPE 16 UINT 0 MAX_UINT16 0 "Filename type - count vs time" + STATE BY_COUNT 1 + STATE BY_TIME 2 <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_STATE', 7, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" @@ -47,7 +49,7 @@ <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_BASE', 9, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" - APPEND_PARAMETER BASENAME 512 STRING "" "Base portion of filename" + APPEND_PARAMETER BASENAME 160 STRING "" "Base portion of filename" <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_EXT', 10, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" @@ -78,7 +80,7 @@ <%= cfs_cmd_hdr(target_name, 'DS_CMD_ADD_MID', 16, "Telecommand Message") %> APPEND_PARAMETER MESSAGE_ID 32 UINT 0 MAX_UINT32 0 "Message ID to add to Packet Filter Table" -<%= cfs_cmd_hdr(target_name, 'DS_CMD_CLOSE_ALL', 17, "Telecommand Message") %> - -<%= cfs_cmd_hdr(target_name, 'DS_CMD_REMOVE_MID', 18, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'DS_CMD_REMOVE_MID', 17, "Telecommand Message") %> APPEND_PARAMETER MESSAGE_ID 32 UINT 0 MAX_UINT32 0 "Message ID to remove from Packet Filter Table" + +<%= cfs_cmd_hdr(target_name, 'DS_CMD_CLOSE_ALL', 18, "Telecommand Message") %> diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py index 752110d..32a75a7 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py @@ -60,9 +60,23 @@ def test_02_SetAppState(self): # Verify other telemetry changed as expected wait_check(f"<%= target_name %> DS_HK APP_ENABLE_STATE == 1", 100) + + + def test_03_AddMid(self): + """ + Test the AddMid command. + """ + + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Send the command under test + cmd("<%= target_name %> DS_CMD_ADD_MID with MESSAGE_ID 0x1A00") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_03_SetFilterFile(self): + def test_04_SetFilterFile(self): """ Test the SetFilterFile command. """ @@ -76,7 +90,7 @@ def test_03_SetFilterFile(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_04_SetFilterType(self): + def test_05_SetFilterType(self): """ Test the SetFilterType command. """ @@ -90,7 +104,7 @@ def test_04_SetFilterType(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_05_SetFilterParms(self): + def test_06_SetFilterParms(self): """ Test the SetFilterParms command. """ @@ -106,7 +120,7 @@ def test_05_SetFilterParms(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_06_SetDestType(self): + def test_07_SetDestType(self): """ Test the SetDestType command. """ @@ -114,13 +128,13 @@ def test_06_SetDestType(self): cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> DS_CMD_SET_DEST_TYPE with FILE_TABLE_IDX 0, FILE_NAME_TYPE 0") + cmd("<%= target_name %> DS_CMD_SET_DEST_TYPE with FILE_TABLE_IDX 0, FILE_NAME_TYPE BY_COUNT") # Verify command count incremented wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_07_SetDestState(self): + def test_08_SetDestState(self): """ Test the SetDestState command. """ @@ -134,7 +148,7 @@ def test_07_SetDestState(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_08_SetDestPath(self): + def test_09_SetDestPath(self): """ Test the SetDestPath command. """ @@ -148,7 +162,7 @@ def test_08_SetDestPath(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_09_SetDestBase(self): + def test_10_SetDestBase(self): """ Test the SetDestBase command. """ @@ -162,7 +176,7 @@ def test_09_SetDestBase(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_10_SetDestExt(self): + def test_11_SetDestExt(self): """ Test the SetDestExt command. """ @@ -176,7 +190,7 @@ def test_10_SetDestExt(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_11_SetDestSize(self): + def test_12_SetDestSize(self): """ Test the SetDestSize command. """ @@ -190,7 +204,7 @@ def test_11_SetDestSize(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_12_SetDestAge(self): + def test_13_SetDestAge(self): """ Test the SetDestAge command. """ @@ -204,7 +218,7 @@ def test_12_SetDestAge(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_13_SetDestCount(self): + def test_14_SetDestCount(self): """ Test the SetDestCount command. """ @@ -218,7 +232,7 @@ def test_13_SetDestCount(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_14_CloseFile(self): + def test_15_CloseFile(self): """ Test the CloseFile command. """ @@ -232,7 +246,7 @@ def test_14_CloseFile(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_15_CloseAll(self): + def test_16_CloseAll(self): """ Test the CloseAll command. """ @@ -246,7 +260,7 @@ def test_15_CloseAll(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_16_GetFileInfo(self): + def test_17_GetFileInfo(self): """ Test the GetFileInfo command. """ @@ -260,20 +274,6 @@ def test_16_GetFileInfo(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_17_AddMid(self): - """ - Test the AddMid command. - """ - - cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") - - # Send the command under test - cmd("<%= target_name %> DS_CMD_ADD_MID with MESSAGE_ID 0x1A00") - - # Verify command count incremented - wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - - def test_18_RemoveMid(self): """ Test the RemoveMid command. @@ -288,7 +288,7 @@ def test_18_RemoveMid(self): wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_X_ResetCounters(self): + def test_19_ResetCounters(self): """ Test the ResetCounters command. """ @@ -312,12 +312,12 @@ def test_X_ResetCounters(self): wait_check(f"<%= target_name %> DS_HK COMMAND_ERROR_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK DISABLED_PKT_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK IGNORED_PKT_COUNTER == 0", 100) - wait_check(f"<%= target_name %> DS_HK FILTERED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILTERED_PKT_COUNTER < 10", 100) # Increases from 0 before first packet post-reset wait_check(f"<%= target_name %> DS_HK PASSED_PKT_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK FILE_WRITE_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK FILE_WRITE_ERR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> DS_HK FILE_WRITE_UPDATE_COUNTER == 0", 100) - wait_check(f"<%= target_name %> DS_HK FILE_WRITE_UPDATE_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILE_UPDATE_COUNTER == 0", 100) + wait_check(f"<%= target_name %> DS_HK FILE_UPDATE_ERR_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK DEST_TBL_LOAD_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK DEST_TBL_ERR_COUNTER == 0", 100) wait_check(f"<%= target_name %> DS_HK FILTER_TBL_LOAD_COUNTER == 0", 100) From 7881c1ea8859c5c32bab6747c76c0a385f77e542 Mon Sep 17 00:00:00 2001 From: Zogby Date: Tue, 24 Feb 2026 14:23:29 -0500 Subject: [PATCH 12/39] Fix #15: Re-added newline. --- .../CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index fbfeded..b8b616c 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -474,4 +474,4 @@ def teardown(self): - Runs when Group Teardown button is pressed - Runs after all scripts when Group Start is pressed """ - pass \ No newline at end of file + pass From ecc0983151f70f667143c996773939e7e0dba768 Mon Sep 17 00:00:00 2001 From: Zogby Date: Wed, 25 Feb 2026 18:37:07 -0500 Subject: [PATCH 13/39] Fix #13: In-progress. --- .../cfs_cs.py | 283 +++++++++++++++++- 1 file changed, 269 insertions(+), 14 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 1b3ccf0..7d7ac1a 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -1,12 +1,13 @@ from openc3.script.suite import Group +# Verify CS commands work properly. Not testing error cases. # Group class name should indicate what the scripts are testing class cfs_test_group_cfs_cs(Group): """ - Methods beginning with script_ or test_ are added to Script dropdown """ - - def test_aliveness(self): + + def test_00_Aliveness(self): """ FSW Aliveness Test - Send a no-op command @@ -14,23 +15,277 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "CS" + + Group.print("Testing CS aliveness on <%= target_name %>") + + wait_check_packet("<%= target_name %>", "CS_HK", 1, 100) + + # Assuming no one else is sending commands, grab the latest command count + cmd_count = tlm("<%= target_name %> CS_HK COMMAND_COUNTER") + + # Send NOOP command, then check result to prove application is up and running + cmd("<%= target_name %> CS_CMD_NOOP") + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Send Reset Counters command, check resullt + cmd("<%= target_name %> CS_CMD_RESET_COUNTERS") + wait_check("<%= target_name %> CS_HK COMMAND_COUNTER == 0", 100) + + + def test_01_NoOp(self): + """ + Test the no-op command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_NOOP") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + def test_02_OneShot(self): + """ + Test the OneShot command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER with ADDRESS 0x00000000, SIZE 1, MAX_BYTES_PER_CYCLE 1") + + cmd("<%= target_name %> CS_CMD_ONE_SHOT") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + wait_check(f"<%= target_name %> CS_HK Lastoneshotaddress == 0x00000000", 100) + wait_check(f"<%= target_name %> CS_HK Lastoneshotsize == 1", 100) + wait_check(f"<%= target_name %> CS_HK Lastoneshotmaxbytespercycle == 1", 100) + wait_check(f"<%= target_name %> CS_HK Lastoneshotchecksun == 0", 100) + - # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + def test_03_CancelOneShot(self): + """ + Test the CancelOneShot command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_CANCEL_ONE_SHOT") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + - # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + def test_04_EnableAllCS(self): + """ + Test the EnableAllCS command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_ALL_CS") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Checksumstate == ENABLED", 100) + + + def test_05_DisableAllCS(self): + """ + Test the DisableAllCS command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_ALL_CS") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Checksumstate == DISABLED", 100) + + + def test_06_EnableCfeCore(self): + """ + Test the EnableCfeCore command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_CFE_CORE") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == ENABLED", 100) + + + def test_07_DisableCfeCore(self): + """ + Test the DisableCfeCore command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_CFE_CORE") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == DISABLED", 100) + + + def test_08_ReportBaselineCfeCore(self): + """ + Test the ReportBaselineCfeCore command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_CFE_CORE") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_09_RecomputeBaselineCfeCore(self): + """ + Test the RecomputeBaselineCfeCore command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_CFE_CORE") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) + # FIXME: Does this stay true long enough to make it into the HK packet? + + + def test_10_EnableOS(self): + """ + Test the EnableOS command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_OS") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Oscsstate == ENABLED", 100) + + + def test_11_DisableOS(self): + """ + Test the DisableOS command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_OS") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Oscsstate == DISABLED", 100) + + + + + + + + + +# +# +# CS_CMD_DISABLE_OS +# CS_CMD_REPORT_BASELINE_OS +# CS_CMD_RECOMPUTE_BASELINE_OS +# CS_CMD_ENABLE_EEPROM +# CS_CMD_DISABLE_EEPROM +# CS_CMD_REPORT_BASELINE_EEPROM +# CS_CMD_RECOMPUTE_BASELINE_EEPROM +# CS_CMD_ENABLE_ENTRY_EEPROM +# CS_CMD_DISABLE_ENTRY_EEPROM +# CS_CMD_GET_ENTRY_ID_EEPROM +# CS_CMD_ENABLE_MEMORY +# CS_CMD_DISABLE_MEMORY +# CS_CMD_REPORT_BASELINE_MEMORY +# CS_CMD_RECOMPUTE_BASELINE_MEMORY +# CS_CMD_ENABLE_ENTRY_MEMORY +# CS_CMD_DISABLE_ENTRY_MEMORY +# CS_CMD_GET_ENTRY_ID_MEMORY +# CS_CMD_ENABLE_TABLES +# CS_CMD_DISABLE_TABLES +# CS_CMD_REPORT_BASELINE_TABLE +# CS_CMD_RECOMPUTE_BASELINE_TABLE +# CS_CMD_ENABLE_NAME_TABLE +# CS_CMD_DISABLE_NAME_TABLE +# CS_CMD_ENABLE_APPS +# CS_CMD_DISABLE_APPS +# CS_CMD_REPORT_BASELINE_APP +# CS_CMD_RECOMPUTE_BASELINE_APP +# CS_CMD_ENABLE_NAME_APP +# CS_CMD_DISABLE_NAME_APP + + + + + + + + + # FIXME: Update for CS + # + def test_X_ResetCounters(self): + """ + Test the ResetCounters command. + """ + + # NOTE: Current initial version is simplified to only increment COMMAND_COUNTER and COMMAND_ERROR_COUNTER before reset. - # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # Increment COMMAND_COUNTER by sending CreateDirectory command + cmd("<%= target_name %> CS_CMD_NOOP") + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER > 0", 100) + + # Cause COMMAND_ERROR_COUNTER to increment, + # by sending SetFilterFile cmd with invalid message ID + cmd("<%= target_name %> CS_CMD_SET_FILTER_FILE with MESSAGE_ID 0x9999, FILTER_PARAMS_IDX 0, FILE_TABLE_IDX 0") + wait_check(f"<%= target_name %> CS_HK COMMAND_ERROR_COUNTER > 0", 100) - # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + # Send ResetCounters command + cmd(f"<%= target_name %> CS_CMD_RESET_COUNTERS") + + # Verify counters are reset to zero + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK COMMAND_ERROR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK DISABLED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK IGNORED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK FILTERED_PKT_COUNTER < 10", 100) # Increases from 0 before first packet post-reset + wait_check(f"<%= target_name %> CS_HK PASSED_PKT_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK FILE_WRITE_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK FILE_WRITE_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK FILE_UPDATE_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK FILE_UPDATE_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK DEST_TBL_LOAD_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK DEST_TBL_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK FILTER_TBL_LOAD_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK FILTER_TBL_ERR_COUNTER == 0", 100) def setup(self): From d208370e12fa6c473a36ccf60a258ead334cf1d4 Mon Sep 17 00:00:00 2001 From: Zogby Date: Thu, 26 Feb 2026 16:28:43 -0500 Subject: [PATCH 14/39] Fix #13: In-progress. --- .../cfs_cs.py | 252 ++++++++++++++++-- 1 file changed, 232 insertions(+), 20 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 7d7ac1a..ec99e25 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -58,7 +58,8 @@ def test_02_OneShot(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == FALSE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + wait_check(f"<%= target_name %> CS_HK Oneshotinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? wait_check(f"<%= target_name %> CS_HK Lastoneshotaddress == 0x00000000", 100) wait_check(f"<%= target_name %> CS_HK Lastoneshotsize == 1", 100) wait_check(f"<%= target_name %> CS_HK Lastoneshotmaxbytespercycle == 1", 100) @@ -202,6 +203,236 @@ def test_11_DisableOS(self): # Verify any other telemetry changes wait_check(f"<%= target_name %> CS_HK Oscsstate == DISABLED", 100) + + + def test_12_ReportBaselineOS(self): + """ + Test the ReportBaselineOS command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_OS") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_13_RecomputeBaselineOS(self): + """ + Test the RecomputeBaselineOS command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_OS") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + + + def test_14_EnableEEPROM(self): + """ + Test the EnableEEPROM command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_EEPROM") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Eepromcsstate == ENABLED", 100) + + + def test_15_DisableEEPROM(self): + """ + Test the DisableEEPROM command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_EEPROM") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Eepromcsstate == DISABLED", 100) + + + def test_16_ReportBaselineEntryIDEeprom(self): + """ + Test the ReportBaselineEntryIDEeprom command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM, with EntryID 0") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_17_RecomputeBaselineEntryIDEeprom(self): + """ + Test the RecomputeBaselineEntryIDEeprom command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_EEPROM, with EntryID 0") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + + + def test_18_EnableEntryIDEepromCmd(self): + """ + Test the EnableEntryIDEeprom command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_EEPROM") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_18_DisableEntryIDEepromCmd(self): + """ + Test the DisableEntryIDEeprom command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_EEPROM") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_19_GetEntryIDEepromCmd(self): + """ + Test the DisableEntryIDEeprom command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_EEPROM, with Address 0x00000000") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_18_EnableMemory(self): + """ + Test the EnableMemory command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_MEMORY") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Memorycsstate == ENABLED", 100) + + + def test_19_DisableMemory(self): + """ + Test the DisableMemory command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_MEMORY") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Memorycsstate == DISABLED", 100) + + + def test_20_ReportBaselineEntryIDMemory(self): + """ + Test the ReportBaselineEntryIDMemory command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_MEMORY, with EntryID 0") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_21_RecomputeBaselineMemory(self): + """ + Test the RecomputeBaselineMemory command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_MEMORY, with EntryID 0") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + + + def test_22_EnableEntryIDMemory(self): + """ + Test the EnableEntryIDMemory command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_MEMORY, with EntryID 0") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_23_DisableEntryIDMemory(self): + """ + Test the DisableEntryIDMemory command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_MEMORY, with EntryID 0") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_24_GetEntryIDMemory(self): + """ + Test the GetEntryIDMemory command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_MEMORY, with Address 0x00000000") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + @@ -211,25 +442,6 @@ def test_11_DisableOS(self): -# -# -# CS_CMD_DISABLE_OS -# CS_CMD_REPORT_BASELINE_OS -# CS_CMD_RECOMPUTE_BASELINE_OS -# CS_CMD_ENABLE_EEPROM -# CS_CMD_DISABLE_EEPROM -# CS_CMD_REPORT_BASELINE_EEPROM -# CS_CMD_RECOMPUTE_BASELINE_EEPROM -# CS_CMD_ENABLE_ENTRY_EEPROM -# CS_CMD_DISABLE_ENTRY_EEPROM -# CS_CMD_GET_ENTRY_ID_EEPROM -# CS_CMD_ENABLE_MEMORY -# CS_CMD_DISABLE_MEMORY -# CS_CMD_REPORT_BASELINE_MEMORY -# CS_CMD_RECOMPUTE_BASELINE_MEMORY -# CS_CMD_ENABLE_ENTRY_MEMORY -# CS_CMD_DISABLE_ENTRY_MEMORY -# CS_CMD_GET_ENTRY_ID_MEMORY # CS_CMD_ENABLE_TABLES # CS_CMD_DISABLE_TABLES # CS_CMD_REPORT_BASELINE_TABLE From 8c65d9c2221ce99ba7150ad93f185c10ea8562a2 Mon Sep 17 00:00:00 2001 From: Zogby Date: Mon, 2 Mar 2026 19:24:32 -0500 Subject: [PATCH 15/39] Fix #13: In-progress. --- .../cfs_cs.py | 80 +++++++++++++++++-- 1 file changed, 75 insertions(+), 5 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index ec99e25..29790ea 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -432,6 +432,81 @@ def test_24_GetEntryIDMemory(self): # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_25_EnableTables(self): + """ + Test the EnableTables command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_TABLES") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Tablescsstate == ENABLED", 100) + + + def test_26_DisableTables(self): + """ + Test the DisableTables command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_TABLES") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Tablescsstate == DISABLED", 100) + + + def test_28_ReportBaselineTable(self): + """ + Test the ReportBaselineTable command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_29_RecomputeBaselineTable(self): + """ + Test the RecomputeBaselineTable command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + + + def test_30_EnableNameTable(self): + """ + Test the EnableNameTable command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_NAME_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + @@ -442,11 +517,6 @@ def test_24_GetEntryIDMemory(self): -# CS_CMD_ENABLE_TABLES -# CS_CMD_DISABLE_TABLES -# CS_CMD_REPORT_BASELINE_TABLE -# CS_CMD_RECOMPUTE_BASELINE_TABLE -# CS_CMD_ENABLE_NAME_TABLE # CS_CMD_DISABLE_NAME_TABLE # CS_CMD_ENABLE_APPS # CS_CMD_DISABLE_APPS From 4557be210e28e6a5ea7feec84e9454cabdd72267 Mon Sep 17 00:00:00 2001 From: Zogby Date: Tue, 3 Mar 2026 18:04:20 -0500 Subject: [PATCH 16/39] Fix #13: In-progress. --- .../cfs_cs.py | 144 +++++++++++++++--- 1 file changed, 122 insertions(+), 22 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 29790ea..097b9b9 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -506,24 +506,127 @@ def test_30_EnableNameTable(self): # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_31_DisableNameTable(self): + """ + Test the DisableNameTable command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_32_DisableNameTable(self): + """ + Test the DisableNameTable command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_33_EnableApps(self): + """ + Test the EnableApps command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_APPS, with NAME 'appname'") # FIXME: Get app name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Appcsstate == ENABLED", 100) + + + def test_34_DisableApps(self): + """ + Test the DisableApps command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_APPS, with NAME 'appname'") # FIXME: Get app name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Appcsstate == DISABLED", 100) + + def test_35_ReportBaselineApp(self): + """ + Test the ReportBaselineApp command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP, with NAME 'appname'") # FIXME: Get app name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + def test_36_RecomputeBaselineApp(self): + """ + Test the RecomputeBaselineApp command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_APP, with NAME 'appname'") # FIXME: Get app name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + def test_37_EnableNameApp(self): + """ + Test the EnableNameApp command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_ENABLE_NAME_APP, with NAME 'appname'") # FIXME: Get app name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Appcsstate == ENABLED", 100) + + def test_38_DisableNameApp(self): + """ + Test the DisableNameApp command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_APP, with NAME 'appname'") # FIXME: Get app name + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # Verify any other telemetry changes + wait_check(f"<%= target_name %> CS_HK Appcsstate == ENABLED", 100) -# CS_CMD_DISABLE_NAME_TABLE -# CS_CMD_ENABLE_APPS -# CS_CMD_DISABLE_APPS -# CS_CMD_REPORT_BASELINE_APP -# CS_CMD_RECOMPUTE_BASELINE_APP -# CS_CMD_ENABLE_NAME_APP -# CS_CMD_DISABLE_NAME_APP @@ -536,7 +639,7 @@ def test_30_EnableNameTable(self): # def test_X_ResetCounters(self): """ - Test the ResetCounters command. + Test the Reset Counters command. """ # NOTE: Current initial version is simplified to only increment COMMAND_COUNTER and COMMAND_ERROR_COUNTER before reset. @@ -546,8 +649,8 @@ def test_X_ResetCounters(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER > 0", 100) # Cause COMMAND_ERROR_COUNTER to increment, - # by sending SetFilterFile cmd with invalid message ID - cmd("<%= target_name %> CS_CMD_SET_FILTER_FILE with MESSAGE_ID 0x9999, FILTER_PARAMS_IDX 0, FILE_TABLE_IDX 0") + # by sending ReportBaselineApp cmd with invalid app name + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP, with NAME 'Nonexistent'") wait_check(f"<%= target_name %> CS_HK COMMAND_ERROR_COUNTER > 0", 100) # Send ResetCounters command @@ -556,18 +659,15 @@ def test_X_ResetCounters(self): # Verify counters are reset to zero wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER == 0", 100) wait_check(f"<%= target_name %> CS_HK COMMAND_ERROR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK DISABLED_PKT_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK IGNORED_PKT_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK FILTERED_PKT_COUNTER < 10", 100) # Increases from 0 before first packet post-reset - wait_check(f"<%= target_name %> CS_HK PASSED_PKT_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK FILE_WRITE_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK FILE_WRITE_ERR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK FILE_UPDATE_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK FILE_UPDATE_ERR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK DEST_TBL_LOAD_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK DEST_TBL_ERR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK FILTER_TBL_LOAD_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK FILTER_TBL_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK Eepromcserrcounter == 0", 100) + wait_check(f"<%= target_name %> CS_HK Memorycserrcounter == 0", 100) + wait_check(f"<%= target_name %> CS_HK Appcserrcounter == 0", 100) + wait_check(f"<%= target_name %> CS_HK Tablescserrcounter == 0", 100) + wait_check(f"<%= target_name %> CS_HK Cfecorecserrcounter == 0", 100) + wait_check(f"<%= target_name %> CS_HK Oscserrcounter == 0", 100) + wait_check(f"<%= target_name %> CS_HK Passcounter == 0", 100) + + # FIXME: Add this to any lines above where it applies: Increases from 0 before first packet post-reset def setup(self): From 80f324fd4f389750c294c10605ee10a869c36de7 Mon Sep 17 00:00:00 2001 From: krmoore2 Date: Fri, 20 Feb 2026 17:34:00 -0500 Subject: [PATCH 17/39] Fix #98, Improve TBL tests for load validate and activate cmds --- targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt | 7 +- .../cfs_test_groups_for_cfe/cfe_tbl.py | 241 +++++++++++------- .../cfs_to_lab.py | 109 +++++++- 3 files changed, 253 insertions(+), 104 deletions(-) diff --git a/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt index 5529074..57fefae 100644 --- a/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt @@ -36,6 +36,9 @@ <% end %> APPEND_ITEM CRC 32 UINT "Most recently calculated CRC of Table" FORMAT_STRING "0x%08X" +<% if $cfs_globals_mem_addr_size == 64 %> + APPEND_ITEM PAD_AFTER_CRC_IN_64_BIT_SYSTEM 32 UINT "Spare padding after CRC field when packet is padded to 64-bit alignment" +<% end %> <% if $cfs_globals_mem_addr_size == 64 %> APPEND_ITEM ACTIVE_BUFFER_ADDR 64 UINT "Address of Active Buffer" FORMAT_STRING "0x%016X" @@ -73,8 +76,8 @@ APPEND_ITEM CRITICAL 8 UINT "Indicates whether table is Critical or not" STATE FALSE 0 STATE TRUE 1 - APPEND_ITEM BYTE_ALIGN_1 8 UINT "Spare byte to maintain byte alignment" - APPEND_ITEM BYTE_ALIGN_2 16 UINT "Spare bytes to maintain byte alignment" + APPEND_ITEM BYTE_ALIGN_4 8 UINT "Matches ByteAlign4 Entry in FSW" + APPEND_ARRAY_ITEM IMPlICIT_PACKET_ALIGN 8 UINT 48 "Spare padding to maintain packet byte alignment" ITEM TIME_OF_LAST_UPDATE 0 0 DERIVED "Ruby time based on cFE timestamp" READ_CONVERSION unix_time_conversion_epoch_offset.rb TIME_OF_LAST_UPDATE_SECONDS TIME_OF_LAST_UPDATE_SUBSECONDS ITEM FILE_CREATE_TIME 0 0 DERIVED "Ruby time based on cFE timestamp" diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_tbl.py b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_tbl.py index a8ef93c..f5f64af 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_tbl.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_tbl.py @@ -6,7 +6,7 @@ class cfs_test_group_cfe_tbl(Group): - Methods beginning with script_ or test_ are added to Script dropdown """ - def test_aliveness(self): + def test_00_aliveness(self): """ FSW Aliveness Test - Send a no-op command @@ -14,153 +14,210 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "CFE_TBL" - - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing CFE_TBL aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_TBL_CMD_NOOP") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) - - def test_load_validate_table(self): - """ - Test Load Table - - Send a load command - then verify the command was received (by checking the command counter incremented) - and then send a validate command - """ - app_name = "CFE_TBL" - - Group.print(f"Testing {app_name} Load and Validate Table on <%= target_name %>") - - # Restart MD to load table without buffer error - cmd(f"<%= target_name %> CFE_ES_CMD_RESTART_APP with APPLICATION 'MD'") - wait(10) - - # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) - - # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - - # Check accepted Load command - cmd(f"<%= target_name %> {app_name}_CMD_LOAD with LOAD_FILENAME '/cf/md_dw04.tbl'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) - - # Check accepted Validate command - # Makes MD table active - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME 'MD.DWELL_TABLE4'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_TBL_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == 0", 100) - # Check accepted Validate command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_VALIDATE with ACTIVE_TABLE_FLAG ACTIVE, TABLE_NAME 'MD.DWELL_TABLE4'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) - def test_abort_table(self): + def test_01_load_single_buffered_table(self): """ - Test Abort Table - - Send a load command - then verify the command was received (by checking the command counter incremented) - - Send a abort command - then verify the command was received (by checking the command counter incremented) + Test Load Table Command on a Single-Buffered table + - The DS File Table is a Single buffered table """ - app_name = "CFE_TBL" + test_table_name = "DS.FILE_TBL" + test_table_filename = "/cf/ds_file_tbl.tbl" - Group.print(f"Testing {app_name} Abort Table on <%= target_name %>") - # Restart MD to load table without buffer error - cmd(f"<%= target_name %> CFE_ES_CMD_RESTART_APP with APPLICATION 'MD'") - wait(10) + Group.print(f"Testing CFE_TBL Load and Validate Table on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) - - # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - - # Check accepted Load command - cmd(f"<%= target_name %> {app_name}_CMD_LOAD with LOAD_FILENAME '/cf/md_dw04.tbl'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) + + # Test Table Load command (should take up shared buffer) + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{test_table_filename}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS == {num_free_shared_bufs - 1}", 100) + + # Test Table Validate command + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + tbl_validation_count = tlm(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER") + tbl_validation_success_count = tlm(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER") + tbl_validation_request_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS") + cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER == {tbl_validation_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER == {tbl_validation_success_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS == {tbl_validation_request_count + 1}", 100) + + # Test Table Activate command + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_ACTIVATE with TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count - 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS == {num_free_shared_bufs + 1}", 100) + + def test_02_load_double_buffered_table(self): + """ + Test Load Table Command on a Double-Buffered table + - The HK Copy Tables are double-buffered, so they require the load/validate/activate steps sent separately + """ + test_table_name = "HK.CopyTable" + test_table_filename = "/cf/hk_cpy_tbl.tbl" + + Group.print(f"Testing CFE_TBL Load and Validate Table on <%= target_name %>") - # Check accepted Abort command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd("<%= target_name %> CFE_TBL_CMD_ABORT_LOAD with TABLE_NAME 'MD.DWELL_TABLE4'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # Verify that we have a recent packet (by waiting for a new one to arrive) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) + + # Test Table Load command (should not take up shared buffer) + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{test_table_filename}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS == {num_free_shared_bufs}", 100) + + # Test Table Validate command + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + tbl_validation_count = tlm(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER") + tbl_validation_success_count = tlm(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER") + tbl_validation_request_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS") + cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER == {tbl_validation_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER == {tbl_validation_success_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS == {tbl_validation_request_count + 1}", 100) + + # Test Table Activate command + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_ACTIVATE with TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count - 1}", 100) + + def test_03_load_bad_table(self): + """ + Test Load Table Command on an invalid Single-Buffered table + - The TO_Lab Subscriptions Table is a Single buffered table + """ + test_table_name = "TO_LAB.Subscriptions" + test_table_filename = "/cf/to_lab_sub_bad.tbl" + + Group.print(f"Testing CFE_TBL Load and Validate Table on <%= target_name %>") - def test_dump_table_registry(self): + # Verify that we have a recent packet (by waiting for a new one to arrive) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) + + # Test Table Load command (should take up shared buffer) + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{test_table_filename}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS == {num_free_shared_bufs - 1}", 100) + + # Test Table Validate command (should report error) + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + tbl_validation_count = tlm(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER") + tbl_validation_success_count = tlm(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER") + tbl_validation_failure_count = tlm(f"<%= target_name %> CFE_TBL_HK FAILED_VAL_COUNTER") + tbl_validation_request_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS") + cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER == {tbl_validation_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER == {tbl_validation_success_count}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK FAILED_VAL_COUNTER == {tbl_validation_failure_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS == {tbl_validation_request_count + 1}", 100) + + # Abort Table Load to clear shared table buffers + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_ABORT_LOAD with TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count - 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS == {num_free_shared_bufs + 1}", 100) + + + def test_04_dump_table_registry(self): """ Test Dump Table Registry - Send a dump registry command then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_TBL" - - Group.print(f"Testing {app_name} Dump Table Registry on <%= target_name %>") + Group.print(f"Testing CFE_TBL Dump Table Registry on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") # Check accepted Dump Registry command - cmd(f"<%= target_name %> {app_name}_CMD_DUMP_REGISTRY with DUMP_FILENAME 'dump_registry.dat'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_TBL_CMD_DUMP_REGISTRY with DUMP_FILENAME 'dump_registry.dat'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + - def test_send_table_registry(self): + def test_05_send_table_registry(self): """ Test Send Table Registry - Send a send registry command then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_TBL" - - Group.print(f"Testing {app_name} Send Table Registry on <%= target_name %>") + Group.print(f"Testing CFE_TBL Send Table Registry on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") # Check accepted Send Registry command - cmd(f"<%= target_name %> {app_name}_CMD_SEND_REGISTRY with TABLE_NAME 'MD.DWELL_TABLE4'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_TBL_CMD_SEND_REGISTRY with TABLE_NAME 'MD.DWELL_TABLE4'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + - def test_delete_cds(self): + def test_06_delete_cds(self): """ Test Delete CDS Registry - Send a delete cds command then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_TBL" - - Group.print(f"Testing {app_name} Send Delete CDS on <%= target_name %>") + Group.print(f"Testing CFE_TBL Send Delete CDS on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") # Stop MD cmd(f"<%= target_name %> CFE_ES_CMD_STOP_APP with APPLICATION 'MD'") wait(10) # Check accepted Delete CDS command - cmd(f"<%= target_name %> {app_name}_CMD_DELETE_CDS with TABLE_NAME 'MD.DWELL_TABLE4'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_TBL_CMD_DELETE_CDS with TABLE_NAME 'MD.DWELL_TABLE4'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Start MD cmd(f"<%= target_name %> CFE_ES_CMD_START_APP with APPLICATION 'MD', APP_ENTRY_POINT 'MD_AppMain', APP_FILE_NAME '/cf/md.so'") diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py index 60a1c31..6777dfb 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py @@ -6,7 +6,7 @@ class cfs_test_group_cfs_to_lab(Group): - Methods beginning with script_ or test_ are added to Script dropdown """ - def test_aliveness(self): + def test_00_aliveness(self): """ FSW Aliveness Test - Send a no-op command @@ -14,23 +14,112 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "TO_LAB" - - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing TO_LAB aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"TO_LAB_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> TO_LAB_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> TO_LAB_CMD_NOOP") + wait_check(f"<%= target_name %> TO_LAB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> TO_LAB_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> TO_LAB_HK COMMAND_COUNTER == 0", 100) + + + def test_01_manage_tlm_subscriptions(self): + """ + Test Management of Tlm Subscriptions + - Load the Alternate TO_LAB Subscription Table (reduced telemetry to CFE/TO/CI) + - Add a new subscription (not in the alt table) + - Remove the new subscription + """ + test_table_name = "TO_LAB.Subscriptions" + test_table_filename = "/cf/to_lab_sub_alt.tbl" + + Group.print(f"Testing TO_Lab alt table on <%= target_name %>") + + # Verify that we have a recent packet (by waiting for a new one to arrive) + wait_check_packet(f"<%= target_name %>", f"CFE_TBL_HK", 1, 100) + + # Test Table Load command (should take up shared buffer) + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{test_table_filename}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS == {num_free_shared_bufs - 1}", 100) + + # Test Table Validate command + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + tbl_validation_count = tlm(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER") + tbl_validation_success_count = tlm(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER") + tbl_validation_request_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS") + cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK VALIDATION_COUNTER == {tbl_validation_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK SUCCESS_VAL_COUNTER == {tbl_validation_success_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_VAL_REQUESTS == {tbl_validation_request_count + 1}", 100) + + # Test Table Activate command + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + load_pending_count = tlm(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING") + num_free_shared_bufs = tlm(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS") + cmd(f"<%= target_name %> CFE_TBL_CMD_ACTIVATE with TABLE_NAME '{test_table_name}'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_LOAD_PENDING == {load_pending_count - 1}", 100) + wait_check(f"<%= target_name %> CFE_TBL_HK NUM_FREE_SHARED_BUFS == {num_free_shared_bufs + 1}", 100) + + # Get a Message ID for test input (must not be included in alt table config) + test_mid = <%= get_cfs_pkt_msg_id('FM_HK', cfs_cpu_num_from_target_name(target_name)) %> + + # Verify that we have a recent TO_LAB HK packet + wait_check_packet(f"<%= target_name %>", f"TO_LAB_HK", 1, 100) + cmd_count = tlm(f"<%= target_name %> TO_LAB_HK COMMAND_COUNTER") + + # Check accepted Add Packet command + cmd(f"<%= target_name %> TO_LAB_CMD_ADD_PACKET with STREAM_VALUE {test_mid}, FLAGS_PRIORITY 0, FLAGS_RELIABILITY 0, BUF_LIMIT 4") + wait_check(f"<%= target_name %> TO_LAB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + # Verify that we start receiving the new packet subscription + wait_check_packet(f"<%= target_name %>", f"FM_HK", 1, 100) + + # Check accepted Remove Packet command + cmd(f"<%= target_name %> TO_LAB_CMD_REMOVE_PACKET with STREAM_VALUE {test_mid}") + wait_check(f"<%= target_name %> TO_LAB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + + def test_03_remove_all_packet_subscriptions(self): + """ + Test Removing All Packet Subscriptions + - Then reload the default table to bring telemetry back online + """ + Group.print(f"Testing TO_LAB Removing All Packet Subscriptions on <%= target_name %>") + + # Verify that we have a recent packet (by waiting for a new one to arrive) + wait_check_packet(f"<%= target_name %>", f"TO_LAB_HK", 1, 100) + + # Send Remove All command + # The next few steps have to be done without telemetry confirmation + cmd(f"<%= target_name %> TO_LAB_CMD_REMOVE_ALL") + + # Load, Validate, Activate the default table (to re-enable tlm flow) + default_table_name = "TO_LAB.Subscriptions" + default_table_filename = "/cf/to_lab_sub_alt.tbl" + cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{default_table_filename}'") + wait(8) + cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{default_table_name}'") + wait(8) + cmd(f"<%= target_name %> CFE_TBL_CMD_ACTIVATE with TABLE_NAME '{default_table_name}'") + + # Verify that we are getting telemetry again + wait_check_packet(f"<%= target_name %>", f"TO_LAB_HK", 1, 50) + wait_check_packet(f"<%= target_name %>", f"CFE_ES_HK", 1, 50) def setup(self): From 995ee5b062690e68445b23943bf0ae53aa949f39 Mon Sep 17 00:00:00 2001 From: krmoore2 Date: Thu, 26 Feb 2026 23:35:48 -0500 Subject: [PATCH 18/39] Fix #98, Fix reload of default to_lab tbl at end of test --- .../procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py index 6777dfb..ad2c20b 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py @@ -110,7 +110,7 @@ def test_03_remove_all_packet_subscriptions(self): # Load, Validate, Activate the default table (to re-enable tlm flow) default_table_name = "TO_LAB.Subscriptions" - default_table_filename = "/cf/to_lab_sub_alt.tbl" + default_table_filename = "/cf/to_lab_sub.tbl" cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '{default_table_filename}'") wait(8) cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME '{default_table_name}'") From 3b1023d5d2002830a79b187c53da81a2a459c352 Mon Sep 17 00:00:00 2001 From: Zogby Date: Wed, 4 Mar 2026 20:16:53 -0500 Subject: [PATCH 19/39] Fix #13: In-progress. --- .../cfs_cs.py | 128 +++++++++--------- 1 file changed, 67 insertions(+), 61 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 097b9b9..c285735 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -50,20 +50,20 @@ def test_02_OneShot(self): Test the OneShot command. """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER with ADDRESS 0x00000000, SIZE 1, MAX_BYTES_PER_CYCLE 1") + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ONE_SHOT") + cmd("<%= target_name %> CS_CMD_ONE_SHOT with ADDRESS 0x00000000, SIZE 1, MAX_BYTES_PER_CYCLE 1") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == FALSE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? - wait_check(f"<%= target_name %> CS_HK Oneshotinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? wait_check(f"<%= target_name %> CS_HK Lastoneshotaddress == 0x00000000", 100) wait_check(f"<%= target_name %> CS_HK Lastoneshotsize == 1", 100) wait_check(f"<%= target_name %> CS_HK Lastoneshotmaxbytespercycle == 1", 100) - wait_check(f"<%= target_name %> CS_HK Lastoneshotchecksun == 0", 100) + wait_check(f"<%= target_name %> CS_HK Lastoneshotchecksum == 0", 100) + # Recomputeinprogress does not stay FALSE long enough to show in packet. + # Oneshotinprogress does not stay TRUE long enough to show in packet. def test_03_CancelOneShot(self): @@ -73,10 +73,11 @@ def test_03_CancelOneShot(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + cmd("<%= target_name %> CS_CMD_ONE_SHOT with ADDRESS 0x00000000, SIZE 1, MAX_BYTES_PER_CYCLE 1") cmd("<%= target_name %> CS_CMD_CANCEL_ONE_SHOT") # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 2}", 100) def test_04_EnableAllCS(self): @@ -92,7 +93,7 @@ def test_04_EnableAllCS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Checksumstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Checksumstate == 'ENABLED'", 100) def test_05_DisableAllCS(self): @@ -108,7 +109,7 @@ def test_05_DisableAllCS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Checksumstate == DISABLED", 100) + wait_check(f"<%= target_name %> CS_HK Checksumstate == 'DISABLED'", 100) def test_06_EnableCfeCore(self): @@ -124,7 +125,7 @@ def test_06_EnableCfeCore(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == 'ENABLED'", 100) def test_07_DisableCfeCore(self): @@ -140,7 +141,7 @@ def test_07_DisableCfeCore(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == DISABLED", 100) + wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == 'DISABLED'", 100) def test_08_ReportBaselineCfeCore(self): @@ -169,8 +170,7 @@ def test_09_RecomputeBaselineCfeCore(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) - # FIXME: Does this stay true long enough to make it into the HK packet? + # Recomputeinprogress does not stay TRUE long enough to show in packet. def test_10_EnableOS(self): @@ -186,7 +186,7 @@ def test_10_EnableOS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Oscsstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Oscsstate == 'ENABLED'", 100) def test_11_DisableOS(self): @@ -202,7 +202,7 @@ def test_11_DisableOS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Oscsstate == DISABLED", 100) + wait_check(f"<%= target_name %> CS_HK Oscsstate == 'DISABLED'", 100) def test_12_ReportBaselineOS(self): @@ -231,7 +231,7 @@ def test_13_RecomputeBaselineOS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + # Recomputeinprogress does not stay TRUE long enough to show in packet. def test_14_EnableEEPROM(self): @@ -247,7 +247,7 @@ def test_14_EnableEEPROM(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Eepromcsstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Eepromcsstate == 'ENABLED'", 100) def test_15_DisableEEPROM(self): @@ -263,7 +263,7 @@ def test_15_DisableEEPROM(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Eepromcsstate == DISABLED", 100) + wait_check(f"<%= target_name %> CS_HK Eepromcsstate == 'DISABLED'", 100) def test_16_ReportBaselineEntryIDEeprom(self): @@ -273,7 +273,9 @@ def test_16_ReportBaselineEntryIDEeprom(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM, with EntryID 0") + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM with EntryID 0") + # FIXME: Entry ID invalid: 0 + # Was not fixed by commenting out DisableEEPROM command. <======= # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -286,7 +288,8 @@ def test_17_RecomputeBaselineEntryIDEeprom(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_EEPROM, with EntryID 0") + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_EEPROM with EntryID 0") + # FIXME: Entry ID invalid: 0 # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -302,7 +305,8 @@ def test_18_EnableEntryIDEepromCmd(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_EEPROM") + cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_EEPROM with EntryID 0") + # FIXME: Entry ID invalid: 0 # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -315,7 +319,8 @@ def test_18_DisableEntryIDEepromCmd(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_EEPROM") + cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_EEPROM with EntryID 0") + # FIXME: Entry ID invalid: 0 # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -328,7 +333,7 @@ def test_19_GetEntryIDEepromCmd(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_EEPROM, with Address 0x00000000") + cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_EEPROM with Address 0x00000000") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -347,7 +352,7 @@ def test_18_EnableMemory(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Memorycsstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Memorycsstate == 'ENABLED'", 100) def test_19_DisableMemory(self): @@ -363,7 +368,7 @@ def test_19_DisableMemory(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Memorycsstate == DISABLED", 100) + wait_check(f"<%= target_name %> CS_HK Memorycsstate == 'DISABLED'", 100) def test_20_ReportBaselineEntryIDMemory(self): @@ -373,7 +378,8 @@ def test_20_ReportBaselineEntryIDMemory(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_MEMORY, with EntryID 0") + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_MEMORY with EntryID 0") + # FIXME: Entry ID invalid: 0 # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -386,7 +392,8 @@ def test_21_RecomputeBaselineMemory(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_MEMORY, with EntryID 0") + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_MEMORY with EntryID 0") + # FIXME: Entry ID invalid: 0 # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -402,7 +409,8 @@ def test_22_EnableEntryIDMemory(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_MEMORY, with EntryID 0") + cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_MEMORY with EntryID 0") + # FIXME: Entry ID invalid: 0 # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -415,7 +423,8 @@ def test_23_DisableEntryIDMemory(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_MEMORY, with EntryID 0") + cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_MEMORY with EntryID 0") + # FIXME: Entry ID invalid: 0 # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -428,7 +437,7 @@ def test_24_GetEntryIDMemory(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_MEMORY, with Address 0x00000000") + cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_MEMORY with Address 0x00000000") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -447,7 +456,7 @@ def test_25_EnableTables(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Tablescsstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Tablescsstate == 'ENABLED'", 100) def test_26_DisableTables(self): @@ -457,13 +466,13 @@ def test_26_DisableTables(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_TABLES") + cmd("<%= target_name %> CS_CMD_DISABLE_TABLES") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Tablescsstate == DISABLED", 100) + wait_check(f"<%= target_name %> CS_HK Tablescsstate == 'DISABLED'", 100) def test_28_ReportBaselineTable(self): @@ -473,7 +482,8 @@ def test_28_ReportBaselineTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE with NAME 'MD.DWELL_TABLE4'") + # FIXME: Table MD.DWELL_TABLE4 not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -486,7 +496,8 @@ def test_29_RecomputeBaselineTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE with NAME 'MD.DWELL_TABLE4'") + # FIXME: Table MD.DWELL_TABLE4 not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -502,7 +513,8 @@ def test_30_EnableNameTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_NAME_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + cmd("<%= target_name %> CS_CMD_ENABLE_NAME_TABLE with NAME 'MD.DWELL_TABLE4'") + # FIXME: Table MD.DWELL_TABLE4 not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -515,7 +527,8 @@ def test_31_DisableNameTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE with NAME 'MD.DWELL_TABLE4'") + # FIXME: Table MD.DWELL_TABLE4 not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -528,7 +541,8 @@ def test_32_DisableNameTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE, with NAME 'tablename.tbl'") # FIXME: Get table name + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE with NAME 'MD.DWELL_TABLE4'") + # FIXME: Table MD.DWELL_TABLE4 not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -541,13 +555,13 @@ def test_33_EnableApps(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_APPS, with NAME 'appname'") # FIXME: Get app name + cmd("<%= target_name %> CS_CMD_ENABLE_APPS") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) def test_34_DisableApps(self): @@ -557,13 +571,13 @@ def test_34_DisableApps(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_APPS, with NAME 'appname'") # FIXME: Get app name + cmd("<%= target_name %> CS_CMD_DISABLE_APPS") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == DISABLED", 100) + wait_check(f"<%= target_name %> CS_HK Appcsstate == 'DISABLED'", 100) def test_35_ReportBaselineApp(self): @@ -573,7 +587,8 @@ def test_35_ReportBaselineApp(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP, with NAME 'appname'") # FIXME: Get app name + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP with NAME 'MD'") + # FIXME: app MD not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -586,7 +601,8 @@ def test_36_RecomputeBaselineApp(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_APP, with NAME 'appname'") # FIXME: Get app name + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_APP with NAME 'MD'") + # FIXME: app MD not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -602,13 +618,14 @@ def test_37_EnableNameApp(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_NAME_APP, with NAME 'appname'") # FIXME: Get app name + cmd("<%= target_name %> CS_CMD_ENABLE_NAME_APP with NAME 'MD'") + # FIXME: app MD not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == ENABLED", 100) + wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) def test_38_DisableNameApp(self): @@ -618,26 +635,17 @@ def test_38_DisableNameApp(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_NAME_APP, with NAME 'appname'") # FIXME: Get app name + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_APP with NAME 'MD'") + # FIXME: app MD not found # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == ENABLED", 100) - - - + wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) - - - - - - # FIXME: Update for CS - # - def test_X_ResetCounters(self): + def test_39_ResetCounters(self): """ Test the Reset Counters command. """ @@ -650,7 +658,7 @@ def test_X_ResetCounters(self): # Cause COMMAND_ERROR_COUNTER to increment, # by sending ReportBaselineApp cmd with invalid app name - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP, with NAME 'Nonexistent'") + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP with NAME 'Nonexistent'") wait_check(f"<%= target_name %> CS_HK COMMAND_ERROR_COUNTER > 0", 100) # Send ResetCounters command @@ -667,8 +675,6 @@ def test_X_ResetCounters(self): wait_check(f"<%= target_name %> CS_HK Oscserrcounter == 0", 100) wait_check(f"<%= target_name %> CS_HK Passcounter == 0", 100) - # FIXME: Add this to any lines above where it applies: Increases from 0 before first packet post-reset - def setup(self): """ From 72661f38937930f9fa5135215f2b38c179c8c714 Mon Sep 17 00:00:00 2001 From: Zogby Date: Thu, 5 Mar 2026 18:34:33 -0500 Subject: [PATCH 20/39] Fix #13: In-progress. --- .../cfs_cs.py | 304 +++++++++--------- 1 file changed, 155 insertions(+), 149 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index c285735..306675f 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -265,78 +265,83 @@ def test_15_DisableEEPROM(self): # Verify any other telemetry changes wait_check(f"<%= target_name %> CS_HK Eepromcsstate == 'DISABLED'", 100) - - def test_16_ReportBaselineEntryIDEeprom(self): - """ - Test the ReportBaselineEntryIDEeprom command. - """ + # TODO: The tests below were implemented, then commented-out because EEPROM and Memory + # functions currently can't be tested in a straightforward way. That requires a change to the PSP module. + # A ticket has been submitted for this: https://developer.nasa.gov/cFS/cFS/issues/589 + # + # def test_16_ReportBaselineEntryIDEeprom(self): + # """ + # Test the ReportBaselineEntryIDEeprom command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM with EntryID 0") - # FIXME: Entry ID invalid: 0 - # Was not fixed by commenting out DisableEEPROM command. <======= + # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM with EntryID 0") + # # FIXME: Entry ID invalid: 0 + # # Was not fixed by commenting out DisableEEPROM command. <======= + + # # FIXME: Mark as currently untestable all EEPROM cmds - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_17_RecomputeBaselineEntryIDEeprom(self): - """ - Test the RecomputeBaselineEntryIDEeprom command. - """ + # def test_17_RecomputeBaselineEntryIDEeprom(self): + # """ + # Test the RecomputeBaselineEntryIDEeprom command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_EEPROM with EntryID 0") - # FIXME: Entry ID invalid: 0 + # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_EEPROM with EntryID 0") + # # FIXME: Entry ID invalid: 0 - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + # # Verify any other telemetry changes + # wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? - def test_18_EnableEntryIDEepromCmd(self): - """ - Test the EnableEntryIDEeprom command. - """ + # def test_18_EnableEntryIDEepromCmd(self): + # """ + # Test the EnableEntryIDEeprom command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_EEPROM with EntryID 0") - # FIXME: Entry ID invalid: 0 + # cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_EEPROM with EntryID 0") + # # FIXME: Entry ID invalid: 0 - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_18_DisableEntryIDEepromCmd(self): - """ - Test the DisableEntryIDEeprom command. - """ + # def test_18_DisableEntryIDEepromCmd(self): + # """ + # Test the DisableEntryIDEeprom command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_EEPROM with EntryID 0") - # FIXME: Entry ID invalid: 0 + # cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_EEPROM with EntryID 0") + # # FIXME: Entry ID invalid: 0 - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_19_GetEntryIDEepromCmd(self): - """ - Test the DisableEntryIDEeprom command. - """ + # def test_19_GetEntryIDEepromCmd(self): + # """ + # Test the DisableEntryIDEeprom command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_EEPROM with Address 0x00000000") + # cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_EEPROM with Address 0x00000000") - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_18_EnableMemory(self): @@ -370,77 +375,80 @@ def test_19_DisableMemory(self): # Verify any other telemetry changes wait_check(f"<%= target_name %> CS_HK Memorycsstate == 'DISABLED'", 100) - - def test_20_ReportBaselineEntryIDMemory(self): - """ - Test the ReportBaselineEntryIDMemory command. - """ + # TODO: The tests below were implemented, then commented-out because EEPROM and Memory + # functions currently can't be tested in a straightforward way. That requires a change to the PSP module. + # A ticket has been submitted for this: https://developer.nasa.gov/cFS/cFS/issues/589 + # + # def test_20_ReportBaselineEntryIDMemory(self): + # """ + # Test the ReportBaselineEntryIDMemory command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_MEMORY with EntryID 0") - # FIXME: Entry ID invalid: 0 + # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_MEMORY with EntryID 0") + # # FIXME: Entry ID invalid: 0 - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_21_RecomputeBaselineMemory(self): - """ - Test the RecomputeBaselineMemory command. - """ + # def test_21_RecomputeBaselineMemory(self): + # """ + # Test the RecomputeBaselineMemory command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_MEMORY with EntryID 0") - # FIXME: Entry ID invalid: 0 + # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_MEMORY with EntryID 0") + # # FIXME: Entry ID invalid: 0 - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + # # Verify any other telemetry changes + # wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? - def test_22_EnableEntryIDMemory(self): - """ - Test the EnableEntryIDMemory command. - """ + # def test_22_EnableEntryIDMemory(self): + # """ + # Test the EnableEntryIDMemory command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_MEMORY with EntryID 0") - # FIXME: Entry ID invalid: 0 + # cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_MEMORY with EntryID 0") + # # FIXME: Entry ID invalid: 0 - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_23_DisableEntryIDMemory(self): - """ - Test the DisableEntryIDMemory command. - """ + # def test_23_DisableEntryIDMemory(self): + # """ + # Test the DisableEntryIDMemory command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_MEMORY with EntryID 0") - # FIXME: Entry ID invalid: 0 + # cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_MEMORY with EntryID 0") + # # FIXME: Entry ID invalid: 0 - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_24_GetEntryIDMemory(self): - """ - Test the GetEntryIDMemory command. - """ + # def test_24_GetEntryIDMemory(self): + # """ + # Test the GetEntryIDMemory command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_MEMORY with Address 0x00000000") + # cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_MEMORY with Address 0x00000000") - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) def test_25_EnableTables(self): @@ -482,8 +490,7 @@ def test_28_ReportBaselineTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE with NAME 'MD.DWELL_TABLE4'") - # FIXME: Table MD.DWELL_TABLE4 not found + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -496,14 +503,14 @@ def test_29_RecomputeBaselineTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE with NAME 'MD.DWELL_TABLE4'") - # FIXME: Table MD.DWELL_TABLE4 not found + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") + # FIXME: Seems like this probably needs to use a new entry in the tablestbl (added for SAMPLE_APP). <======= # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? def test_30_EnableNameTable(self): @@ -513,8 +520,7 @@ def test_30_EnableNameTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_NAME_TABLE with NAME 'MD.DWELL_TABLE4'") - # FIXME: Table MD.DWELL_TABLE4 not found + cmd("<%= target_name %> CS_CMD_ENABLE_NAME_TABLE with NAME 'SAMPLE_APP.ExampleTable'") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -527,8 +533,7 @@ def test_31_DisableNameTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE with NAME 'MD.DWELL_TABLE4'") - # FIXME: Table MD.DWELL_TABLE4 not found + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE with NAME 'SAMPLE_APP.ExampleTable'") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -541,8 +546,7 @@ def test_32_DisableNameTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE with NAME 'MD.DWELL_TABLE4'") - # FIXME: Table MD.DWELL_TABLE4 not found + cmd("<%= target_name %> CS_CMD_DISABLE_NAME_TABLE with NAME 'SAMPLE_APP.ExampleTable'") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -579,70 +583,72 @@ def test_34_DisableApps(self): # Verify any other telemetry changes wait_check(f"<%= target_name %> CS_HK Appcsstate == 'DISABLED'", 100) - - def test_35_ReportBaselineApp(self): - """ - Test the ReportBaselineApp command. - """ + # TODO: The tests below were implemented, then commented-out because app functions currently can't + # be tested. This is because the Linux implementation of the module loader isn't able to get the actual addresses. + # + # def test_35_ReportBaselineApp(self): + # """ + # Test the ReportBaselineApp command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP with NAME 'MD'") - # FIXME: app MD not found + # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP with NAME 'SAMPLE_APP'") + # # FIXME: app MD not found - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - def test_36_RecomputeBaselineApp(self): - """ - Test the RecomputeBaselineApp command. - """ + # def test_36_RecomputeBaselineApp(self): + # """ + # Test the RecomputeBaselineApp command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_APP with NAME 'MD'") - # FIXME: app MD not found + # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_APP with NAME 'SAMPLE_APP'") + # # FIXME: app MD not found - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == TRUE", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + # # Verify any other telemetry changes + # wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? - def test_37_EnableNameApp(self): - """ - Test the EnableNameApp command. - """ + # def test_37_EnableNameApp(self): + # """ + # Test the EnableNameApp command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_ENABLE_NAME_APP with NAME 'MD'") - # FIXME: app MD not found + # cmd("<%= target_name %> CS_CMD_ENABLE_NAME_APP with NAME 'SAMPLE_APP'") + # # FIXME: app MD not found - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) + # # Verify any other telemetry changes + # wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) - def test_38_DisableNameApp(self): - """ - Test the DisableNameApp command. - """ + # def test_38_DisableNameApp(self): + # """ + # Test the DisableNameApp command. + # """ - cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_DISABLE_NAME_APP with NAME 'MD'") - # FIXME: app MD not found + # cmd("<%= target_name %> CS_CMD_DISABLE_NAME_APP with NAME 'SAMPLE_APP'") + # # FIXME: app MD not found - # Verify command count incremented - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # # Verify command count incremented + # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) + # # Verify any other telemetry changes + # wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) def test_39_ResetCounters(self): From 858ca0e7fa92bd5d2d424adbc5912716439a8a70 Mon Sep 17 00:00:00 2001 From: Zogby Date: Fri, 6 Mar 2026 12:18:44 -0500 Subject: [PATCH 21/39] Fix #13: Ready for review. --- .../cfs_test_groups_for_cfs_open_src/cfs_cs.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 306675f..00614cb 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -279,8 +279,6 @@ def test_15_DisableEEPROM(self): # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM with EntryID 0") # # FIXME: Entry ID invalid: 0 # # Was not fixed by commenting out DisableEEPROM command. <======= - - # # FIXME: Mark as currently untestable all EEPROM cmds # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -504,14 +502,12 @@ def test_29_RecomputeBaselineTable(self): cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") - # FIXME: Seems like this probably needs to use a new entry in the tablestbl (added for SAMPLE_APP). <======= # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? - + # Recomputeinprogress does not stay TRUE long enough to show in packet. def test_30_EnableNameTable(self): """ @@ -594,7 +590,6 @@ def test_34_DisableApps(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_APP with NAME 'SAMPLE_APP'") - # # FIXME: app MD not found # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -608,7 +603,6 @@ def test_34_DisableApps(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_APP with NAME 'SAMPLE_APP'") - # # FIXME: app MD not found # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -625,7 +619,6 @@ def test_34_DisableApps(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") # cmd("<%= target_name %> CS_CMD_ENABLE_NAME_APP with NAME 'SAMPLE_APP'") - # # FIXME: app MD not found # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -642,7 +635,6 @@ def test_34_DisableApps(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") # cmd("<%= target_name %> CS_CMD_DISABLE_NAME_APP with NAME 'SAMPLE_APP'") - # # FIXME: app MD not found # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) From 53c969b7f77856b76cf0183e51693d2d34f0e361 Mon Sep 17 00:00:00 2001 From: Zogby Date: Mon, 16 Mar 2026 12:48:39 -0400 Subject: [PATCH 22/39] Fix #13: Fixed comments, based on peer review. --- .../CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 00614cb..0d66453 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -649,8 +649,10 @@ def test_39_ResetCounters(self): """ # NOTE: Current initial version is simplified to only increment COMMAND_COUNTER and COMMAND_ERROR_COUNTER before reset. + # Because of this, only those two counters are actually being tested for reset. + # Future versions of the test need to check that all counters are non-zero before checking they have been reset. - # Increment COMMAND_COUNTER by sending CreateDirectory command + # Increment COMMAND_COUNTER by sending No-Op command cmd("<%= target_name %> CS_CMD_NOOP") wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER > 0", 100) From f206a460f246ae74bbc4e605eed90860e0e30366 Mon Sep 17 00:00:00 2001 From: Figueroa Date: Mon, 16 Mar 2026 10:03:22 -0400 Subject: [PATCH 23/39] Fix #100, Remove need for padding --- targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt | 2 -- targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt | 2 -- targets/CFS/cmd_tlm/ci_lab_tlm_def.txt | 6 ------ targets/CFS/cmd_tlm/to_lab_tlm_def.txt | 3 --- 4 files changed, 13 deletions(-) diff --git a/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt index 6082f71..0abe8b2 100644 --- a/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt @@ -43,10 +43,8 @@ APPEND_ITEM PACKET_ID_SPACECRAFT_ID 32 UINT "Spacecraft identifier" APPEND_ITEM PACKET_ID_PROCESSOR_ID 32 UINT "Numeric processor identifier" APPEND_ITEM MESSAGE 976 STRING "Event message string" -<% if $cfs_globals_eds_enabled == false %> APPEND_ITEM SPARE_TO_ALIGN_1 8 UINT "Spare padding for alignment" APPEND_ITEM SPARE_TO_ALIGN_2 8 UINT "Spare padding for alignment" -<% end %> <%= cfs_tlm_hdr(target_name, 'CFE_EVS_SHORT_EVENT_MSG', "Short Event Message") %> APPEND_ITEM PACKET_ID_APP_NAME 160 STRING "Application name" diff --git a/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt index 757fc02..baef360 100644 --- a/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt @@ -10,9 +10,7 @@ APPEND_ITEM PIPE_OPTS_ERROR_COUNTER 8 UINT "Count of errors in set/get pipe options API" APPEND_ITEM DUPLICATE_SUBSCRIPTIONS_COUNTER 8 UINT "Count of duplicate subscriptions" APPEND_ITEM GET_PIPE_ID_BY_NAME_ERROR_COUNTER 8 UINT "Count of errors in get pipe id by name API" -<% if $cfs_globals_eds_enabled == false %> APPEND_ITEM SPARE_TO_ALIGN 8 UINT "Spare padding for alignment" -<% end %> APPEND_ITEM PIPE_OVERFLOW_ERROR_COUNTER 16 UINT "Count of pipe overflow errors" APPEND_ITEM MSG_LIMIT_ERROR_COUNTER 16 UINT "Count of msg id to pipe errors" APPEND_ITEM MEM_POOL_HANDLE 32 UINT "Handle to SB's Memory Pool" diff --git a/targets/CFS/cmd_tlm/ci_lab_tlm_def.txt b/targets/CFS/cmd_tlm/ci_lab_tlm_def.txt index 4676ff9..6ffd215 100644 --- a/targets/CFS/cmd_tlm/ci_lab_tlm_def.txt +++ b/targets/CFS/cmd_tlm/ci_lab_tlm_def.txt @@ -5,11 +5,5 @@ APPEND_ITEM SOCKET_CONNECTED 8 UINT "Socket connected" STATE FALSE 0 STATE TRUE 1 -<% if $cfs_globals_eds_enabled == false %> - APPEND_ITEM SPARE_TO_ALIGN_1 64 UINT "Spare padding for alignment" -<% end %> APPEND_ITEM INGEST_PACKETS 32 UINT "Packets ingested" APPEND_ITEM INGEST_ERRORS 32 UINT "Ingest Errors" -<% if $cfs_globals_eds_enabled == false %> - APPEND_ITEM SPARE_TO_ALIGN_2 32 UINT "Spare padding for alignment" -<% end %> diff --git a/targets/CFS/cmd_tlm/to_lab_tlm_def.txt b/targets/CFS/cmd_tlm/to_lab_tlm_def.txt index 5dfd31a..d2636ea 100644 --- a/targets/CFS/cmd_tlm/to_lab_tlm_def.txt +++ b/targets/CFS/cmd_tlm/to_lab_tlm_def.txt @@ -1,6 +1,3 @@ <%= cfs_tlm_hdr(target_name, 'TO_LAB_HK', "TO_LAB Hk Tlm") %> APPEND_ITEM COMMAND_COUNTER 8 UINT "Command Counter" APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Command Error Counter" -<% if $cfs_globals_eds_enabled == false %> - APPEND_ITEM SPARE_TO_ALIGN 16 UINT "Spare padding for alignment" -<% end %> From ae265e63ca8b520290c9d2f54caa408338235365 Mon Sep 17 00:00:00 2001 From: "Molock, Dwaine S 550328410" Date: Fri, 3 Apr 2026 15:20:22 -0400 Subject: [PATCH 24/39] Issue #36, Fix MM command and telemetry definitions --- targets/CFS/cmd_tlm/mm_cmd_def.txt | 52 +++++++++++++++++++++++------- targets/CFS/cmd_tlm/mm_tlm_def.txt | 3 ++ 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/targets/CFS/cmd_tlm/mm_cmd_def.txt b/targets/CFS/cmd_tlm/mm_cmd_def.txt index a18bb6a..28e4fc9 100644 --- a/targets/CFS/cmd_tlm/mm_cmd_def.txt +++ b/targets/CFS/cmd_tlm/mm_cmd_def.txt @@ -5,35 +5,48 @@ <%= cfs_cmd_hdr(target_name, 'MM_CMD_RESET_COUNTERS', 1, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'MM_CMD_PEEK', 2, "Telecommand Message") %> - APPEND_PARAMETER Datasize 64 UINT MIN MAX 0 "Size of the data to be read" - APPEND_PARAMETER Memtype 32 UINT MIN MAX 0 "Memory type to peek data from" + APPEND_PARAMETER Datasize 32 UINT MIN MAX 0 "Size of the data to be read" + APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory type to peek data from" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 - APPEND_PARAMETER Padding 32 UINT 0 0 0 "Padding" + APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbolic source peek address" +<% else %> + APPEND_PARAMETER SrcsymaddressOffset 32 UINT MIN MAX 0 "Symbolic source peek address" +<% end %> APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbolic source peek address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_POKE', 3, "Telecommand Message") %> - APPEND_PARAMETER Datasize 64 UINT MIN MAX 0 "Size of the data to be written" - APPEND_PARAMETER Memtype 32 UINT MIN MAX 0 "Memory type to poke data to" + APPEND_PARAMETER Datasize 32 UINT MIN MAX 0 "Size of the data to be written" + APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory type to poke data to" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 + APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" APPEND_PARAMETER Data 32 UINT MIN MAX 0 "Data to be written" - APPEND_PARAMETER Padding 64 UINT 0 0 0 "Structure padding" + APPEND_PARAMETER Padding 32 UINT 0 0 0 "Structure padding" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbolic destination poke address" +<% else %> + APPEND_PARAMETER DestsymaddressOffset 32 UINT MIN MAX 0 "Symbolic destination poke address" +<% end %> APPEND_PARAMETER DestsymaddressSymname 512 STRING "" "Symbolic destination poke address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_LOAD_MEM_WID', 4, "Telecommand Message") %> APPEND_PARAMETER Numofbytes 8 UINT MIN MAX 0 "Number of bytes to be loaded" APPEND_ARRAY_PARAMETER Padding 8 UINT 24 "Structure padding" APPEND_PARAMETER Crc 32 UINT MIN MAX 0 "Data check value" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbolic destination load address" +<% else %> + APPEND_PARAMETER DestsymaddressOffset 32 UINT MIN MAX 0 "Symbolic destination load address" +<% end %> APPEND_PARAMETER DestsymaddressSymname 512 STRING "" "Symbolic destination load address" APPEND_ARRAY_PARAMETER Dataarray 8 UINT 1600 "Data to be loaded" @@ -41,40 +54,55 @@ APPEND_PARAMETER Filename 512 STRING "" "Name of memory load file" <%= cfs_cmd_hdr(target_name, 'MM_CMD_DUMP_MEM_TO_FILE', 6, "Telecommand Message") %> - APPEND_PARAMETER Memtype 32 UINT MIN MAX 0 "Memory dump type" + APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory dump type" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 - APPEND_PARAMETER Numofbytes 32 UINT MIN MAX 0 "Number of bytes to be dumped" + APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" + APPEND_PARAMETER Numofbytes 32 UINT MIN MAX 0 "Number of bytes to be dumped" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbol plus optional offset" +<% else %> + APPEND_PARAMETER SrcsymaddressOffset 32 UINT MIN MAX 0 "Symbol plus optional offset" +<% end %> APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbol plus optional offset" APPEND_PARAMETER Filename 512 STRING "" "Name of memory dump file" <%= cfs_cmd_hdr(target_name, 'MM_CMD_DUMP_IN_EVENT', 7, "Telecommand Message") %> - APPEND_PARAMETER Memtype 32 UINT MIN MAX 0 "Memory dump type" + APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory dump type" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 - APPEND_PARAMETER Numofbytes 8 UINT MIN MAX 0 "Number of bytes to be dumped" + APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" + APPEND_PARAMETER Numofbytes 8 UINT MIN MAX 0 "Number of bytes to be dumped" APPEND_ARRAY_PARAMETER Padding 8 UINT 24 "Structure padding" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbolic source address" +<% else %> + APPEND_PARAMETER SrcsymaddressOffset 32 UINT MIN MAX 0 "Symbolic source address" +<% end %> APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbolic source address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_FILL_MEM', 8, "Telecommand Message") %> - APPEND_PARAMETER Memtype 32 UINT MIN MAX 0 "Memory type" + APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory type" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 - APPEND_PARAMETER Numofbytes 32 UINT MIN MAX 0 "Number of bytes to fill" + APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" + APPEND_PARAMETER Numofbytes 32 UINT MIN MAX 0 "Number of bytes to fill" APPEND_PARAMETER Fillpattern 32 UINT MIN MAX 0 "Fill pattern to use" APPEND_PARAMETER Padding 32 UINT MIN MAX 0 "Structure padding" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbol plus optional offset" +<% else %> + APPEND_PARAMETER DestsymaddressOffset 32 UINT MIN MAX 0 "Symbol plus optional offset" +<% end %> APPEND_PARAMETER DestsymaddressSymname 512 STRING "" "Symbol plus optional offset" <%= cfs_cmd_hdr(target_name, 'MM_CMD_LOOKUPSYM', 9, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/mm_tlm_def.txt b/targets/CFS/cmd_tlm/mm_tlm_def.txt index d14ff9f..1209656 100644 --- a/targets/CFS/cmd_tlm/mm_tlm_def.txt +++ b/targets/CFS/cmd_tlm/mm_tlm_def.txt @@ -26,9 +26,12 @@ STATE MEM32 5 <% if $cfs_globals_mem_addr_size == 64 %> APPEND_ITEM Address 64 UINT "Fully resolved address used for last command" + FORMAT_STRING "0x%011X" <% else %> APPEND_ITEM Address 32 UINT "Fully resolved address used for last command" + FORMAT_STRING "0x%08X" <% end %> APPEND_ITEM Datavalue 32 UINT "Last command data (fill pattern or peek/poke value)" + FORMAT_STRING "0x%08X" APPEND_ITEM Bytesprocessed 32 UINT "Bytes processed for last command" APPEND_ITEM Filename 512 STRING "Name of the data file used for last command, where applicable" From 572ad69cc45b108391b6ea99fca69368fac08afc Mon Sep 17 00:00:00 2001 From: Walker Date: Fri, 24 Apr 2026 16:32:50 -0500 Subject: [PATCH 25/39] Part cFS/workflows#122, Add Internal Workflows --- .github/workflows/add-to-project.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/add-to-project.yml diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 0000000..4142b77 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,13 @@ +name: Add Issue or PR to Project + +on: + issues: + types: [opened] + pull_request_target: + types: [opened, ready_for_review, converted_to_draft] + +jobs: + add-to-project: + name: Add issue or pull request to project + uses: nasa/cFS/.github/workflows/add-to-project-reusable.yml@dev + secrets: inherit \ No newline at end of file From 7c2e4150e780334221bd5c036109e3ec13a6af2a Mon Sep 17 00:00:00 2001 From: Damon Stewart Date: Tue, 7 Apr 2026 13:21:04 -0400 Subject: [PATCH 26/39] Merge pull request #112 from cFS/110-finish-adding-cfs-lc-cmd-and-telemetry-tests Fix #110: Finish adding cFS LC cmd and telemetry tests --- targets/CFS/cmd_tlm/lc_cmd_def.txt | 20 +-- targets/CFS/cmd_tlm/lc_tlm_def.txt | 20 +-- targets/CFS/lib/cfs_cmd_tlm_list.rb | 2 +- .../cfs_lc.py | 137 +++++++++++------- 4 files changed, 107 insertions(+), 72 deletions(-) diff --git a/targets/CFS/cmd_tlm/lc_cmd_def.txt b/targets/CFS/cmd_tlm/lc_cmd_def.txt index f9ad32c..8cd221d 100644 --- a/targets/CFS/cmd_tlm/lc_cmd_def.txt +++ b/targets/CFS/cmd_tlm/lc_cmd_def.txt @@ -4,8 +4,8 @@ <%= cfs_cmd_hdr(target_name, 'LC_CMD_RESET_COUNTERS', 1, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'LC_CMD_SET_APP_STATE', 2, "Telecommand Message") %> - APPEND_PARAMETER NEW_STATE 16 UINT 1 4 1 "1=Active, 2=Passive, 3=Disabled" +<%= cfs_cmd_hdr(target_name, 'LC_CMD_SET_LC_STATE', 2, "Telecommand Message") %> + APPEND_PARAMETER NEW_LC_STATE 16 UINT 1 4 1 "1=Active, 2=Passive, 3=Disabled" STATE ACTIVE 1 STATE PASSIVE 2 STATE DISABLED 3 @@ -13,21 +13,21 @@ APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" <%= cfs_cmd_hdr(target_name, 'LC_CMD_SET_AP_STATE', 3, "Telecommand Message") %> - APPEND_PARAMETER AP_ID 16 UINT MIN_UINT16 MAX_UINT16 0 "Which actionpoint(s) to change" - APPEND_PARAMETER NEW_STATE 16 UINT MIN_UINT16 MAX_UINT16 1 "1=Active, 2=Passive, 3=Disabled" + APPEND_PARAMETER AP_NUMBER 16 UINT MIN_UINT16 MAX_UINT16 0 "Which actionpoint(s) to change" + APPEND_PARAMETER NEW_AP_STATE 16 UINT MIN_UINT16 MAX_UINT16 1 "1=Active, 2=Passive, 3=Disabled" STATE ACTIVE 1 STATE PASSIVE 2 STATE DISABLED 3 STATE PERM_OFF 4 <%= cfs_cmd_hdr(target_name, 'LC_CMD_SET_AP_PERM_OFF', 4, "Telecommand Message") %> - APPEND_PARAMETER AP_ID 16 UINT MIN_UINT16 MAX_UINT16 0 "Which actionpoint to change" - APPEND_PARAMETER PADDING 16 UINT MIN_UINT16 MAX_UINT16 0 "Structure padding" + APPEND_PARAMETER AP_NUMBER 16 UINT MIN_UINT16 MAX_UINT16 0 "Which actionpoint to change" + APPEND_PARAMETER PADDING 16 UINT MIN_UINT16 MAX_UINT16 0 "Structure padding" <%= cfs_cmd_hdr(target_name, 'LC_CMD_RESET_AP_STATS', 5, "Telecommand Message") %> - APPEND_PARAMETER AP_ID 16 UINT MIN_UINT16 MAX_UINT16 0 "Which actionpoint(s) to change" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" + APPEND_PARAMETER AP_NUMBER 16 UINT MIN_UINT16 MAX_UINT16 0 "Which actionpoint(s) to change" + APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" <%= cfs_cmd_hdr(target_name, 'LC_CMD_RESET_WP_STATS', 6, "Telecommand Message") %> - APPEND_PARAMETER WP_ID 16 UINT MIN_UINT16 MAX_UINT16 0 "Which watchpoint(s) to change" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" + APPEND_PARAMETER WP_NUMBER 16 UINT MIN_UINT16 MAX_UINT16 0 "Which watchpoint(s) to change" + APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/lc_tlm_def.txt b/targets/CFS/cmd_tlm/lc_tlm_def.txt index e65ba2c..35b3422 100644 --- a/targets/CFS/cmd_tlm/lc_tlm_def.txt +++ b/targets/CFS/cmd_tlm/lc_tlm_def.txt @@ -1,7 +1,7 @@ <%= cfs_tlm_hdr(target_name, 'LC_HK', "LC Hk Tlm") %> - APPEND_ITEM COMMAND_COUNTER 8 UINT "LC Application Command Counter" - APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "LC Application Command Error Counter" - APPEND_ITEM APP_STATE 8 UINT "Current LC application operating state" + APPEND_ITEM COMMAND_COUNTER 8 UINT "LC Application Command Counter" + APPEND_ITEM COMMAND_ERR_COUNTER 8 UINT "LC Application Command Error Counter" + APPEND_ITEM CURRENT_LC_STATE 8 UINT "Current LC application operating state" STATE UNDEF 0 STATE ACTIVE 1 STATE PASSIVE 2 @@ -65,10 +65,10 @@ STATE ERROR 2 STATE STALE 3 <% end %> - APPEND_ITEM PASSIVE_RTS_EXE_CNT 16 UINT "Total count of RTS sequences not initiated because the LC state is set to LC_STATE_PASSIVE." - APPEND_ITEM WPS_IN_USE 16 UINT "How many watchpoints are currently in effect." - APPEND_ITEM ACTIVE_APS 16 UINT "How many actionpoints are currently active." - APPEND_ITEM PAD16 16 UINT "16 bit pad" - APPEND_ITEM AP_SAMPLE_CNT 32 UINT "Total count of Actionpoints sampled." - APPEND_ITEM MONITORED_MSG_CNT 32 UINT "Total count of messages monitored for watchpoints." - APPEND_ITEM RTS_EXE_CNT 32 UINT "Total count of RTS sequences initiated." + APPEND_ITEM PASSIVE_RTS_EXEC_CNT 16 UINT "Total count of RTS sequences not initiated because the LC state is set to LC_STATE_PASSIVE." + APPEND_ITEM WPS_IN_USE 16 UINT "How many watchpoints are currently in effect." + APPEND_ITEM ACTIVE_APS 16 UINT "How many actionpoints are currently active." + APPEND_ITEM PAD16 16 UINT "16 bit pad" + APPEND_ITEM AP_SAMPLE_CNT 32 UINT "Total count of Actionpoints sampled." + APPEND_ITEM MONITORED_MSG_CNT 32 UINT "Total count of messages monitored for watchpoints." + APPEND_ITEM RTS_EXEC_CNT 32 UINT "Total count of RTS sequences initiated." diff --git a/targets/CFS/lib/cfs_cmd_tlm_list.rb b/targets/CFS/lib/cfs_cmd_tlm_list.rb index 3e0e9d4..3eae12f 100644 --- a/targets/CFS/lib/cfs_cmd_tlm_list.rb +++ b/targets/CFS/lib/cfs_cmd_tlm_list.rb @@ -391,7 +391,7 @@ def initialize(params) packet_names: [ "LC_CMD_NOOP", "LC_CMD_RESET_COUNTERS", - "LC_CMD_SET_APP_STATE", + "LC_CMD_SET_LC_STATE", "LC_CMD_SET_AP_STATE", "LC_CMD_SET_AP_PERM_OFF", "LC_CMD_RESET_AP_STATS", diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py index 8fe0690..b86e98c 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py @@ -30,16 +30,17 @@ def test_00_aliveness(self): cmd(f"<%= target_name %> LC_CMD_RESET_COUNTERS") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == 0", 100) - def test_01_set_app_state(self): + + def test_01_set_lc_state(self): """ - FSW App State Test - - Send Set App State Command for ACTIVE, PASSIVE, and DISABLED + FSW LC State Test + - Send Set LC State Command for ACTIVE, PASSIVE, and DISABLED then verify the command was received (by checking the command counter incremented and state was set) - - Send Set App State Command with invalid state + - Send Set LC State Command with invalid state then verify the command was received (by checking the command error counter) """ - Group.print(f"Testing LC set app state command on <%= target_name %>") + Group.print(f"Testing LC set LC State command on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) wait_check_packet(f"<%= target_name %>", f"LC_HK", 1, 100) @@ -48,42 +49,58 @@ def test_01_set_app_state(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") - # Check accepted Set App State = 1 command - cmd(f"<%= target_name %> LC_CMD_SET_APP_STATE with NEW_STATE ACTIVE") + # Check accepted Set LC State = 1 command + cmd(f"<%= target_name %> LC_CMD_SET_LC_STATE with NEW_LC_STATE ACTIVE") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) - wait_check(f"<%= target_name %> LC_HK APP_STATE == 'ACTIVE'", 100) + wait_check(f"<%= target_name %> LC_HK CURRENT_LC_STATE == 'ACTIVE'", 100) + # NOTE: Expected event message: "Set LC state command: new state = 1" - # Check accepted Set App State = 2 command - cmd(f"<%= target_name %> LC_CMD_SET_APP_STATE with NEW_STATE PASSIVE") + # Check accepted Set LC State = 2 command + cmd(f"<%= target_name %> LC_CMD_SET_LC_STATE with NEW_LC_STATE PASSIVE") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 2}", 100) - wait_check(f"<%= target_name %> LC_HK APP_STATE == 'PASSIVE'", 100) + wait_check(f"<%= target_name %> LC_HK CURRENT_LC_STATE == 'PASSIVE'", 100) + # NOTE: Expected event message: "Set LC state command: new state = 2" - # Check accepted Set App State = 3 command - cmd(f"<%= target_name %> LC_CMD_SET_APP_STATE with NEW_STATE DISABLED") + # Check accepted Set LC State = 3 command + cmd(f"<%= target_name %> LC_CMD_SET_LC_STATE with NEW_LC_STATE DISABLED") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 3}", 100) - wait_check(f"<%= target_name %> LC_HK APP_STATE == 'DISABLED'", 100) + wait_check(f"<%= target_name %> LC_HK CURRENT_LC_STATE == 'DISABLED'", 100) + # NOTE: Expected event message: "Set LC state command: new state = 3" - # Check accepted Set App State = 4 (invalid) command - cmd(f"<%= target_name %> LC_CMD_SET_APP_STATE with NEW_STATE 4") - wait_check(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER == {cmd_err_count + 1}", 100) - - def disabled_test_02_set_ap_state(self): + # Check accepted Set LC State = 4 (invalid) command + cmd(f"<%= target_name %> LC_CMD_SET_LC_STATE with NEW_LC_STATE 4") + wait_check(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER == {cmd_err_count + 1}", 100) + # NOTE: Expected event message: "Set LC state error: invalid state = 4" + + + def test_02_set_ap_state(self): """ FSW AP State Test - Send Set AP State Command for ACTIVE, PASSIVE, DISABLED, and PERM_OFF then verify the command was received (by checking the command counter incremented and state was set) - - Send Set App State Command with invalid state + - Send Set LC State Command with invalid state then verify the command was received (by checking the command error counter) """ Group.print(f"Testing LC set ap state command on <%= target_name %>") # Load table for test - # cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '/cf/lc_def_adt.tbl'") - # cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG ACTIVE, TABLE_NAME 'LC.LC_ADT'") + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '/cf/lc_def_adt-test.tbl'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + # Validate table for test + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME 'LC.LC_ADT'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + # Activate table for test + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_TBL_CMD_ACTIVATE with TABLE_NAME 'LC.LC_ADT'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify that we have a recent packet (by waiting for a new one to arrive) wait_check_packet(f"<%= target_name %>", f"LC_HK", 1, 100) @@ -92,36 +109,36 @@ def disabled_test_02_set_ap_state(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") # Check accepted Set AP State = 1 command - cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_ID 0, NEW_STATE ACTIVE") + cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_NUMBER 0, NEW_AP_STATE ACTIVE") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) - wait_check(f"<%= target_name %> LC_HK AP_1_STATE == 'ACTIVE'", 100) + wait_check(f"<%= target_name %> LC_HK AP_0_STATE == 'ACTIVE'", 100) + # NOTE: Expected event message: "Set AP state command: AP = 0, New state = 1" # Check accepted Set AP State = 2 command - cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_ID 0, NEW_STATE PASSIVE") + cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_NUMBER 0, NEW_AP_STATE PASSIVE") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 2}", 100) - wait_check(f"<%= target_name %> LC_HK AP_1_STATE == 'PASSIVE'", 100) + wait_check(f"<%= target_name %> LC_HK AP_0_STATE == 'PASSIVE'", 100) + # NOTE: Expected event message: "Set AP state command: AP = 0, New state = 2" - # Check accepted Set App State = 3 command - cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_ID 0, NEW_STATE DISABLED") + # Check accepted Set AP State = 3 command + cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_NUMBER 0, NEW_AP_STATE DISABLED") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 3}", 100) - wait_check(f"<%= target_name %> LC_HK AP_1_STATE == 'DISABLED'", 100) - - # Check accepted Set App State = 4 command - cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_ID 0, NEW_STATE PERM_OFF") - wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 4}", 100) - wait_check(f"<%= target_name %> LC_HK AP_1_STATE == 'PERM_OFF'", 100) + wait_check(f"<%= target_name %> LC_HK AP_0_STATE == 'DISABLED'", 100) + # NOTE: Expected event message: "Set AP state command: AP = 0, New state = 3" - # Check accepted Set App State = 5 (invalid) command - cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_ID 0, NEW_STATE 5") - wait_check(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER == {cmd_err_count + 1}", 100) + # Check accepted Set AP State = 4 (invalid) command + cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_NUMBER 0, NEW_AP_STATE PERM_OFF") + wait_check(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER == {cmd_err_count + 1}", 100) + # NOTE: Expected event message: "Set AP state error: AP = %d, Invalid new state = 4" + - def disabled_test_03_set_ap_perm_off(self): + def test_03_set_ap_perm_off(self): """ FSW AP Perm Off Test - - Send Set AP Perm Off Command with AP_ID 0 + - Send Set AP Perm Off Command with AP_NUMBER 0 then verify the command was received (by checking the command counter incremented) """ @@ -129,9 +146,20 @@ def disabled_test_03_set_ap_perm_off(self): Group.print(f"Testing LC set ap perm off command on <%= target_name %>") # Load table for test - # cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '/cf/lc_def_adt.tbl'") - # cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG ACTIVE, TABLE_NAME 'LC.LC_ADT'") + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_TBL_CMD_LOAD with LOAD_FILENAME '/cf/lc_def_adt-test.tbl'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + # Validate table for test + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_TBL_CMD_VALIDATE with ACTIVE_TABLE_FLAG INACTIVE, TABLE_NAME 'LC.LC_ADT'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # Activate table for test + cmd_count = tlm(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_TBL_CMD_ACTIVATE with TABLE_NAME 'LC.LC_ADT'") + wait_check(f"<%= target_name %> CFE_TBL_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # Verify that we have a recent packet (by waiting for a new one to arrive) wait_check_packet(f"<%= target_name %>", f"LC_HK", 1, 100) @@ -139,16 +167,18 @@ def disabled_test_03_set_ap_perm_off(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") # Check accepted Set AP Perm Off Command - cmd(f"<%= target_name %> LC_CMD_SET_AP_PERM_OFF with AP_ID 0") + cmd(f"<%= target_name %> LC_CMD_SET_AP_PERM_OFF with AP_NUMBER 0") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # NOTE: Expected event message: "Set AP permanently off command: AP = 4" + def test_04_reset_ap_stats(self): """ FSW AP Stats Test - - Send Reset AP Stats Command for AP_ID 0 + - Send Reset AP Stats Command for AP_NUMBER 0 then verify the command was received (by checking the command counter incremented) """ @@ -162,16 +192,18 @@ def test_04_reset_ap_stats(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") # Check accepted Reset AP Stats Command - cmd(f"<%= target_name %> LC_CMD_RESET_AP_STATS with AP_ID 0") + cmd(f"<%= target_name %> LC_CMD_RESET_AP_STATS with AP_NUMBER 0") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # NOTE: Expected event message: "Reset AP stats command: AP = 0" + def test_05_reset_wp_stats(self): """ FSW WP Stats Test - - Send Reset WP Stats Command for AP_ID 0 + - Send Reset WP Stats Command for AP_NUMBER 0 then verify the command was received (by checking the command counter incremented) """ @@ -185,11 +217,13 @@ def test_05_reset_wp_stats(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") # Check accepted Reset WP Stats Command - cmd(f"<%= target_name %> LC_CMD_RESET_WP_STATS with WP_ID 0") + cmd(f"<%= target_name %> LC_CMD_RESET_WP_STATS with WP_NUMBER 0") wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # NOTE: Expected event message: "Reset WP stats command: WP = 0" + def setup(self): """ @@ -199,6 +233,7 @@ def setup(self): """ pass + def teardown(self): """ Test Group Setup From b0df274c8b54105e1a529e15ac154c03a59e1e45 Mon Sep 17 00:00:00 2001 From: Cameron Sykes Date: Wed, 8 Apr 2026 13:59:35 -0400 Subject: [PATCH 27/39] Fix #117, Reorder tests to compute table CRC before reporting it --- .../cfs_cs.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 0d66453..61c5067 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -481,33 +481,34 @@ def test_26_DisableTables(self): wait_check(f"<%= target_name %> CS_HK Tablescsstate == 'DISABLED'", 100) - def test_28_ReportBaselineTable(self): + def test_28_RecomputeBaselineTable(self): """ - Test the ReportBaselineTable command. + Test the RecomputeBaselineTable command. """ cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") + cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - - def test_29_RecomputeBaselineTable(self): + # Verify any other telemetry changes + # Recomputeinprogress does not stay TRUE long enough to show in packet. + + + def test_29_ReportBaselineTable(self): """ - Test the RecomputeBaselineTable command. + Test the ReportBaselineTable command. """ cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") # Verify command count incremented wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - - # Verify any other telemetry changes - # Recomputeinprogress does not stay TRUE long enough to show in packet. + def test_30_EnableNameTable(self): """ From 87914f060e23494a7e739651b281e571098b5947 Mon Sep 17 00:00:00 2001 From: Cameron Sykes Date: Fri, 10 Apr 2026 14:50:23 -0400 Subject: [PATCH 28/39] Fix #91, Update COSMOS Assets to Work with an EDS Build and Default Packet Definition Files Squashed commit of the following: commit 3536acd71facd4d84c45a9c104425083c7541e04 Author: Cameron Sykes Date: Fri Apr 10 14:39:53 2026 -0400 Fix #91, Made SB tests pass so uncomment them, remove debugging output commit 6ffb75c3b53263b5635340f1aae3008b99c62979 Author: Cameron Sykes Date: Fri Apr 10 13:52:19 2026 -0400 Fix #91, Add a guard against applications without EDS implemented, so they don't get tested commit 5ec70b19438f821b3c6a9c3acc6b7cb8f5b91f7e Author: Cameron Sykes Date: Fri Apr 10 10:47:13 2026 -0400 Fix #91, Comment out failing SB tests commit dff3512953f740a6aa088f84c030dda8ead67a19 Author: Cameron Sykes Date: Fri Apr 10 09:29:00 2026 -0400 Fix #91, Remove testing artifact commit 85b5092e82cc9357c4c5a0ddd3f31568207a5917 Author: Cameron Sykes Date: Thu Apr 9 16:18:29 2026 -0400 Fix #91, Mention the new cfs_eds_enabled variable in the plugin commit 3f716897efe5f59ab51feaf443548c7da704e3eb Merge: 2447b4f 0b5e564 Author: Cameron Sykes Date: Thu Apr 9 16:15:12 2026 -0400 Merge branch 'dev' of developer.nasa.gov:cFS/cfs-cosmos-plugin into fix-91-update-cmd-tlm-list-for-eds commit 2447b4f23c23b8e20a3afc5f0349983e3a08ca06 Author: Cameron Sykes Date: Thu Apr 9 14:27:22 2026 -0400 Fix #91, Fix order of AP results commit 3bfc1c6e749480d219d85826e2bd4b97c6baed40 Author: Cameron Sykes Date: Thu Apr 9 14:26:27 2026 -0400 Fix #91, Remove comments from commands and tlm commit e2ec85fdbadfbdfdff434c9542058cd468c569c3 Author: Cameron Sykes Date: Thu Apr 9 11:44:38 2026 -0400 Fix #91, Use python class functions properly commit 58c89511330315c76c84e9dc943c86fed884677a Author: Cameron Sykes Date: Thu Apr 9 11:44:26 2026 -0400 Fix #91, Fix LC command error counter mnemonic commit 62b58a052aff4c8962914aa1bbdc6d0e36230491 Author: Cameron Sykes Date: Wed Apr 8 16:17:28 2026 -0400 Fix #91, Adjust DS command padding commit f87ece49ddc3bfa1d381376b345f7ccb82537e6a Author: Cameron Sykes Date: Wed Apr 8 13:44:37 2026 -0400 Fix #91, Remove unused padding for CI_LAB hk commit 3733af5decee0c029edafede1062a5612002433e Author: Cameron Sykes Date: Wed Apr 8 12:18:25 2026 -0400 Fix #91, Make packet header padding permanent commit e156a2b356f542a0f6a6c28b14472249e0c4d566 Merge: b314b98 c505ffd Author: Cameron Sykes Date: Wed Apr 8 12:08:54 2026 -0400 Merge branch 'dev' of developer.nasa.gov:cFS/cfs-cosmos-plugin into fix-91-update-cmd-tlm-list-for-eds commit b314b98d03b4eb6ca8cf68260295e3922a008eb1 Author: Cameron Sykes Date: Wed Apr 8 12:05:18 2026 -0400 Fix #91, Put in waits for an SC tlm packet every time the command counter is evaluated commit 242533be5d4c0cd3e59a6a45b07f39dbc02d0a09 Author: Cameron Sykes Date: Wed Apr 8 12:03:57 2026 -0400 Fix #91, Fix telemetry point and command param names commit 6ea1d70a176901483df691cb3dd4de92ec475dda Author: Cameron Sykes Date: Wed Apr 8 12:03:34 2026 -0400 Fix #91, Change order of tests to successfully perform checksum of tables commit 3271ba8f9458d2ff48cd03f8b0a6b25769f505df Author: Cameron Sykes Date: Wed Apr 8 12:00:43 2026 -0400 Fix #91, Fix name of SBN send hk command commit 2e43c5273854be9df3cc98a7177accee05da70fe Author: Cameron Sykes Date: Tue Apr 7 13:12:48 2026 -0400 Fix #91, Add back missing SBN send HK command commit 3c51f1a22e8956ff58d21a5f9131aa3cccadfcb1 Author: Cameron Sykes Date: Mon Apr 6 10:55:02 2026 -0400 Fix #91, Correct name of LC set LC state command test commit 3b1eddd34d1d5c22a33657d2707b3399465d46dd Merge: 92ca054 e1ddf1d Author: Cameron Sykes Date: Mon Apr 6 10:40:54 2026 -0400 Fix #91, Update MM packet defs via dev commit 92ca05444011edf6006bf1b53bea5cb00bc0fbd5 Author: Cameron Sykes Date: Thu Apr 2 14:10:22 2026 -0400 Fix #91, Fix table registry packet size mismatch commit 8d66efcd5f3b48c8e82674b29f154da9057d71c6 Author: Cameron Sykes Date: Wed Apr 1 12:50:54 2026 -0400 Fix #91, Fix CS mnemonics commit 89e3f192f0ec5bb57cadfb9167398a5b218576fb Author: Cameron Sykes Date: Tue Mar 31 12:04:29 2026 -0400 Fix #91, Restore CFE_TBL integration test commit b9dea11b34cf38d7531dac3344ab9740a2be423c Author: Cameron Sykes Date: Tue Mar 31 12:04:12 2026 -0400 Fix #91, Consolidate padding into an item array commit 3f317a44f474f9b07f813117c0cc67f701af8156 Author: Cameron Sykes Date: Tue Mar 31 12:03:42 2026 -0400 Fix #91, Rename COMMAND_ERR_COUNTER to COMMAND_ERROR_COUNTER commit 3670b60148f53b447f238b1120360a44795b284f Merge: ae25a7b 660a23f Author: Cameron Sykes Date: Tue Mar 31 10:23:58 2026 -0400 Fix #91, Fix merge conflicts commit ae25a7b0eca21868395b787cd2a97f82ceede9ad Author: Cameron Sykes Date: Tue Mar 31 10:09:25 2026 -0400 Fix #91, Fix Send HK command names to match cfs_cmd_tlm_list.rb commit 7a5e6ac4b1e88f13f38236a098553591794a5a6c Merge: b966c4c 141a50e Author: Cameron Sykes Date: Mon Mar 30 15:57:43 2026 -0400 Merge branch 'dev' of developer.nasa.gov:cFS/cfs-cosmos-plugin into fix-91-update-cmd-tlm-list-for-eds commit b966c4ca7796c8b0eeabecaa5dabeb26187dc2a2 Author: Cameron Sykes Date: Mon Mar 30 15:19:15 2026 -0400 Fix #91, Put back Send HK command, consolidate padding, match mnemonics with source code commit a3e9a837f81dfd115c89cb9c33f7e428f24e3d76 Author: Cameron Sykes Date: Fri Mar 27 15:51:57 2026 -0400 Fix #91, Any packet padding should be named padding commit a572051e7ae3195d6b9c670f7559a1ff9a9f7bb3 Author: Cameron Sykes Date: Fri Mar 27 15:49:47 2026 -0400 Fix #91, SC command padding doesn't need to be sequential commit 78331e867da1827752039b8d2c7ab52ff58b3ef7 Author: Cameron Sykes Date: Fri Mar 27 15:48:14 2026 -0400 Fix #91, Remove app_name where appropriate commit 76e2e3b5cc4d194bf026c93a5a0d8396534acef8 Author: Cameron Sykes Date: Fri Mar 27 15:38:13 2026 -0400 Fix #91, Remove PERM_OFF variable commit 96252654f7e6d5962113d959cbdb5adae4f347c1 Author: Cameron Sykes Date: Thu Mar 26 15:10:42 2026 -0400 Fix #91, Update FM to match source code commit f7b89adef3df783f39877ac7cada8bde45d84149 Author: Cameron Sykes Date: Tue Mar 24 17:02:36 2026 -0400 Fix #91, Optimize placement of padding commit 0dee9d84074139e15259c31d7af6594e1a5b2dfc Author: Cameron Sykes Date: Tue Mar 24 11:59:21 2026 -0400 Fix #91, Line up explicit padding from message definitions commit 9d333eff27d7ec75f045c471fbad6e677f420296 Author: Cameron Sykes Date: Fri Mar 20 11:35:08 2026 -0400 Fix #91, Modify more tlm/cmd names and do some clean up commit 31bae7fcb8ac95999581a61aca3325960d49b79a Author: Cameron Sykes Date: Wed Mar 18 10:23:01 2026 -0400 Fix #91, Fix pkt defs and their uses to match up with FSW commit 032410297de3be53389302e8118832aed60aeb47 Author: Cameron Sykes Date: Thu Mar 12 10:27:11 2026 -0400 Fix #91, Fix alignment of telemetry packets commit fd4d06e43c1bcd4f3c1d5df838b3a67758291243 Author: Cameron Sykes Date: Tue Mar 3 10:46:48 2026 -0500 Fix #91, Use STATEs and default packet def files as well as update packet member names commit 0fbf5b2c855c8e7aa0e5935e6a8b2aec55d74aeb Author: Cameron Sykes Date: Mon Mar 2 15:51:00 2026 -0500 Fix #91, Make tweaks so gem can build commit b9e8ac0dae653e705c04d7a1987e2383edae2e63 Author: Cameron Sykes Date: Mon Mar 2 15:33:48 2026 -0500 Fix #91, Fix differences in EDS and non-EDS versions of packet definitions commit b904b8bb3c482f9e331263e56ece71bf68adde86 Author: Cameron Sykes Date: Mon Feb 23 16:18:03 2026 -0500 Fix #91, Fix TBL integration test to work on EDS build commit d718b6f063cc71eab782e0e16bb6003c27c5af49 Author: Cameron Sykes Date: Mon Feb 23 16:01:30 2026 -0500 Fix #91, Fix SB integration test to work on EDS build commit 95a0c5860916f690f5cf706ceb806e2781d3a513 Author: Cameron Sykes Date: Mon Feb 23 16:00:52 2026 -0500 Fix #91, Use variables to represent overwriting or discarding logs commit e7ef07dced8c7195bc85f179eb43c07439b520cc Author: Cameron Sykes Date: Mon Feb 23 15:00:49 2026 -0500 Fix #91, Adjust LC integration test to work with EDS build commit 93f26898a0864b6fce042670cc0cdf07a24e446c Author: Cameron Sykes Date: Mon Feb 23 14:59:31 2026 -0500 Fix #91, Simplify hex numbers that represent event types commit fa3452bdc3a0d8626d1fddb8b977ff0c195752c4 Author: Cameron Sykes Date: Mon Feb 23 14:58:03 2026 -0500 Fix #91, Adjust ES integration test to work with EDS build commit 01ae6b67ee1c8afd006fcc52e0d0fc35bf61f19b Author: Cameron Sykes Date: Fri Feb 20 11:57:07 2026 -0500 Fix #91, Update telemetry point names and expected values commit 0c42cf51bc33b4ea2b338d9298e1d7d88f661f66 Author: Cameron Sykes Date: Thu Feb 19 15:52:58 2026 -0500 Fix #91, do not use states for event bit mask args, since more than one event type can be given commit a66a460c12b54ffb6a71982d8eb003abccd66503 Author: Cameron Sykes Date: Wed Feb 18 15:18:26 2026 -0500 Fix #91, make stream IDs work for EDS build commit c89a743c4ada0e3e6fe82f165815a6477bc2d0a8 Author: Cameron Sykes Date: Tue Feb 17 15:42:22 2026 -0500 Fix #91, remove EDS check for msg IDs commit b08683ea7c47022d9db14180d00a85baad0efa75 Author: Cameron Sykes Date: Tue Feb 17 09:30:36 2026 -0500 Fix #91, Remove EDS specific stream IDs commit 2904c2032628aae05bd70cf3e0b2b0360b1f0023 Author: Cameron Sykes Date: Tue Feb 10 13:20:23 2026 -0500 Fix #91, allow different stream ID for EDS packets commit a1e41485ec798e2aee8a18f02979db200c37bb88 Author: Cameron Sykes Date: Tue Feb 10 13:18:29 2026 -0500 Fix #91, provide variable for EDS enabling commit 46d1553fa8b059aedbe2a00a2f0978aa6d877a8f Author: Cameron Sykes Date: Mon Feb 9 13:29:39 2026 -0500 Fix #91, add CFE test case packet commit 31001d772bc80c5317a582513b0065c056717dfb Author: Cameron Sykes Date: Mon Feb 9 10:15:51 2026 -0500 Fix #91, fix names of commands to match source code commit d3ad2029237d49a20dd38c83b46c631fd01988d1 Author: Cameron Sykes Date: Mon Feb 9 09:57:46 2026 -0500 Fix #91, add to_lab data types telemetry packet commit 39d8e5d7ce9f0852f59a88200c4680c129712f8d Author: Cameron Sykes Date: Mon Feb 9 09:55:52 2026 -0500 Fix #91, update name of commands run in integration tests commit 36293f5f3c40c75dd2bfb2a11201af2fcac9ce01 Author: Cameron Sykes Date: Mon Feb 9 09:55:23 2026 -0500 Fix #91, tbl is not fully spelled out commit 0f1167cda4e61ad0539222336ab25731f9543be7 Author: Cameron Sykes Date: Fri Feb 6 12:49:20 2026 -0500 Fix #91, update command definition files to have commands match command handler names commit efb91cd97d3b56ac3b73043a56bb7bace4dd786e Author: Cameron Sykes Date: Fri Feb 6 12:36:02 2026 -0500 Fix #91, make SC command names match command handlers and add missing command commit 9d26f93109351e83379432b9894dbd0072f64934 Author: Cameron Sykes Date: Fri Feb 6 12:33:00 2026 -0500 Fix #91, rename MM commands to match their command handler functions commit bbfc861fab229bc11bce37c7495f9c2cbdf09313 Author: Cameron Sykes Date: Fri Feb 6 12:02:19 2026 -0500 Fix #91, rename LC command commit 1ca665657e46604c8d7e87df0791056afddc53f9 Author: Cameron Sykes Date: Fri Feb 6 11:03:25 2026 -0500 Fix #91, missed some HS command renames commit 3cbb005d9d9f26a5974c2667caf3bc35916279cd Author: Cameron Sykes Date: Fri Feb 6 10:45:35 2026 -0500 Fix #91, update command names in HS integration test commit f8003df0dd62dde46cd160c73d272affa4f582c9 Author: Cameron Sykes Date: Thu Feb 5 17:00:06 2026 -0500 Fix #91, update LC command definitions to match source code commit 831e38993c91cb219cb37831799dd7717123ffbc Author: Cameron Sykes Date: Thu Feb 5 16:59:35 2026 -0500 Fix #91, update HK command definitions to match source code commit edfc33dc9b8568f5c027192c383be9cead334635 Author: Cameron Sykes Date: Thu Feb 5 16:58:25 2026 -0500 Fix #91, update HS command packet definition to mirror source code commit 928694e4559c68e1c01e02ca4f3183e05550fc1c Author: Cameron Sykes Date: Thu Feb 5 16:54:10 2026 -0500 Fix #91, make LC command in list match command function name commit c3055d30e7211b308b6ec6fa7b5c4d2688c4cc49 Author: Cameron Sykes Date: Thu Feb 5 16:44:30 2026 -0500 Fix #91, make HS commands mirror command handler signatures commit d937631193c960a7f95bc87ac0b10e908c39a46b Author: Cameron Sykes Date: Thu Feb 5 16:07:40 2026 -0500 Fix #91, add the app the combined HK packet is scoped to commit 4ec5889e08629d2e0139157e42b030b90b40c1f4 Author: Cameron Sykes Date: Thu Feb 5 14:54:08 2026 -0500 Fix #91, modify name of FM freespace monitor packet name to match EDS generated packet name commit d514a30df9ecaac045dedde8d847cf5627d24554 Author: Cameron Sykes Date: Thu Feb 5 11:46:15 2026 -0500 Fix #91, use the names of the CS command functions for cmd headers commit 242446904489ebec4f0227d1cedc93ea10fd31b2 Author: Cameron Sykes Date: Thu Feb 5 11:38:22 2026 -0500 Update names of CS commands --- README.md | 4 + plugin.txt | 4 +- targets/CFS/cmd_tlm/cf_cmd_def.txt | 61 ++---- targets/CFS/cmd_tlm/cf_tlm_def.txt | 35 +++- targets/CFS/cmd_tlm/cfe_es_cmd_def.txt | 10 +- targets/CFS/cmd_tlm/cfe_es_tlm_def.txt | 61 +++--- targets/CFS/cmd_tlm/cfe_evs_cmd_def.txt | 18 +- targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt | 9 +- targets/CFS/cmd_tlm/cfe_sb_cmd_def.txt | 12 +- targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt | 33 ++- targets/CFS/cmd_tlm/cfe_tbl_cmd_def.txt | 2 +- targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt | 17 +- targets/CFS/cmd_tlm/cfe_time_cmd_def.txt | 6 +- targets/CFS/cmd_tlm/cfe_time_tlm_def.txt | 10 +- targets/CFS/cmd_tlm/ci_lab_cmd_def.txt | 2 +- targets/CFS/cmd_tlm/cs_cmd_def.txt | 64 +++--- targets/CFS/cmd_tlm/cs_tlm_def.txt | 58 +++--- targets/CFS/cmd_tlm/ds_cmd_def.txt | 29 ++- targets/CFS/cmd_tlm/ds_tlm_def.txt | 4 +- targets/CFS/cmd_tlm/fm_cmd_def.txt | 64 +++--- targets/CFS/cmd_tlm/fm_tlm_def.txt | 55 +++-- targets/CFS/cmd_tlm/hk_cmd_def.txt | 2 +- targets/CFS/cmd_tlm/hk_tlm_def.txt | 10 +- targets/CFS/cmd_tlm/hs_cmd_def.txt | 22 +- targets/CFS/cmd_tlm/hs_tlm_def.txt | 4 +- targets/CFS/cmd_tlm/lc_cmd_def.txt | 2 +- targets/CFS/cmd_tlm/lc_tlm_def.txt | 10 +- targets/CFS/cmd_tlm/md_cmd_def.txt | 2 +- targets/CFS/cmd_tlm/mm_cmd_def.txt | 163 +++++++-------- targets/CFS/cmd_tlm/mm_tlm_def.txt | 24 +-- targets/CFS/cmd_tlm/sample_app_cmd_def.txt | 2 +- targets/CFS/cmd_tlm/sample_app_tlm_def.txt | 3 +- targets/CFS/cmd_tlm/sbn_cmd_def.txt | 4 +- targets/CFS/cmd_tlm/sc_cmd_def.txt | 70 +++---- targets/CFS/cmd_tlm/sc_tlm_def.txt | 4 +- targets/CFS/cmd_tlm/to_lab_cmd_def.txt | 2 +- targets/CFS/cmd_tlm/to_lab_tlm_def.txt | 18 ++ targets/CFS/lib/cfs_cmd_tlm_list.rb | 132 ++++++------ targets/CFS/lib/cfs_packet_headers.rb | 2 - .../cfs_test_groups_for_cfe/cfe_es.py | 105 ++++++---- .../cfs_test_groups_for_cfe/cfe_evs.py | 188 ++++++++---------- .../cfs_test_groups_for_cfe/cfe_sb.py | 78 ++++---- .../cfs_test_groups_for_cfe/cfe_time.py | 42 ++-- .../cfs_ci_lab.py | 15 +- .../cfs_cf.py | 60 ++++-- .../cfs_cs.py | 131 ++++++------ .../cfs_ds.py | 23 ++- .../cfs_fm.py | 95 ++++----- .../cfs_hk.py | 15 +- .../cfs_hs.py | 157 +++++++-------- .../cfs_lc.py | 19 +- .../cfs_md.py | 91 ++++----- .../cfs_mm.py | 44 ++-- .../cfs_sample_app.py | 37 ++-- .../cfs_sc.py | 84 ++++---- targets/CFS/procedures/cfs_test_suite.py | 10 +- targets/CFS/procedures/get_file_info.py | 4 +- 57 files changed, 1148 insertions(+), 1084 deletions(-) diff --git a/README.md b/README.md index 62b142b..08c3edb 100644 --- a/README.md +++ b/README.md @@ -89,12 +89,16 @@ Navigate to `http://localhost:2900` in a web browser to access the OpenC3 COSMOS 1. Go to the OpenC3 Admin Tool, Plugins Tab 1. Click the paperclip icon and choose your plugin.gem file 1. Fill out the plugin parameters: + * `cfs_eds_enabled` + - Default: `false` + - If running FSW built with EDS enabled, use `true` * `cfs_mem_addr_size` - Default: `64` - If running a 32-bit system, use `32` * `cfs_endianness` - Default: `LITTLE_ENDIAN` - If running on a big endian system, use `BIG_ENDIAN` + - If running FSW built with EDS enabled, use `BIG_ENDIAN` * `cfs_1_intf_ip` and `cfs_2_intf_ip`: - Default: `172.17.0.1` - This should match the IP address listed for the default docker network bridge (`docker0`) diff --git a/plugin.txt b/plugin.txt index 85bdcd3..0126958 100644 --- a/plugin.txt +++ b/plugin.txt @@ -4,8 +4,8 @@ <% require 'cfs_fleet_globals' %> # To expose the EDS enabled flag to the plugin install, uncomment the lines below -# VARIABLE cfs_eds_enabled false -# <% cfs_globals_set_eds_enabled(cfs_eds_enabled) %> +VARIABLE cfs_eds_enabled false +<% cfs_globals_set_eds_enabled(cfs_eds_enabled) %> # To set the memory size, uncomment the lines below VARIABLE cfs_mem_addr_size 64 diff --git a/targets/CFS/cmd_tlm/cf_cmd_def.txt b/targets/CFS/cmd_tlm/cf_cmd_def.txt index c1a3251..26e64d1 100644 --- a/targets/CFS/cmd_tlm/cf_cmd_def.txt +++ b/targets/CFS/cmd_tlm/cf_cmd_def.txt @@ -1,6 +1,6 @@ -<%= cfs_cmd_hdr(target_name, 'CF_SEND_HK_CMD', 0, "CF Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CF_SEND_HK_CMD', 0, 'CF housekeeping request command') %> -<%= cfs_cmd_hdr(target_name, 'CF_CMD_NOOP', 0, "CF No-Op Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CF_CMD_NOOP', 0, "Generate an info event message with app version") %> <%= cfs_cmd_hdr(target_name, 'CF_CMD_RESET_COUNTERS', 1, "Resets HK TLM parent and child task counters") %> APPEND_PARAMETER RESET_TYPE 8 UINT 0 4 0 "Reset Value Type" @@ -9,22 +9,20 @@ STATE FAULT 2 STATE RX 3 STATE TX 4 - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_TX_FILE', 2, "Send file from Spacecraft to Ground") %> APPEND_PARAMETER CFDP_CLASS 8 UINT 0 1 0 "CFDP class: CLASS_1=0 CLASS_2=1" STATE CLASS_1 0 STATE CLASS_2 1 - APPEND_PARAMETER KEEP 8 INT 0 1 0 "Keep file flag: 1=keep, else delete" + APPEND_PARAMETER KEEP_FILE_FLAG 8 INT 0 1 0 "Keep file flag: 1=keep, else delete" STATE DELETE 0 STATE KEEP 1 APPEND_PARAMETER CHAN_NUM 8 UINT 0 1 0 "Channel number" APPEND_PARAMETER PRIORITY 8 UINT 0 255 0 "Priority: 0=highest priority" APPEND_PARAMETER DEST_ID 32 UINT 0 MAX_UINT32 0 "Destination entity id" APPEND_PARAMETER SRC_FILENAME 512 STRING "" "Source filename" - APPEND_PARAMETER DST_FILENAME 512 STRING "" "Destination filename" + APPEND_PARAMETER DEST_FILENAME 512 STRING "" "Destination filename" <%= cfs_cmd_hdr(target_name, 'CF_CMD_PLAYBACK_DIR', 3, "Playback a directory") %> APPEND_PARAMETER CFDP_CLASS 8 UINT 0 1 0 "CFDP class: CLASS_1=0 CLASS_2=1" @@ -41,47 +39,35 @@ <%= cfs_cmd_hdr(target_name, 'CF_CMD_FREEZE', 4, "Freeze a channel") %> APPEND_PARAMETER CHANNEL_NUM 8 UINT 0 1 0 "Channel number" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_THAW', 5, "Thaw a channel") %> APPEND_PARAMETER CHANNEL_NUM 8 UINT 0 1 0 "Channel number" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_SUSPEND', 6, "Suspend a transaction") %> APPEND_PARAMETER TRANSACTION_SEQ_NUM 32 UINT 0 MAX_UINT32 0 "Transaction sequence number" APPEND_PARAMETER EID 32 UINT 0 MAX_UINT32 0 "Entity id" APPEND_PARAMETER CHAN 8 UINT 0 255 0 "Channel number: 254=use ts, 255=all channels, else channel" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_RESUME', 7, "Resume a transaction") %> APPEND_PARAMETER TRANSACTION_SEQ_NUM 32 UINT 0 MAX_UINT32 0 "Transaction sequence number" APPEND_PARAMETER EID 32 UINT 0 MAX_UINT32 0 "Entity id" APPEND_PARAMETER CHAN 8 UINT 0 255 0 "Channel number: 254=use ts, 255=all channels, else channel" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_CANCEL', 8, "Cancel a transaction") %> APPEND_PARAMETER TRANSACTION_SEQ_NUM 32 UINT 0 MAX_UINT32 0 "Transaction sequence number" APPEND_PARAMETER EID 32 UINT 0 MAX_UINT32 0 "Entity id" APPEND_PARAMETER CHAN 8 UINT 0 255 0 "Channel number: 254=use ts, 255=all channels, else channel" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_ABANDON', 9, "Abandon a transaction") %> APPEND_PARAMETER TRANSACTION_SEQ_NUM 32 UINT 0 MAX_UINT32 0 "Transaction sequence number" APPEND_PARAMETER EID 32 UINT 0 MAX_UINT32 0 "Entity id" APPEND_PARAMETER CHAN 8 UINT 0 255 0 "Channel number: 254=use ts, 255=all channels, else channel" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_SET_PARAM', 10, "Set a local parameter") %> APPEND_PARAMETER VALUE 32 UINT 0 MAX_UINT32 0 "Parameter value to set" @@ -97,7 +83,7 @@ STATE LOCAL_EID 8 STATE MAX_OUTGOING_MSGS 9 APPEND_PARAMETER CHAN_NUM 8 UINT 0 1 0 "Channel number" - APPEND_PARAMETER SPARE 16 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 16 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_GET_PARAM', 11, "Get a local parameter") %> APPEND_PARAMETER KEY 8 UINT 0 9 0 "Parameter key" @@ -124,20 +110,16 @@ STATE ACTIVE 1 STATE HISTORY 2 STATE ALL 3 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Spare" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Spare" APPEND_PARAMETER FILENAME 512 STRING "" "Filename written to" <%= cfs_cmd_hdr(target_name, 'CF_CMD_ENABLE_DEQUEUE', 16, "Enable dequeue (tx file) for a channel") %> APPEND_PARAMETER CHANNEL_NUM 8 UINT 0 1 0 "Channel number" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_DISABLE_DEQUEUE', 17, "Disable dequeue (tx file) for a channel") %> APPEND_PARAMETER CHANNEL_NUM 8 UINT 0 1 0 "Channel number" - APPEND_PARAMETER SPARE_1 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_2 8 UINT 0 0 0 "Spare" - APPEND_PARAMETER SPARE_3 8 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_ENABLE_DIR_POLLING', 18, "Enable polling directory") %> APPEND_PARAMETER CHANNEL_NUM 8 UINT 0 1 0 "Channel number" @@ -148,7 +130,7 @@ STATE THREE 3 STATE FOUR 4 STATE ALL 255 - APPEND_PARAMETER SPARE 16 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 16 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_DISABLE_DIR_POLLING', 19, "Disable polling directory") %> APPEND_PARAMETER CHANNEL_NUM 8 UINT 0 1 0 "Channel number" @@ -159,7 +141,7 @@ STATE THREE 3 STATE FOUR 4 STATE ALL 255 - APPEND_PARAMETER SPARE 16 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 16 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_PURGE_QUEUE', 21, "Purge queue") %> APPEND_PARAMETER CHANNEL_NUM 8 UINT 0 1 0 "Channel number" @@ -167,13 +149,8 @@ STATE PENDING 0 STATE HISTORY 1 STATE ALL 2 - APPEND_PARAMETER SPARE 16 UINT 0 0 0 "Spare" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 16 "Spare for alignment" <%= cfs_cmd_hdr(target_name, 'CF_CMD_ENABLE_ENGINE', 22, "Enable Engine") %> -<%= cfs_cmd_hdr(target_name, 'CF_CMD_DISABLE_ENGINE', 23, "Disable Engine") %> - - - - - +<%= cfs_cmd_hdr(target_name, 'CF_CMD_DISABLE_ENGINE', 23, "Disable Engine") %> \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/cf_tlm_def.txt b/targets/CFS/cmd_tlm/cf_tlm_def.txt index c3726e4..58e2ca5 100644 --- a/targets/CFS/cmd_tlm/cf_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cf_tlm_def.txt @@ -1,7 +1,7 @@ <%= cfs_tlm_hdr(target_name, 'CF_HK', "CF Hk Tlm Packet") %> APPEND_ITEM COMMAND_COUNTER 16 UINT "Command success counter" APPEND_ITEM COMMAND_ERROR_COUNTER 16 UINT "Command error counter" - APPEND_ITEM SPARE_0 32 UINT "Spare For Alignment" + APPEND_ITEM PADDING 32 UINT <% 2.times do |chan_idx| %> APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_SENT_FILE_DATA_BYTES 64 UINT "Sent file data bytes" APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_SENT_PDU 32 UINT "Sent PDUs counter" @@ -23,7 +23,7 @@ APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_FAULT_NAK_LIMIT 16 UINT "NAK limit exceeded fault counter" APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_FAULT_ACK_LIMIT 16 UINT "ACK limit exceeded fault counter" APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_FAULT_INACTIVITY_TIMER 16 UINT "Inactivity timer exceeded counter" - APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_FAULT_SPARE_0 16 UINT "Spare" + APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_FAULT_PADDING_0 16 UINT "Spare" APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_Q_SIZE_PEND 16 UINT "Queue Size PEND" APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_Q_SIZE_TX 16 UINT "Queue Size TX" APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_Q_SIZE_RX 16 UINT "Queue Size RX" @@ -35,8 +35,7 @@ APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_FROZEN 8 UINT "Frozen state" STATE THAWED 0 STATE FROZEN 1 - APPEND_ARRAY_ITEM CHANNEL_HK_<%= chan_idx %>_SPARE_0 8 UINT 56 "Explicit Spare array" - APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_SPARE_1 16 UINT "Implicit Spare for 64-bit align" + APPEND_ITEM CHANNEL_HK_<%= chan_idx %>_PADDING 8 UINT "Implicit Spare for 64-bit align" <% end %> <%= cfs_tlm_hdr(target_name, 'CF_EOT', "CF EOT Tlm Packet") %> @@ -46,13 +45,29 @@ STATE RX 0 STATE TX 1 APPEND_ITEM STATE 32 UINT "Transaction state" - STATE IDELE 0 - STATE RX_CLASS_1 1 - STATE TX_CLASS_1 2 - STATE RX_CLASS_2 3 - STATE TX_CLASS_2 4 - STATE DROPPED 5 + STATE INIT 1 + STATE RX_CLASS_1 2 + STATE TX_CLASS_1 3 + STATE RX_CLASS_2 4 + STATE TX_CLASS_2 5 + STATE DROPPED 6 + STATE HOLD 7 + STATE INVALID 8 APPEND_ITEM TXN_STAT 32 UINT "Final status code of transaction" + STATE NO_ERROR 0 + STATE POS_ACK_LIMIT_REACHED 1 + STATE KEEP_ALIVE_LIMIT_REACHED 2 + STATE INVALID_TRANSMISSION_MODE 3 + STATE FILESTORE_REJECTION 4 + STATE FILE_CHECKSUM_FAILURE 5 + STATE FILE_SIZE_ERROR 6 + STATE NAK_LIMIT_REACHED 7 + STATE INACTIVITY_DETECTED 8 + STATE INVALID_FILE_STRUCTURE 9 + STATE CHECK_LIMIT_REACHED 10 + STATE UNSUPPORTED_CHECKSUM_TYPE 11 + STATE SUSPEND_REQUEST_RECEIVED 14 + STATE CANCEL_REQUEST_RECEIVED 15 APPEND_ITEM SRC_EID 32 UINT "Source eid of the transaction" APPEND_ITEM PEER_EID 32 UINT "peer_eid is always the 'other guy', same src_eid for RX" APPEND_ITEM FSIZE 32 UINT "File size" diff --git a/targets/CFS/cmd_tlm/cfe_es_cmd_def.txt b/targets/CFS/cmd_tlm/cfe_es_cmd_def.txt index acfec0b..15419d0 100644 --- a/targets/CFS/cmd_tlm/cfe_es_cmd_def.txt +++ b/targets/CFS/cmd_tlm/cfe_es_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'CFE_ES_SEND_HK_CMD', 0, "CFE_ES Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CFE_ES_SEND_HK_CMD', 0, 'CFE_ES housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'CFE_ES_CMD_NOOP', 0, "Telecommand Message") %> @@ -20,12 +20,10 @@ <% end %> APPEND_PARAMETER EXCEPTION_ACTION 8 UINT 0 1 0 "Identifies action to take if exception occurs" STATE RESTART_CPU 0 - STATE RESTART_APP 1 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Spare for alignment" + STATE RESTART_APP 1 + APPEND_PARAMETER PADDING1 8 UINT 0 0 0 APPEND_PARAMETER PRIORITY 16 UINT 0 MAX_UINT16 0 "The new Applications runtime priority." -<% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER SPARE_32 32 UINT 0 0 0 "Spare for 64-bit alignment" -<% end %> + APPEND_PARAMETER PADDING2 32 UINT 0 0 0 <%= cfs_cmd_hdr(target_name, 'CFE_ES_CMD_STOP_APP', 5, "Telecommand Message") %> APPEND_PARAMETER APPLICATION 160 STRING "" "ASCII text string containing Application Name" diff --git a/targets/CFS/cmd_tlm/cfe_es_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_es_tlm_def.txt index a3528f6..78b18bd 100644 --- a/targets/CFS/cmd_tlm/cfe_es_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_es_tlm_def.txt @@ -79,63 +79,66 @@ <% end %> <%= cfs_tlm_hdr(target_name, 'CFE_ES_APP', "CFE_ES App Info Tlm") %> - APPEND_ITEM APP_INFO_RESOURCE_ID 32 UINT "Application or Libary ID for this resource" + APPEND_ITEM RESOURCE_ID 32 UINT "Application or Libary ID for this resource" FORMAT_STRING "0x%08X" - APPEND_ITEM APP_INFO_TYPE 32 UINT "App Type" + APPEND_ITEM TYPE 32 UINT "App Type" STATE CORE 1 STATE EXTERNAL 2 STATE LIBRARY 3 - APPEND_ITEM APP_INFO_NAME 160 STRING "The Registered Name of the Application" - APPEND_ITEM APP_INFO_ENTRY_POINT 160 STRING "The Entry Point label for the Application" - APPEND_ITEM APP_INFO_FILE_NAME 512 STRING "The Filename of the file containing the Application" + APPEND_ITEM NAME 160 STRING "The Registered Name of the Application" + APPEND_ITEM ENTRY_POINT 160 STRING "The Entry Point label for the Application" + APPEND_ITEM FILE_NAME 512 STRING "The Filename of the file containing the Application" <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_ITEM APP_INFO_STACK_SIZE 64 UINT "The Stack Size of the Application" + APPEND_ITEM STACK_SIZE 64 UINT "The Stack Size of the Application" <% else %> - APPEND_ITEM APP_INFO_STACK_SIZE 32 UINT "The Stack Size of the Application" + APPEND_ITEM STACK_SIZE 32 UINT "The Stack Size of the Application" <% end %> - APPEND_ITEM APP_INFO_ADDRESSES_ARE_VALID 32 UINT "Indicates that the Code, Data, and BSS addresses/sizes are valid" + APPEND_ITEM ADDRESSES_ARE_VALID 32 UINT "Indicates that the Code, Data, and BSS addresses/sizes are valid" STATE FALSE 0 STATE TRUE 1 <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_ITEM APP_INFO_CODE_ADDRESS 64 UINT "The Address of the Application Code Segment" + APPEND_ITEM PADDING1 32 UINT "Padding for alignment" + APPEND_ITEM CODE_ADDRESS 64 UINT "The Address of the Application Code Segment" FORMAT_STRING "0x%016X" - APPEND_ITEM APP_INFO_CODE_SIZE 64 UINT "The Code Size of the Application" - APPEND_ITEM APP_INFO_DATA_ADDRESS 64 UINT "The Address of the Application Data Segment" + APPEND_ITEM CODE_SIZE 64 UINT "The Code Size of the Application" + APPEND_ITEM DATA_ADDRESS 64 UINT "The Address of the Application Data Segment" FORMAT_STRING "0x%016X" - APPEND_ITEM APP_INFO_DATA_SIZE 64 UINT "The Data Size of the Application" - APPEND_ITEM APP_INFO_BSS_ADDRESS 64 UINT "The Address of the Application BSS Segment" + APPEND_ITEM DATA_SIZE 64 UINT "The Data Size of the Application" + APPEND_ITEM BSS_ADDRESS 64 UINT "The Address of the Application BSS Segment" FORMAT_STRING "0x%016X" - APPEND_ITEM APP_INFO_BSS_SIZE 64 UINT "The BSS Size of the Application" - APPEND_ITEM APP_INFO_START_ADDRESS 64 UINT "The Start Address of the Application" + APPEND_ITEM BSS_SIZE 64 UINT "The BSS Size of the Application" + APPEND_ITEM START_ADDRESS 64 UINT "The Start Address of the Application" FORMAT_STRING "0x%016X" <% else %> - APPEND_ITEM APP_INFO_CODE_ADDRESS 32 UINT "The Address of the Application Code Segment" + APPEND_ITEM CODE_ADDRESS 32 UINT "The Address of the Application Code Segment" FORMAT_STRING "0x%08X" - APPEND_ITEM APP_INFO_CODE_SIZE 32 UINT "The Code Size of the Application" - APPEND_ITEM APP_INFO_DATA_ADDRESS 32 UINT "The Address of the Application Data Segment" + APPEND_ITEM CODE_SIZE 32 UINT "The Code Size of the Application" + APPEND_ITEM DATA_ADDRESS 32 UINT "The Address of the Application Data Segment" FORMAT_STRING "0x%08X" - APPEND_ITEM APP_INFO_DATA_SIZE 32 UINT "The Data Size of the Application" - APPEND_ITEM APP_INFO_BSS_ADDRESS 32 UINT "The Address of the Application BSS Segment" + APPEND_ITEM DATA_SIZE 32 UINT "The Data Size of the Application" + APPEND_ITEM BSS_ADDRESS 32 UINT "The Address of the Application BSS Segment" FORMAT_STRING "0x%08X" - APPEND_ITEM APP_INFO_BSS_SIZE 32 UINT "The BSS Size of the Application" - APPEND_ITEM APP_INFO_START_ADDRESS 32 UINT "The Start Address of the Application" + APPEND_ITEM BSS_SIZE 32 UINT "The BSS Size of the Application" + APPEND_ITEM START_ADDRESS 32 UINT "The Start Address of the Application" FORMAT_STRING "0x%08X" <% end %> - APPEND_ITEM APP_INFO_EXCEPTION_ACTION 8 UINT "What should occur if Application has an exception" + APPEND_ITEM EXCEPTION_ACTION 8 UINT "What should occur if Application has an exception" STATE RESTART_APP 0 STATE RESTART_CPU 1 - APPEND_ITEM SPARE 8 UINT "Spare for alignment" - APPEND_ITEM APP_INFO_PRIORITY 16 UINT "The Priority of the Application" - APPEND_ITEM APP_INFO_MAIN_TASK_ID 32 UINT "The Application's Main Task ID" + APPEND_ITEM PADDING2 8 UINT "Padding for alignment" + APPEND_ITEM PRIORITY 16 UINT "The Priority of the Application" + APPEND_ITEM MAIN_TASK_ID 32 UINT "The Application's Main Task ID" FORMAT_STRING "0x%08X" - APPEND_ITEM APP_INFO_EXECUTION_COUNTER 32 UINT "The Application's Main Task Execution Counter" - APPEND_ITEM APP_INFO_MAIN_TASK_NAME 160 STRING "The Application's Main Task Name" - APPEND_ITEM APP_INFO_NUM_OF_CHILD_TASKS 32 UINT "Number of Child tasks for an App" + APPEND_ITEM EXECUTION_COUNTER 32 UINT "The Application's Main Task Execution Counter" + APPEND_ITEM MAIN_TASK_NAME 160 STRING "The Application's Main Task Name" + APPEND_ITEM NUM_OF_CHILD_TASKS 32 UINT "Number of Child tasks for an App" + APPEND_ITEM PADDING3 32 UINT "Padding for 64-bit alignment" <%= cfs_tlm_hdr(target_name, 'CFE_ES_MEMSTATS', "CFE_ES Mem Stats Tlm") %> APPEND_ITEM POOL_HANDLE 32 UINT "Handle of memory pool whose stats are being telemetered" FORMAT_STRING "0x%08X" <% if $cfs_globals_mem_addr_size == 64 %> + APPEND_ITEM PADDING 32 UINT APPEND_ITEM POOL_SIZE 64 UINT "Size of Memory Pool (in bytes)" <% else %> APPEND_ITEM POOL_SIZE 32 UINT "Size of Memory Pool (in bytes)" diff --git a/targets/CFS/cmd_tlm/cfe_evs_cmd_def.txt b/targets/CFS/cmd_tlm/cfe_evs_cmd_def.txt index 41c3bd3..74dcc79 100644 --- a/targets/CFS/cmd_tlm/cfe_evs_cmd_def.txt +++ b/targets/CFS/cmd_tlm/cfe_evs_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'CFE_EVS_SEND_HK_CMD', 0, "CFE_EVS Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CFE_EVS_SEND_HK_CMD', 0, 'CFE_EVS housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_NOOP', 0, "Telecommand Message") %> @@ -10,7 +10,7 @@ STATE INFO 2 STATE ERROR 4 STATE CRIT 8 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_DISABLE_EVENT_TYPE', 3, "Telecommand Message") %> APPEND_PARAMETER BIT_MASK 8 UINT 0 255 0 "BitMask to use in the command" @@ -18,13 +18,13 @@ STATE INFO 2 STATE ERROR 4 STATE CRIT 8 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_SET_EVENT_FORMAT_MODE', 4, "Telecommand Message") %> APPEND_PARAMETER MSG_FORMAT 8 UINT 0 1 0 "Format to use in the command" STATE SHORT 0 STATE LONG 1 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_ENABLE_APP_EVENT_TYPE', 5, "Telecommand Message") %> APPEND_PARAMETER APP_NAME 160 STRING "" "Application name to use in the command" @@ -33,7 +33,7 @@ STATE INFO 2 STATE ERROR 4 STATE CRIT 8 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_DISABLE_APP_EVENT_TYPE', 6, "Telecommand Message") %> APPEND_PARAMETER APP_NAME 160 STRING "" "Application name to use in the command" @@ -42,7 +42,7 @@ STATE INFO 2 STATE ERROR 4 STATE CRIT 8 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_ENABLE_APP_EVENTS', 7, "Telecommand Message") %> APPEND_PARAMETER APP_NAME 160 STRING "" "Application name to use in the command" @@ -64,7 +64,7 @@ STATE TWO 2 STATE THREE 4 STATE FOUR 8 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_DISABLE_PORTS', 12, "Telecommand Message") %> APPEND_PARAMETER BIT_MASK 8 UINT 0 255 0 "BitMask to use in the command" @@ -72,7 +72,7 @@ STATE TWO 2 STATE THREE 4 STATE FOUR 8 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_RESET_FILTER', 13, "Telecommand Message") %> APPEND_PARAMETER APP_NAME 160 STRING "" "Application name to use in the command" @@ -100,7 +100,7 @@ APPEND_PARAMETER LOG_MODE 8 UINT 0 1 0 "Mode to use in the command" STATE OVERWRITE 0 STATE DISCARD 1 - APPEND_PARAMETER SPARE 8 UINT 0 0 0 "Pad to even byte" + APPEND_PARAMETER PADDING 8 UINT 0 0 0 "Pad to even byte" <%= cfs_cmd_hdr(target_name, 'CFE_EVS_CMD_CLEAR_LOG', 20, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt index 0abe8b2..f060825 100644 --- a/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_evs_tlm_def.txt @@ -19,9 +19,9 @@ APPEND_ITEM LOG_ENABLED 8 UINT "Current event log enable/disable state" STATE FALSE 0 STATE TRUE 1 - APPEND_ITEM SPARE_1 8 UINT "Spare Alignment Byte 1" - APPEND_ITEM SPARE_2 8 UINT "Spare Alignment Byte 2" - APPEND_ITEM SPARE_3 8 UINT "Spare Alignment Byte 3" + APPEND_ITEM PADDING_1 8 UINT "Spare Alignment Byte 1" + APPEND_ITEM PADDING_2 8 UINT "Spare Alignment Byte 2" + APPEND_ITEM PADDING_3 8 UINT "Spare Alignment Byte 3" <% 16.times do |app_data_index| %> APPEND_ITEM APP_DATA_<%= app_data_index %>_APP_ID 32 UINT "Numerical application identifier" FORMAT_STRING "0x%08X" @@ -43,8 +43,7 @@ APPEND_ITEM PACKET_ID_SPACECRAFT_ID 32 UINT "Spacecraft identifier" APPEND_ITEM PACKET_ID_PROCESSOR_ID 32 UINT "Numeric processor identifier" APPEND_ITEM MESSAGE 976 STRING "Event message string" - APPEND_ITEM SPARE_TO_ALIGN_1 8 UINT "Spare padding for alignment" - APPEND_ITEM SPARE_TO_ALIGN_2 8 UINT "Spare padding for alignment" + APPEND_ARRAY_ITEM PADDING 8 UINT 16 "Packet alignment padding" <%= cfs_tlm_hdr(target_name, 'CFE_EVS_SHORT_EVENT_MSG', "Short Event Message") %> APPEND_ITEM PACKET_ID_APP_NAME 160 STRING "Application name" diff --git a/targets/CFS/cmd_tlm/cfe_sb_cmd_def.txt b/targets/CFS/cmd_tlm/cfe_sb_cmd_def.txt index b4b5ebe..969d5de 100644 --- a/targets/CFS/cmd_tlm/cfe_sb_cmd_def.txt +++ b/targets/CFS/cmd_tlm/cfe_sb_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'CFE_SB_SEND_HK_CMD', 0, "CFE_SB Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CFE_SB_SEND_HK_CMD', 0, 'CFE_SB housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'CFE_SB_CMD_NOOP', 0, "SB task command packet command codes") %> @@ -12,15 +12,21 @@ <%= cfs_cmd_hdr(target_name, 'CFE_SB_CMD_ENABLE_ROUTE', 4, "Telecommand Message") %> APPEND_PARAMETER MSG_ID_VALUE 32 UINT 0 0xFFFF 0 "MsgId Value" APPEND_PARAMETER PIPE 32 UINT 0 MAX_UINT32 0 "Pipe ID of route to be enabled or disabled" - APPEND_PARAMETER SPARE 32 UINT 0 0 0 "Spare bytes to make command even number of bytes" + APPEND_PARAMETER PADDING 32 UINT 0 0 0 "Spare bytes to make command even number of bytes" <%= cfs_cmd_hdr(target_name, 'CFE_SB_CMD_DISABLE_ROUTE', 5, "Telecommand Message") %> APPEND_PARAMETER MSG_ID_VALUE 32 UINT 0 0xFFFF 0 "MsgId Value" APPEND_PARAMETER PIPE 32 UINT 0 MAX_UINT32 0 "Pipe ID of route to be enabled or disabled" - APPEND_PARAMETER SPARE 32 UINT 0 0 0 "Spare bytes to make command even number of bytes" + APPEND_PARAMETER PADDING 32 UINT 0 0 0 "Spare bytes to make command even number of bytes" <%= cfs_cmd_hdr(target_name, 'CFE_SB_CMD_WRITE_PIPE_INFO', 7, "Telecommand Message") %> APPEND_PARAMETER FILENAME 512 STRING "" "Path and Filename of data to be loaded" <%= cfs_cmd_hdr(target_name, 'CFE_SB_CMD_WRITE_MAP_INFO', 8, "Telecommand Message") %> APPEND_PARAMETER FILENAME 512 STRING "" "Path and Filename of data to be loaded" + +<%= cfs_cmd_hdr(target_name, 'CFE_SB_SUB_RPT_CTRL_ENABLE_SUB_REPORTING', 9, "Telecommand Message") %> + +<%= cfs_cmd_hdr(target_name, 'CFE_SB_SUB_RPT_CTRL_DISABLE_SUB_REPORTING', 10, "Telecommand Message") %> + +<%= cfs_cmd_hdr(target_name, 'CFE_SB_SUB_RPT_CTRL_SEND_PREV_SUBS', 11, "Telecommand Message") %> \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt index baef360..d7d14d9 100644 --- a/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_sb_tlm_def.txt @@ -10,7 +10,7 @@ APPEND_ITEM PIPE_OPTS_ERROR_COUNTER 8 UINT "Count of errors in set/get pipe options API" APPEND_ITEM DUPLICATE_SUBSCRIPTIONS_COUNTER 8 UINT "Count of duplicate subscriptions" APPEND_ITEM GET_PIPE_ID_BY_NAME_ERROR_COUNTER 8 UINT "Count of errors in get pipe id by name API" - APPEND_ITEM SPARE_TO_ALIGN 8 UINT "Spare padding for alignment" + APPEND_ITEM PADDING 8 UINT "Spare padding for alignment" APPEND_ITEM PIPE_OVERFLOW_ERROR_COUNTER 16 UINT "Count of pipe overflow errors" APPEND_ITEM MSG_LIMIT_ERROR_COUNTER 16 UINT "Count of msg id to pipe errors" APPEND_ITEM MEM_POOL_HANDLE 32 UINT "Handle to SB's Memory Pool" @@ -40,5 +40,34 @@ APPEND_ITEM PIPE_DEPTH_STATS_<%= pipe_index %>_MAX_QUEUE_DEPTH 16 UINT "Number of messages the pipe can hold" APPEND_ITEM PIPE_DEPTH_STATS_<%= pipe_index %>_CURRENT_QUEUE_DEPTH 16 UINT "Number of messages currently on the pipe" APPEND_ITEM PIPE_DEPTH_STATS_<%= pipe_index %>_PEAK_QUEUE_DEPTH 16 UINT "Peak number of messages in the pipe" - APPEND_ITEM PIPE_DEPTH_STATS_<%= pipe_index %>_SPARE 16 UINT "Spare word to ensure alignment" + APPEND_ITEM PIPE_DEPTH_STATS_<%= pipe_index %>_PADDING 16 UINT "Spare word to ensure alignment" <% end %> + +<%= cfs_tlm_hdr(target_name, 'CFE_SB_ONESUB', "Software bus single subscription telemetry interface") %> + APPEND_ITEM SUB_TYPE 8 UINT "Subscription or Unsubscription" + STATE SUBSCRIPTION 0 + STATE UNSUBSCRIPTION 1 + APPEND_ITEM MSG_ID_VALUE 32 UINT "Internal MsgId Value" + APPEND_ITEM QOS_PRIORITY 8 UINT "Specify high(1) or low(0) message priority for off-board routing, currently unused" + STATE LOW 0 + STATE HIGH 1 + APPEND_ITEM QOS_RELIABILITY 8 UINT "Specify high(1) or low(0) message transfer reliability for off-board routing, currently unused" + STATE LOW 0 + STATE HIGH 1 + APPEND_ITEM PIPE_BASE_TYPE 32 UINT "Unsigned 32 bit integer" + +<%= cfs_tlm_hdr(target_name, 'CFE_SB_ALLSUBS', "Software bus global subscription telemetry interface") %> + APPEND_ITEM PKT_SEGMENT 32 UINT "Pkt number(starts at 1) in the series" + APPEND_ITEM TOTAL_SEGMENTS 32 UINT "Total number of pkts needed to complete the request" + APPEND_ITEM ENTRIES 32 UINT "Number of entries in the pkt" + + <% 20.times do |entry_index| %> + APPEND_ITEM ENTRY_<%= entry_index %>_MSG_ID_VALUE 32 UINT "Internal MsgId Value" + APPEND_ITEM ENTRY_<%= entry_index %>_QOS_PRIORITY 8 UINT "Specify high(1) or low(0) message priority for off-board routing, currently unused" + STATE LOW 0 + STATE HIGH 1 + APPEND_ITEM ENTRY_<%= entry_index %>_QOS_RELIABILITY 8 UINT "Specify high(1) or low(0) message transfer reliability for off-board routing, currently unused" + STATE LOW 0 + STATE HIGH 1 + APPEND_ITEM ENTRY_<%= entry_index %>_PIPE_BASE_TYPE 32 UINT "Unsigned 32 bit integer" + <% end %> \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/cfe_tbl_cmd_def.txt b/targets/CFS/cmd_tlm/cfe_tbl_cmd_def.txt index 0eb15f3..4d60a90 100644 --- a/targets/CFS/cmd_tlm/cfe_tbl_cmd_def.txt +++ b/targets/CFS/cmd_tlm/cfe_tbl_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'CFE_TBL_SEND_HK_CMD', 0, "CFE_TBL Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CFE_TBL_SEND_HK_CMD', 0, 'CFE_TBL housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'CFE_TBL_CMD_NOOP', 0, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt index 57fefae..8e046d1 100644 --- a/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_tbl_tlm_def.txt @@ -14,9 +14,7 @@ APPEND_ITEM FAILED_VAL_COUNTER 8 UINT "Total number of unsuccessful table validations" APPEND_ITEM NUM_VAL_REQUESTS 8 UINT "Unsigned 8 bit integer" APPEND_ITEM NUM_FREE_SHARED_BUFS 8 UINT "Number of free Shared Working Buffers" - APPEND_ITEM SPARE_1 8 UINT "Spare Alignment Byte 1" - APPEND_ITEM SPARE_2 8 UINT "Spare Alignment Byte 2" - APPEND_ITEM SPARE_3 8 UINT "Spare Alignment Byte 3" + APPEND_ARRAY_ITEM PADDING 8 UINT 24 "Padding for alignment" APPEND_ITEM MEM_POOL_HANDLE 32 UINT "Handle to TBL's memory pool" FORMAT_STRING "0x%08X" APPEND_ITEM LAST_UPDATE_TIME_SECONDS 32 UINT "Time of last table update (seconds)" @@ -37,9 +35,7 @@ APPEND_ITEM CRC 32 UINT "Most recently calculated CRC of Table" FORMAT_STRING "0x%08X" <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_ITEM PAD_AFTER_CRC_IN_64_BIT_SYSTEM 32 UINT "Spare padding after CRC field when packet is padded to 64-bit alignment" -<% end %> -<% if $cfs_globals_mem_addr_size == 64 %> + APPEND_ITEM PADDING1 32 UINT APPEND_ITEM ACTIVE_BUFFER_ADDR 64 UINT "Address of Active Buffer" FORMAT_STRING "0x%016X" APPEND_ITEM INACTIVE_BUFFER_ADDR 64 UINT "Address of Inactive Buffer" @@ -56,8 +52,8 @@ <% end %> APPEND_ITEM TIME_OF_LAST_UPDATE_SECONDS 32 UINT "Time when Table was last updated" APPEND_ITEM TIME_OF_LAST_UPDATE_SUBSECONDS 32 UINT "Time when Table was last updated" - APPEND_ITEM FILE_CREATE_TIME_SECS 32 UINT "File creation time from last file loaded into table" - APPEND_ITEM FILE_CREATE_TIME_SUB_SECS 32 UINT "File creation time from last file loaded into table" + APPEND_ITEM FILE_CREATE_TIME_SECONDS 32 UINT "File creation time from last file loaded into table" + APPEND_ITEM FILE_CREATE_TIME_SUB_SECONDS 32 UINT "File creation time from last file loaded into table" APPEND_ITEM TABLE_LOADED_ONCE 8 UINT "Flag indicating whether table has been loaded once or not" STATE FALSE 0 STATE TRUE 1 @@ -76,10 +72,9 @@ APPEND_ITEM CRITICAL 8 UINT "Indicates whether table is Critical or not" STATE FALSE 0 STATE TRUE 1 - APPEND_ITEM BYTE_ALIGN_4 8 UINT "Matches ByteAlign4 Entry in FSW" - APPEND_ARRAY_ITEM IMPlICIT_PACKET_ALIGN 8 UINT 48 "Spare padding to maintain packet byte alignment" + APPEND_ARRAY_ITEM PADDING 8 UINT 56 "Padding for alignment" ITEM TIME_OF_LAST_UPDATE 0 0 DERIVED "Ruby time based on cFE timestamp" READ_CONVERSION unix_time_conversion_epoch_offset.rb TIME_OF_LAST_UPDATE_SECONDS TIME_OF_LAST_UPDATE_SUBSECONDS ITEM FILE_CREATE_TIME 0 0 DERIVED "Ruby time based on cFE timestamp" - READ_CONVERSION unix_time_conversion_epoch_offset.rb FILE_CREATE_TIME_SECS FILE_CREATE_TIME_SUB_SECS + READ_CONVERSION unix_time_conversion_epoch_offset.rb FILE_CREATE_TIME_SECONDS FILE_CREATE_TIME_SUB_SECONDS \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/cfe_time_cmd_def.txt b/targets/CFS/cmd_tlm/cfe_time_cmd_def.txt index 1d64b74..96eb3e8 100644 --- a/targets/CFS/cmd_tlm/cfe_time_cmd_def.txt +++ b/targets/CFS/cmd_tlm/cfe_time_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'CFE_TIME_SEND_HK_CMD', 0, "CFE_TIME Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CFE_TIME_SEND_HK_CMD', 0, 'CFE_TIME housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'CFE_TIME_CMD_NOOP', 0, "Telecommand Message") %> @@ -7,7 +7,7 @@ <%= cfs_cmd_hdr(target_name, 'CFE_TIME_CMD_SEND_DIAGNOSTIC', 2, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'CFE_TIME_CMD_SET_SOURCE', 3, "Telecommand Message") %> - APPEND_PARAMETER TIME_SOURCE 16 INT 1 2 1 "Clock Source Selection Parameters" + APPEND_PARAMETER TIME_SOURCE 16 UINT 1 2 1 "Clock Source Selection Parameters" STATE INTERNAL 1 STATE EXTERNAL 2 @@ -57,7 +57,7 @@ APPEND_PARAMETER SUBSECONDS 32 UINT 0 MAX_UINT32 0 "Unsigned 32 bit integer" <%= cfs_cmd_hdr(target_name, 'CFE_TIME_CMD_SET_SIGNAL', 15, "Telecommand Message") %> - APPEND_PARAMETER TONE_SOURCE 16 INT 1 2 1 "Tone Signal Selection Parameters" + APPEND_PARAMETER TONE_SOURCE 16 UINT 1 2 1 "Tone Signal Selection Parameters" STATE TONE_PRI 1 STATE TONE_RED 2 \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/cfe_time_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_time_tlm_def.txt index bafedba..b4836ee 100644 --- a/targets/CFS/cmd_tlm/cfe_time_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cfe_time_tlm_def.txt @@ -8,10 +8,10 @@ STATE VALID 0 STATE FLYWHEEL 1 APPEND_ITEM LEAP_SECONDS 16 INT "Leap Seconds" - APPEND_ITEM SECONDS_MET 32 UINT "Current MET (secs)" - APPEND_ITEM SUBSECS_MET 32 UINT "Current MET (subsecs)" - APPEND_ITEM SECONDS_STCF 32 UINT "Current STCF (secs)" - APPEND_ITEM SUBSECS_STCF 32 UINT "Current STCF (subsecs)" + APPEND_ITEM MET_SECONDS 32 UINT "Current MET (secs)" + APPEND_ITEM MET_SUBSECS 32 UINT "Current MET (subsecs)" + APPEND_ITEM STCF_SECONDS 32 UINT "Current STCF (secs)" + APPEND_ITEM STCF_SUBSECONDS 32 UINT "Current STCF (subsecs)" <% if $cfs_time_server_config == false %> APPEND_ITEM ADJUSTMENT_FACTOR_SECONDS 32 UINT "Current 1Hz STCF adjustment (secs)" APPEND_ITEM ADJUSTMENT_FACTOR_SUBSECONDS 32 UINT "Current 1Hz STCF adjustment (subsecs)" @@ -45,7 +45,7 @@ APPEND_ITEM CURRENT_TAI_SUBSECONDS 32 UINT "Current TAI (subecs)" APPEND_ITEM CURRENT_UTC_SECONDS 32 UINT "Current UTC (secs)" APPEND_ITEM CURRENT_UTC_SUBSECONDS 32 UINT "Current UTC (subsecs)" - APPEND_ITEM CLOCK_SET_STATE 16 UINT "Time has been set" + APPEND_ITEM CLOCK_SET_STATE 16 INT "Time has been set" STATE NOT_SET 0 STATE WAS_SET 1 APPEND_ITEM CLOCK_FLY_STATE 16 INT "Current fly-wheel state" diff --git a/targets/CFS/cmd_tlm/ci_lab_cmd_def.txt b/targets/CFS/cmd_tlm/ci_lab_cmd_def.txt index 6e06d08..6b071f0 100644 --- a/targets/CFS/cmd_tlm/ci_lab_cmd_def.txt +++ b/targets/CFS/cmd_tlm/ci_lab_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'CI_LAB_SEND_HK_CMD', 0, "CI_LAB Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CI_LAB_SEND_HK_CMD', 0, 'CI_LAB housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'CI_LAB_CMD_NOOP', 0, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/cs_cmd_def.txt b/targets/CFS/cmd_tlm/cs_cmd_def.txt index 1c0bd70..9a188bd 100644 --- a/targets/CFS/cmd_tlm/cs_cmd_def.txt +++ b/targets/CFS/cmd_tlm/cs_cmd_def.txt @@ -1,17 +1,17 @@ -<%= cfs_cmd_hdr(target_name, 'CS_SEND_HK_CMD', 0, "CS Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'CS_SEND_HK_CMD', 0, 'CS housekeeping request command') %> -<%= cfs_cmd_hdr(target_name, 'CS_CMD_NOOP', 0, "Noop") %> +<%= cfs_cmd_hdr(target_name, 'CS_CMD_NOOP', 0, "Generate an info event message with app version") %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_RESET_COUNTERS', 1, "Reset CS counters") %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_ONE_SHOT', 2, "Telecommand Message") %> <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER ADDRESS 64 UINT MIN MAX 0 "Address to start checksum" + APPEND_PARAMETER ADDRESS 64 UINT 0 9223372036854775807 0 "Address to start checksum" <% else %> - APPEND_PARAMETER ADDRESS 32 UINT MIN MAX 0 "Address to start checksum" + APPEND_PARAMETER ADDRESS 32 UINT 0 4294967295 0 "Address to start checksum" <% end %> - APPEND_PARAMETER SIZE 32 UINT MIN MAX 0 "Number of bytes to checksum" - APPEND_PARAMETER MAX_BYTES_PER_CYCLE 32 UINT MIN MAX 0 "Max Number of bytes to compute per cycle. Value of Zero to use platform config value" + APPEND_PARAMETER SIZE 32 UINT 0 4294967295 0 "Number of bytes to checksum" + APPEND_PARAMETER MAX_BYTES_PER_CYCLE 32 UINT 0 4294967295 0 "Max Number of bytes to compute per cycle. Value of Zero to use platform config value" <%= cfs_cmd_hdr(target_name, 'CS_CMD_CANCEL_ONE_SHOT', 3, "Telecommand Message") %> @@ -39,46 +39,46 @@ <%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_EEPROM', 15, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'CS_CMD_REPORT_BASELINE_EEPROM', 16, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" +<%= cfs_cmd_hdr(target_name, 'CS_CMD_REPORT_BASELINE_ENTRY_ID_EEPROM', 16, "Telecommand Message") %> + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_RECOMPUTE_BASELINE_EEPROM', 17, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" -<%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_ENTRY_EEPROM', 18, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" +<%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_ENTRY_ID_EEPROM', 18, "Telecommand Message") %> + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" -<%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_ENTRY_EEPROM', 19, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" +<%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_ENTRY_ID_EEPROM', 19, "Telecommand Message") %> + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_GET_ENTRY_ID_EEPROM', 20, "Telecommand Message") %> <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER Address 64 UINT MIN MAX 0 "Address to get the ID for" + APPEND_PARAMETER ADDRESS 64 UINT 0 9223372036854775807 0 "Address to get the ID for" <% else %> - APPEND_PARAMETER Address 32 UINT MIN MAX 0 "Address to get the ID for" + APPEND_PARAMETER ADDRESS 32 UINT 0 4294967295 0 "Address to get the ID for" <% end %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_MEMORY', 21, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_MEMORY', 22, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'CS_CMD_REPORT_BASELINE_MEMORY', 23, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" +<%= cfs_cmd_hdr(target_name, 'CS_CMD_REPORT_BASELINE_ENTRY_ID_MEMORY', 23, "Telecommand Message") %> + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_RECOMPUTE_BASELINE_MEMORY', 24, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" -<%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_ENTRY_MEMORY', 25, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" +<%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_ENTRY_ID_MEMORY', 25, "Telecommand Message") %> + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" -<%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_ENTRY_MEMORY', 26, "Telecommand Message") %> - APPEND_PARAMETER EntryID 32 UINT MIN MAX 0 "EntryID to perform a command on" +<%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_ENTRY_ID_MEMORY', 26, "Telecommand Message") %> + APPEND_PARAMETER ENTRY_ID 32 UINT 0 4294967295 0 "EntryID to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_GET_ENTRY_ID_MEMORY', 27, "Telecommand Message") %> <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER Address 64 UINT MIN MAX 0 "Address to get the ID for" + APPEND_PARAMETER ADDRESS 64 UINT 0 9223372036854775807 0 "Address to get the ID for" <% else %> - APPEND_PARAMETER Address 32 UINT MIN MAX 0 "Address to get the ID for" + APPEND_PARAMETER ADDRESS 32 UINT 0 4294967295 0 "Address to get the ID for" <% end %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_TABLES', 28, "Telecommand Message") %> @@ -86,30 +86,30 @@ <%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_TABLES', 29, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_REPORT_BASELINE_TABLE', 30, "Telecommand Message") %> - APPEND_PARAMETER Name 320 STRING "" "Table name to perform a command on" + APPEND_PARAMETER NAME 320 STRING "" "Table name to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_RECOMPUTE_BASELINE_TABLE', 31, "Telecommand Message") %> - APPEND_PARAMETER Name 320 STRING "" "Table name to perform a command on" + APPEND_PARAMETER NAME 320 STRING "" "Table name to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_NAME_TABLE', 32, "Telecommand Message") %> - APPEND_PARAMETER Name 320 STRING "" "Table name to perform a command on" + APPEND_PARAMETER NAME 320 STRING "" "Table name to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_NAME_TABLE', 33, "Telecommand Message") %> - APPEND_PARAMETER Name 320 STRING "" "Table name to perform a command on" + APPEND_PARAMETER NAME 320 STRING "" "Table name to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_APPS', 34, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_APPS', 35, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'CS_CMD_REPORT_BASELINE_APP', 36, "Telecommand Message") %> - APPEND_PARAMETER Name 160 STRING "" "App name to perform a command on" + APPEND_PARAMETER NAME 160 STRING "" "App name to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_RECOMPUTE_BASELINE_APP', 37, "Telecommand Message") %> - APPEND_PARAMETER Name 160 STRING "" "App name to perform a command on" + APPEND_PARAMETER NAME 160 STRING "" "App name to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_ENABLE_NAME_APP', 38, "Telecommand Message") %> - APPEND_PARAMETER Name 160 STRING "" "App name to perform a command on" + APPEND_PARAMETER NAME 160 STRING "" "App name to perform a command on" <%= cfs_cmd_hdr(target_name, 'CS_CMD_DISABLE_NAME_APP', 39, "Telecommand Message") %> - APPEND_PARAMETER Name 160 STRING "" "App name to perform a command on" + APPEND_PARAMETER NAME 160 STRING "" "App name to perform a command on" diff --git a/targets/CFS/cmd_tlm/cs_tlm_def.txt b/targets/CFS/cmd_tlm/cs_tlm_def.txt index 6620903..7894c07 100644 --- a/targets/CFS/cmd_tlm/cs_tlm_def.txt +++ b/targets/CFS/cmd_tlm/cs_tlm_def.txt @@ -1,53 +1,53 @@ <%= cfs_tlm_hdr(target_name, 'CS_HK', "CS Hk Tlm") %> - APPEND_ITEM COMMAND_COUNTER 8 UINT "CS Application Command Counter" - APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "CS Application Command Error Counter" - APPEND_ITEM Checksumstate 8 UINT "CS Application global checksum state" + APPEND_ITEM COMMAND_COUNTER 8 UINT "CS Application Command Counter" + APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "CS Application Command Error Counter" + APPEND_ITEM CHECKSUM_STATE 8 UINT "CS Application global checksum state" STATE ENABLED 1 STATE DISABLED 2 - APPEND_ITEM Eepromcsstate 8 UINT "CS Eeprom table checksum state" + APPEND_ITEM EEPROM_CS_STATE 8 UINT "CS EEPROM table checksum state" STATE ENABLED 1 STATE DISABLED 2 - APPEND_ITEM Memorycsstate 8 UINT "CS Memory table checksum state" + APPEND_ITEM MEMORY_CS_STATE 8 UINT "CS Memory table checksum state" STATE ENABLED 1 STATE DISABLED 2 - APPEND_ITEM Appcsstate 8 UINT "CS App table checksum state" + APPEND_ITEM APP_CS_STATE 8 UINT "CS App table checksum state" STATE ENABLED 1 STATE DISABLED 2 - APPEND_ITEM Tablescsstate 8 UINT "CS Tables table checksum state" + APPEND_ITEM TABLES_CS_STATE 8 UINT "CS Tables table checksum state" STATE ENABLED 1 STATE DISABLED 2 - APPEND_ITEM Oscsstate 8 UINT "OS code segment checksum state" + APPEND_ITEM OS_CS_STATE 8 UINT "OS code segment checksum state" STATE ENABLED 1 STATE DISABLED 2 - APPEND_ITEM Cfecorecsstate 8 UINT "cFE Core code segment checksum stat" + APPEND_ITEM CFE_CORE_CS_STATE 8 UINT "cFE Core code segment checksum stat" STATE ENABLED 1 STATE DISABLED 2 - APPEND_ITEM Recomputeinprogress 8 UINT "CS 'Recompute In Progress' flag" - APPEND_ITEM Oneshotinprogress 8 UINT "CS 'OneShot In Progress' flag" - APPEND_ITEM Filler8 8 UINT "8 bit padding" - APPEND_ITEM Eepromcserrcounter 16 UINT "Eeprom miscompare counter" - APPEND_ITEM Memorycserrcounter 16 UINT "Memory miscompare counter" - APPEND_ITEM Appcserrcounter 16 UINT "App miscompare counter" - APPEND_ITEM Tablescserrcounter 16 UINT "Tables miscompare counter" - APPEND_ITEM Cfecorecserrcounter 16 UINT "cFE core miscompare counter" - APPEND_ITEM Oscserrcounter 16 UINT "OS code segment miscopmare counter" - APPEND_ITEM Currentcstable 16 UINT "Current table being checksummed" + APPEND_ITEM RECOMPUTE_IN_PROGRESS 8 UINT "CS 'Recompute In Progress' flag" + APPEND_ITEM ONE_SHOT_IN_PROGRESS 8 UINT "CS 'OneShot In Progress' flag" + APPEND_ITEM PADDING_8 8 UINT "8 bit padding" + APPEND_ITEM EEPROM_CS_ERR_COUNTER 16 UINT "EEPROM miscompare counter" + APPEND_ITEM MEMORY_CS_ERR_COUNTER 16 UINT "Memory miscompare counter" + APPEND_ITEM APP_CS_ERR_COUNTER 16 UINT "App miscompare counter" + APPEND_ITEM TABLES_CS_ERR_COUNTER 16 UINT "Tables miscompare counter" + APPEND_ITEM CFE_CORE_CS_ERR_COUNTER 16 UINT "cFE core miscompare counter" + APPEND_ITEM OS_CS_ERR_COUNTER 16 UINT "OS code segment miscopmare counter" + APPEND_ITEM CURRENT_CS_TABLE 16 UINT "Current table being checksummed" STATE CFE 0 STATE OS 1 STATE EEPROM 2 STATE MEMORY 3 STATE TABLES 4 STATE APPS 5 - APPEND_ITEM Currententryintable 16 UINT "Current entry ID in table being checksummed" - APPEND_ITEM Eeprombaseline 32 UINT "Baseline checksum for all of Eeprom" - APPEND_ITEM Osbaseline 32 UINT "Baseline checksum for the OS code segment" - APPEND_ITEM Cfecorebaseline 32 UINT "Baseline checksum for the cFE core" + APPEND_ITEM CURRENT_ENTRY_IN_TABLE 16 UINT "Current entry ID in table being checksummed" + APPEND_ITEM EEPROM_BASELINE 32 UINT "Baseline checksum for all of EEPROM" + APPEND_ITEM OS_BASELINE 32 UINT "Baseline checksum for the OS code segment" + APPEND_ITEM CFE_CORE_BASELINE 32 UINT "Baseline checksum for the cFE core" <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_ITEM Lastoneshotaddress 64 UINT "Address used in last one shot checksum command" + APPEND_ITEM LAST_ONE_SHOT_ADDRESS 64 UINT "Address used in last one shot checksum command" <% else %> - APPEND_ITEM Lastoneshotaddress 32 UINT "Address used in last one shot checksum command" + APPEND_ITEM LAST_ONE_SHOT_ADDRESS 32 UINT "Address used in last one shot checksum command" <% end %> - APPEND_ITEM Lastoneshotsize 32 UINT "Size used in the last one shot checksum command" - APPEND_ITEM Lastoneshotmaxbytespercycle 32 UINT "Max bytes per cycle for last one shot checksum command" - APPEND_ITEM Lastoneshotchecksum 32 UINT "Checksum of the last one shot checksum command" - APPEND_ITEM Passcounter 32 UINT "Number of times CS has passed through all of its tables" + APPEND_ITEM LAST_ONE_SHOT_SIZE 32 UINT "Size used in the last one shot checksum command" + APPEND_ITEM LAST_ONE_SHOT_MAX_BYTES_PER_CYCLE 32 UINT "Max bytes per cycle for last one shot checksum command" + APPEND_ITEM LAST_ONE_SHOT_CHECKSUM 32 UINT "Checksum of the last one shot checksum command" + APPEND_ITEM PASS_COUNTER 32 UINT "Number of times CS has passed through all of its tables" diff --git a/targets/CFS/cmd_tlm/ds_cmd_def.txt b/targets/CFS/cmd_tlm/ds_cmd_def.txt index 533a3b7..35d9cf8 100644 --- a/targets/CFS/cmd_tlm/ds_cmd_def.txt +++ b/targets/CFS/cmd_tlm/ds_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'DS_SEND_HK_CMD', 0, "DS Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'DS_SEND_HK_CMD', 0, 'DS housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'DS_CMD_NOOP', 0, "Telecommand Message") %> @@ -8,7 +8,6 @@ APPEND_PARAMETER ENABLE_STATE 16 UINT 0 1 0 "Application enable/disable state" STATE DISABLED 0 STATE ENABLED 1 - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_FILTER_FILE', 3, "Telecommand Message") %> APPEND_PARAMETER MESSAGE_ID 32 UINT 0 MAX_UINT32 0 "Message ID of existing entry in Packet Filter Table" @@ -43,44 +42,40 @@ <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_PATH', 8, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" APPEND_PARAMETER PATHNAME 512 STRING "" "Path portion of filename" <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_BASE', 9, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" APPEND_PARAMETER BASENAME 160 STRING "" "Base portion of filename" <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_EXT', 10, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" APPEND_PARAMETER EXTENSION 64 STRING "" "Extension portion of filename" <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_SIZE', 11, "Telecommand Message") %> - APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" - APPEND_PARAMETER MAX_FILE_SIZE 32 UINT 0 MAX_UINT32 0 "Max file size (bytes) before reopen" + APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 16 "Padding" + APPEND_PARAMETER MAX_FILE_SIZE 32 UINT 0 MAX_UINT32 0 "Max file size (bytes) before reopen" <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_AGE', 12, "Telecommand Message") %> - APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" - APPEND_PARAMETER MAX_FILE_AGE 32 UINT 0 MAX_UINT32 0 "Max file age (seconds)" + APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 16 "Padding" + APPEND_PARAMETER MAX_FILE_AGE 32 UINT 0 MAX_UINT32 0 "Max file age (seconds)" <%= cfs_cmd_hdr(target_name, 'DS_CMD_SET_DEST_COUNT', 13, "Telecommand Message") %> - APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" - APPEND_PARAMETER SEQUENCE_COUNT 32 UINT 0 MAX_UINT32 0 "Sequence count portion of filename" + APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 16 "Padding" + APPEND_PARAMETER SEQUENCE_COUNT 32 UINT 0 MAX_UINT32 0 "Sequence count portion of filename" <%= cfs_cmd_hdr(target_name, 'DS_CMD_CLOSE_FILE', 14, "Telecommand Message") %> APPEND_PARAMETER FILE_TABLE_IDX 16 UINT 0 MAX_UINT16 0 "Index into Destination File Table" - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Padding" <%= cfs_cmd_hdr(target_name, 'DS_CMD_GET_FILE_INFO', 15, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'DS_CMD_ADD_MID', 16, "Telecommand Message") %> - APPEND_PARAMETER MESSAGE_ID 32 UINT 0 MAX_UINT32 0 "Message ID to add to Packet Filter Table" + APPEND_PARAMETER MESSAGE_ID 32 UINT 0 MAX_UINT32 0 "Message ID to add to Packet Filter Table" <%= cfs_cmd_hdr(target_name, 'DS_CMD_REMOVE_MID', 17, "Telecommand Message") %> - APPEND_PARAMETER MESSAGE_ID 32 UINT 0 MAX_UINT32 0 "Message ID to remove from Packet Filter Table" + APPEND_PARAMETER MESSAGE_ID 32 UINT 0 MAX_UINT32 0 "Message ID to remove from Packet Filter Table" <%= cfs_cmd_hdr(target_name, 'DS_CMD_CLOSE_ALL', 18, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/ds_tlm_def.txt b/targets/CFS/cmd_tlm/ds_tlm_def.txt index 1d4c2d0..e73144f 100644 --- a/targets/CFS/cmd_tlm/ds_tlm_def.txt +++ b/targets/CFS/cmd_tlm/ds_tlm_def.txt @@ -6,10 +6,10 @@ APPEND_ITEM FILTER_TBL_LOAD_COUNTER 8 UINT "Count of packet filter table loads" APPEND_ITEM FILTER_TBL_ERR_COUNTER 8 UINT "Count of failed attempts to get table data pointer" APPEND_ITEM APP_ENABLE_STATE 8 UINT "App enable/disable state" - APPEND_ITEM SPARE 8 UINT "Padding" + APPEND_ITEM PADDING 8 UINT "Padding" APPEND_ITEM FILE_WRITE_COUNTER 16 UINT "Count of good destination file writes" APPEND_ITEM FILE_WRITE_ERR_COUNTER 16 UINT "Count of bad destination file writes" - APPEND_ITEM FILE_UPDATE_COUNTER 16 UINT "Count of good good updates to secondary header" + APPEND_ITEM FILE_UPDATE_COUNTER 16 UINT "Count of good updates to secondary header" APPEND_ITEM FILE_UPDATE_ERR_COUNTER 16 UINT "Count of bad updates to secondary header" APPEND_ITEM DISABLED_PKT_COUNTER 32 UINT "Count of packets discarded (DS was disabled)" APPEND_ITEM IGNORED_PKT_COUNTER 32 UINT "Count of packets discarded" diff --git a/targets/CFS/cmd_tlm/fm_cmd_def.txt b/targets/CFS/cmd_tlm/fm_cmd_def.txt index 60ab524..17c2792 100644 --- a/targets/CFS/cmd_tlm/fm_cmd_def.txt +++ b/targets/CFS/cmd_tlm/fm_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'FM_SEND_HK_CMD', 0, "FM Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'FM_SEND_HK_CMD', 0, 'FM housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'FM_CMD_NOOP', 0, "Telecommand Message") %> @@ -8,38 +8,38 @@ APPEND_PARAMETER OVERWRITE 16 UINT 0 1 0 "Allow Overwrite" STATE PROTECTED 0 STATE OVERWRITE 1 - APPEND_PARAMETER SOURCE 512 STRING "" "Source filename" - APPEND_PARAMETER TARGET 512 STRING "" "Target filename" + APPEND_PARAMETER SOURCE_PATH 512 STRING "" "Source filename" + APPEND_PARAMETER TARGET_PATH 512 STRING "" "Target filename" <%= cfs_cmd_hdr(target_name, 'FM_CMD_MOVE_FILE', 3, "Telecommand Message") %> APPEND_PARAMETER OVERWRITE 16 UINT 0 1 0 "Allow Overwrite" STATE PROTECTED 0 STATE OVERWRITE 1 - APPEND_PARAMETER SOURCE 512 STRING "" "Source filename" - APPEND_PARAMETER TARGET 512 STRING "" "Target filename" + APPEND_PARAMETER SOURCE_PATH 512 STRING "" "Source filename" + APPEND_PARAMETER TARGET_PATH 512 STRING "" "Target filename" <%= cfs_cmd_hdr(target_name, 'FM_CMD_RENAME_FILE', 4, "Telecommand Message") %> - APPEND_PARAMETER SOURCE 512 STRING "" "Source filename" - APPEND_PARAMETER TARGET 512 STRING "" "Target filename" + APPEND_PARAMETER SOURCE_PATH 512 STRING "" "Source filename" + APPEND_PARAMETER TARGET_PATH 512 STRING "" "Target filename" <%= cfs_cmd_hdr(target_name, 'FM_CMD_DELETE_FILE', 5, "Telecommand Message") %> - APPEND_PARAMETER FILENAME 512 STRING "" "Delete filename" + APPEND_PARAMETER PATH 512 STRING "" "Path to file to delete" <%= cfs_cmd_hdr(target_name, 'FM_CMD_DELETE_ALL_FILES', 7, "Telecommand Message") %> - APPEND_PARAMETER DIRECTORY 512 STRING "" "Directory name" + APPEND_PARAMETER PATH 512 STRING "" "Path to directory whose contents are to be deleted" <%= cfs_cmd_hdr(target_name, 'FM_CMD_DECOMPRESS_FILE', 8, "Telecommand Message") %> - APPEND_PARAMETER SOURCE 512 STRING "" "Source filename" - APPEND_PARAMETER TARGET 512 STRING "" "Target filename" + APPEND_PARAMETER SOURCE_PATH 512 STRING "" "Source filename" + APPEND_PARAMETER TARGET_PATH 512 STRING "" "Target filename" <%= cfs_cmd_hdr(target_name, 'FM_CMD_CONCAT_FILES', 9, "Telecommand Message") %> - APPEND_PARAMETER SOURCE1 512 STRING "" "Source 1 filename" - APPEND_PARAMETER SOURCE2 512 STRING "" "Source 2 filename" - APPEND_PARAMETER TARGET 512 STRING "" "Target filename" + APPEND_PARAMETER SOURCE_PATH1 512 STRING "" "Source 1 filename" + APPEND_PARAMETER SOURCE_PATH2 512 STRING "" "Source 2 filename" + APPEND_PARAMETER TARGET_PATH 512 STRING "" "Target filename" <%= cfs_cmd_hdr(target_name, 'FM_CMD_GET_FILE_INFO', 10, "Telecommand Message") %> - APPEND_PARAMETER FILENAME 512 STRING "" "Delete filename" - APPEND_PARAMETER FILE_CRC 32 UINT 0 3 0 "CRC Type for file info" + APPEND_PARAMETER PATH 512 STRING "" "Path to file" + APPEND_PARAMETER CRC_METHOD 32 UINT 0 3 0 "CRC method" STATE CRC_NONE 0 STATE CRC_8 1 STATE CRC_16 2 @@ -48,39 +48,35 @@ <%= cfs_cmd_hdr(target_name, 'FM_CMD_GET_OPEN_FILES', 11, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'FM_CMD_CREATE_DIRECTORY', 12, "Telecommand Message") %> - APPEND_PARAMETER DIRECTORY 512 STRING "" "Directory name" + APPEND_PARAMETER PATH 512 STRING "" "Path to creation location" <%= cfs_cmd_hdr(target_name, 'FM_CMD_DELETE_DIRECTORY', 13, "Telecommand Message") %> - APPEND_PARAMETER DIRECTORY 512 STRING "" "Directory name" + APPEND_PARAMETER PATH 512 STRING "" "Path to deletion location" <%= cfs_cmd_hdr(target_name, 'FM_CMD_GET_DIR_LIST_FILE', 14, "Telecommand Message") %> - APPEND_PARAMETER DIRECTORY 512 STRING "" "Directory name" - APPEND_PARAMETER FILENAME 512 STRING "" "Filename" - APPEND_PARAMETER GET_SIZE_TIME_MODE 8 UINT 0 1 0 "Option to query size, time, and mode of files" + APPEND_PARAMETER DIRECTORY_PATH 512 STRING "" "Path to directory to output" + APPEND_PARAMETER OUTPUT_FILE_PATH 512 STRING "" "Path to file that holds output" + APPEND_PARAMETER GET_SIZE_TIME_MODE 8 UINT 0 1 0 "Option to query size, time, and mode of files" STATE FALSE 0 STATE TRUE 1 - APPEND_PARAMETER SPARE1 8 UINT 0 0 0 "Spare byte for alignment" - APPEND_PARAMETER SPARE2 8 UINT 0 0 0 "Spare byte for alignment" - APPEND_PARAMETER SPARE3 8 UINT 0 0 0 "Spare byte for alignment" - + APPEND_ARRAY_PARAMETER PADDING1 8 UINT 24 "Padding for packet alignment" + <%= cfs_cmd_hdr(target_name, 'FM_CMD_GET_DIR_LIST_PKT', 15, "Telecommand Message") %> - APPEND_PARAMETER DIRECTORY 512 STRING "" "Directory name" - APPEND_PARAMETER DIR_LIST_OFFSET 32 UINT 0 MAX_UINT32 0 "Index of first entry to put in packet" + APPEND_PARAMETER PATH 512 STRING "" "Path to directory to output" + APPEND_PARAMETER OFFSET 32 UINT 0 MAX_UINT32 0 "Index of first entry to put in packet" APPEND_PARAMETER GET_SIZE_TIME_MODE 8 UINT 0 1 0 "Option to query size, time, and mode of files" STATE FALSE 0 STATE TRUE 1 - APPEND_PARAMETER SPARE1 8 UINT 0 0 0 "Spare byte for alignment" - APPEND_PARAMETER SPARE2 8 UINT 0 0 0 "Spare byte for alignment" - APPEND_PARAMETER SPARE3 8 UINT 0 0 0 "Spare byte for alignment" + APPEND_ARRAY_PARAMETER PADDING1 8 UINT 24 "Padding for packet alignment" <%= cfs_cmd_hdr(target_name, 'FM_CMD_MONITOR_FILESYSTEM_SPACE', 16, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'FM_CMD_SET_TABLE_STATE', 17, "Telecommand Message") %> - APPEND_PARAMETER TABLE_ENTRY_INDEX 32 UINT 0 MAX_UINT32 0 "Table entry index" - APPEND_PARAMETER TABLE_ENTRY_STATE 32 UINT 0 1 0 "Table entry state" + APPEND_PARAMETER INDEX 32 UINT 0 MAX_UINT32 0 "Table entry index" + APPEND_PARAMETER STATE 32 UINT 0 1 0 "Table entry state" STATE DISABLED 0 STATE ENABLED 1 <%= cfs_cmd_hdr(target_name, 'FM_CMD_SET_PERMISSIONS', 19, "Telecommand Message") %> - APPEND_PARAMETER FILENAME 512 STRING "" "Delete filename" - APPEND_PARAMETER MODE 32 UINT 0 MAX_UINT32 0 "Permissions to pass to OS_chmod" + APPEND_PARAMETER PATH 512 STRING "" "Path to file whose permissions are to be set" + APPEND_PARAMETER PERMISSIONS 32 UINT 0 MAX_UINT32 0 "Permissions for the file" diff --git a/targets/CFS/cmd_tlm/fm_tlm_def.txt b/targets/CFS/cmd_tlm/fm_tlm_def.txt index 1bea38f..d79a6da 100644 --- a/targets/CFS/cmd_tlm/fm_tlm_def.txt +++ b/targets/CFS/cmd_tlm/fm_tlm_def.txt @@ -1,31 +1,31 @@ <%= cfs_tlm_hdr(target_name, 'FM_HK', "FM Hk Tlm") %> APPEND_ITEM COMMAND_COUNTER 8 UINT "Command Counter" APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Command Error Counter" - APPEND_ITEM SPARE 8 UINT "Spare padding for alignment" - APPEND_ITEM NUM_OPEN_FILES 8 UINT "Number of open files in the system" - APPEND_ITEM CHILD_CMD_COUNTER 8 UINT "Child task command counter" - APPEND_ITEM CHILD_CMD_ERR_COUNTER 8 UINT "Child task command error counter" - APPEND_ITEM CHILD_CMD_WARN_COUNTER 8 UINT "Child task command warning counter" + APPEND_ITEM OPEN_FILES 8 UINT "Number of open files in the system" + APPEND_ITEM CHILD_COMMAND_COUNTER 8 UINT "Child task command counter" + APPEND_ITEM CHILD_COMMAND_ERROR_COUNTER 8 UINT "Child task command error counter" + APPEND_ITEM CHILD_COMMAND_WARNING_COUNTER 8 UINT "Child task command warning counter" APPEND_ITEM CHILD_QUEUE_COUNT 8 UINT "Number of pending commands in queue" APPEND_ITEM CHILD_CURRENT_CC 8 UINT "Command code currently executing" APPEND_ITEM CHILD_PREVIOUS_CC 8 UINT "Command code previously executed" + APPEND_ARRAY_ITEM PADDING1 8 UINT 24 "Padding for packet alignment" <%= cfs_tlm_hdr(target_name, 'FM_DIR_LIST', "FM Get Directory List Tlm") %> - APPEND_ITEM DIR_NAME 512 STRING "Directory name" + APPEND_ITEM DIRECTORY_NAME 512 STRING "Directory name" APPEND_ITEM TOTAL_FILES 32 UINT "Number of files in the directory" - APPEND_ITEM PACKET_FILES 32 UINT "Number of files in this packet" - APPEND_ITEM FIRST_FILE 32 UINT "Index into directory files of first packet file" + APPEND_ITEM FILES_IN_PACKET 32 UINT "Number of files in this packet" + APPEND_ITEM FIRST_FILE_INDEX 32 UINT "Index into directory files of first packet file" <% 20.times do |dir_list_entry| %> - APPEND_ITEM FILE_LIST_<%= dir_list_entry %>_ENTRY_NAME 512 STRING "Directory listing filename" - APPEND_ITEM FILE_LIST_<%= dir_list_entry %>_ENTRY_SIZE 32 UINT "Directory listing file size" + APPEND_ITEM FILE_LIST_<%= dir_list_entry %>_FILE_NAME 512 STRING "Directory listing filename" + APPEND_ITEM FILE_LIST_<%= dir_list_entry %>_SIZE 32 UINT "Directory listing file size" APPEND_ITEM FILE_LIST_<%= dir_list_entry %>_MODIFY_TIME 32 UINT "Directory listing file last modification time" ITEM FILE_LIST_<%= dir_list_entry %>_MODIFY_TIME_CONVERTED 0 0 DERIVED "Ruby time based on cFE timestamp" READ_CONVERSION unix_time_conversion_epoch_offset.rb FILE_LIST_<%= dir_list_entry %>_MODIFY_TIME - APPEND_ITEM FILE_LIST_<%= dir_list_entry %>_MODE 32 UINT "Mode of the file" + APPEND_ITEM FILE_LIST_<%= dir_list_entry %>_PERMISSIONS 32 UINT "Mode of the file" <% end %> <%= cfs_tlm_hdr(target_name, 'FM_FILE_INFO', "FM File Info Tlm") %> - APPEND_ITEM FILE_STATUS 8 UINT "Open/close status of file" + APPEND_ITEM STATUS 8 UINT "Open/close status of file" STATE DONT_EXIST 1 STATE OPEN_FILE 2 STATE CLOSED_FILE 3 @@ -33,33 +33,32 @@ APPEND_ITEM CRC_COMPUTED 8 UINT "Flag indicating whether CRC was computed or not" STATE FALSE 0 STATE TRUE 1 - APPEND_ITEM SPARE 16 UINT "Structure padding" + APPEND_ARRAY_ITEM PADDING1 8 UINT 16 "Padding for packet alignment" APPEND_ITEM CRC 32 UINT "CRC value if computed" FORMAT_STRING "0x%04X" - APPEND_ITEM FILE_SIZE 32 UINT "File Size" + APPEND_ITEM SIZE 32 UINT "File Size" APPEND_ITEM LAST_MODIFIED_TIME 32 UINT "Last Modification Time of File" ITEM LAST_MODIFIED_TIME_CONVERTED 0 0 DERIVED "Ruby time based on cFE timestamp" READ_CONVERSION unix_time_conversion_epoch_offset.rb LAST_MODIFIED_TIME - APPEND_ITEM MODE 32 UINT "Mode of the file (permissions)" - APPEND_ITEM FILENAME 512 STRING "File name" + APPEND_ITEM PERMISSIONS 32 UINT "Mode of the file (permissions)" + APPEND_ITEM NAME 512 STRING "File name" -<%= cfs_tlm_hdr(target_name, 'FM_MONITOR_TLM', "FM Freespace/Monitor Tlm") %> +<%= cfs_tlm_hdr(target_name, 'FM_OPEN_FILES', "FM Open Files Tlm") %> + APPEND_ITEM COUNT 32 UINT "Number of files opened via cFE" +<% 50.times do |file_idx| %> + APPEND_ITEM OPEN_FILES_LIST_<%= file_idx %>_LOGICAL_NAME 512 STRING "Logical filename" + APPEND_ITEM OPEN_FILES_LIST_<%= file_idx %>_APP 160 STRING "Application that opened file" +<% end %> + +<%= cfs_tlm_hdr(target_name, 'FM_MONITOR', "FM Freespace/Monitor Tlm") %> <% 8.times do |free_space_entry| %> APPEND_ITEM FILE_SYS_<%= free_space_entry %>_REPORT_TYPE 8 UINT "Report Type" STATE NOT_USED 0 STATE VOL_FREE_SPACE 1 STATE DIR_ESTIMATE 2 - APPEND_ITEM FILE_SYS_<%= free_space_entry %>_SPARE_1 8 UINT "Spare" - APPEND_ITEM FILE_SYS_<%= free_space_entry %>_SPARE_2 16 UINT "Spare" - APPEND_ITEM FILE_SYS_<%= free_space_entry %>_SPARE_3 32 UINT "Spare" - APPEND_ITEM FILE_SYS_<%= free_space_entry %>_NAME 512 STRING "File system name" + APPEND_ARRAY_ITEM PADDING1_<%= free_space_entry %> 8 UINT 56 "Padding for packet alignment" + APPEND_ITEM FILE_SYS_<%= free_space_entry %>_PATH 512 STRING "File system path" + APPEND_ARRAY_ITEM PADDING2_<%= free_space_entry %> 8 UINT 32 "Padding for packet alignment" APPEND_ITEM FILE_SYS_<%= free_space_entry %>_BLOCKS 64 UINT "Block count from last check/poll" APPEND_ITEM FILE_SYS_<%= free_space_entry %>_BYTES 64 UINT "Byte count from last check/poll" <% end %> - -<%= cfs_tlm_hdr(target_name, 'FM_OPEN_FILES', "FM Open Files Tlm") %> - APPEND_ITEM NUM_OPEN_FILES 32 UINT "Number of files opened via cFE" -<% 50.times do |file_idx| %> - APPEND_ITEM OPEN_FILES_LIST_<%= file_idx %>_LOGICAL_NAME 512 STRING "Logical filename" - APPEND_ITEM OPEN_FILES_LIST_<%= file_idx %>_APP_NAME 160 STRING "Application that opened file" -<% end %> diff --git a/targets/CFS/cmd_tlm/hk_cmd_def.txt b/targets/CFS/cmd_tlm/hk_cmd_def.txt index f50f1ea..abbbf85 100644 --- a/targets/CFS/cmd_tlm/hk_cmd_def.txt +++ b/targets/CFS/cmd_tlm/hk_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'HK_SEND_HK_CMD', 0, "HK Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'HK_SEND_HK_CMD', 0, 'HK housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'HK_CMD_NOOP', 0, "HK No-Op Cmd") %> diff --git a/targets/CFS/cmd_tlm/hk_tlm_def.txt b/targets/CFS/cmd_tlm/hk_tlm_def.txt index 035e747..87586ec 100644 --- a/targets/CFS/cmd_tlm/hk_tlm_def.txt +++ b/targets/CFS/cmd_tlm/hk_tlm_def.txt @@ -1,20 +1,20 @@ <%= cfs_tlm_hdr(target_name, 'HK_HK', "HK Hk Tlm Packet") %> APPEND_ITEM COMMAND_COUNTER 8 UINT "Command success counter" APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Command error counter" - APPEND_ITEM PADDING 16 UINT "Padding" + APPEND_ITEM PADDING 16 UINT APPEND_ITEM COMBINED_PKTS_SENT 16 UINT "Count of combined tlm pkts sent" APPEND_ITEM MISSING_DATA_CTR 16 UINT "Number of times missing data was detected" APPEND_ITEM MEM_POOL_HANDLE 32 UINT "Memory pool handle used to get mempool diags" FORMAT_STRING "0x%08X" # Packet definition depends on HK copy table -<%= cfs_tlm_hdr(target_name, 'HK_COMBINED_PKT1', "HK Combined Packet 1") %> +<%= cfs_tlm_hdr(target_name, 'HK_HK_COMBINED_PKT1', "HK Combined Packet 1") %> # Packet definition depends on HK copy table -<%= cfs_tlm_hdr(target_name, 'HK_COMBINED_PKT2', "HK Combined Packet 2") %> +<%= cfs_tlm_hdr(target_name, 'HK_HK_COMBINED_PKT2', "HK Combined Packet 2") %> # Packet definition depends on HK copy table -<%= cfs_tlm_hdr(target_name, 'HK_COMBINED_PKT3', "HK Combined Packet 3") %> +<%= cfs_tlm_hdr(target_name, 'HK_HK_COMBINED_PKT3', "HK Combined Packet 3") %> # Packet definition depends on HK copy table -<%= cfs_tlm_hdr(target_name, 'HK_COMBINED_PKT4', "HK Combined Packet 4") %> +<%= cfs_tlm_hdr(target_name, 'HK_HK_COMBINED_PKT4', "HK Combined Packet 4") %> diff --git a/targets/CFS/cmd_tlm/hs_cmd_def.txt b/targets/CFS/cmd_tlm/hs_cmd_def.txt index 594dd88..673a2f9 100644 --- a/targets/CFS/cmd_tlm/hs_cmd_def.txt +++ b/targets/CFS/cmd_tlm/hs_cmd_def.txt @@ -1,27 +1,27 @@ -<%= cfs_cmd_hdr(target_name, 'HS_SEND_HK_CMD', 0, "HS Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'HS_SEND_HK_CMD', 0, 'HS housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'HS_CMD_NOOP', 0, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'HS_CMD_RESET_COUNTERS', 1, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENA_APP_MON', 2, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENABLE_APP_MON', 2, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_DIS_APP_MON', 3, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_DISABLE_APP_MON', 3, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENA_EVENT_MON', 4, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENABLE_EVENT_MON', 4, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_DIS_EVENT_MON', 5, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_DISABLE_EVENT_MON', 5, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENA_ALIVENESS', 6, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENABLE_ALIVENESS', 6, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_DIS_ALIVENESS', 7, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_DISABLE_ALIVENESS', 7, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_CLR_CPU_RESET_CNT', 8, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_RESET_RESETS_PERFORMED', 8, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_SET_MAX_CPU_RESETS', 9, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_SET_MAX_RESETS', 9, "Telecommand Message") %> APPEND_PARAMETER MAX_RESETS 16 UINT MIN_UINT16 MAX_UINT16 0 " " APPEND_PARAMETER PADDING 16 UINT MIN_UINT16 MAX_UINT16 0 "Structure padding" -<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENA_CPU_HOG', 10, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_ENABLE_CPU_HOG', 10, "Telecommand Message") %> -<%= cfs_cmd_hdr(target_name, 'HS_CMD_DIS_CPU_HOG', 11, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'HS_CMD_DISABLE_CPU_HOG', 11, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/hs_tlm_def.txt b/targets/CFS/cmd_tlm/hs_tlm_def.txt index 979ea57..939457b 100644 --- a/targets/CFS/cmd_tlm/hs_tlm_def.txt +++ b/targets/CFS/cmd_tlm/hs_tlm_def.txt @@ -17,10 +17,10 @@ STATE DISABLED 0 STATE ENABLED 1 STATE NO_EVENT 2 - APPEND_ITEM STATE_BITS 8 UINT "Operational states." + APPEND_ITEM STATUS_FLAGS 8 UINT "Operational states." FORMAT_STRING "0x%04X" APPEND_ITEM PAD8 8 UINT "Alignment Spares." - APPEND_ITEM CPU_RESET_CNT 16 UINT "Number of processor resets" + APPEND_ITEM RESETS_PERFORMED 16 UINT "Number of processor resets" APPEND_ITEM MAX_RESETS 16 UINT "Maximum number of processor resets before a power on reset" APPEND_ITEM EVENT_MON_CNT 32 UINT "Count of event messages monitored" APPEND_ITEM INVLD_EVENT_MON_CNT 32 UINT "Count of invalid event monitors" diff --git a/targets/CFS/cmd_tlm/lc_cmd_def.txt b/targets/CFS/cmd_tlm/lc_cmd_def.txt index 8cd221d..15570ed 100644 --- a/targets/CFS/cmd_tlm/lc_cmd_def.txt +++ b/targets/CFS/cmd_tlm/lc_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'LC_SEND_HK_CMD', 0, "LC Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'LC_SEND_HK_CMD', 0, 'LC housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'LC_CMD_NOOP', 0, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/lc_tlm_def.txt b/targets/CFS/cmd_tlm/lc_tlm_def.txt index 35b3422..5176f16 100644 --- a/targets/CFS/cmd_tlm/lc_tlm_def.txt +++ b/targets/CFS/cmd_tlm/lc_tlm_def.txt @@ -1,6 +1,6 @@ <%= cfs_tlm_hdr(target_name, 'LC_HK', "LC Hk Tlm") %> APPEND_ITEM COMMAND_COUNTER 8 UINT "LC Application Command Counter" - APPEND_ITEM COMMAND_ERR_COUNTER 8 UINT "LC Application Command Error Counter" + APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "LC Application Command Error Counter" APPEND_ITEM CURRENT_LC_STATE 8 UINT "Current LC application operating state" STATE UNDEF 0 STATE ACTIVE 1 @@ -40,25 +40,25 @@ APPEND_ARRAY_ITEM AP_RESULTS 8 UINT 704 "Packed actionpoint results data, 4 bits per actionpoint." # Decompose AP_RESULTS packed data into discrete values <% 2.times do |data_idx| %> - ITEM AP_<%=(data_idx*2)+1%>_STATE <%=0+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+0%>_STATE <%=0+512+(data_idx*8)%> 2 UINT OVERLAP STATE UNUSED 0 STATE ACTIVE 1 STATE PASSIVE 2 STATE DISABLED 3 - ITEM AP_<%=(data_idx*2)+1%>_RESULT <%=2+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+0%>_RESULT <%=2+512+(data_idx*8)%> 2 UINT OVERLAP STATE PASS 0 STATE FAIL 1 STATE ERROR 2 STATE STALE 3 - ITEM AP_<%=(data_idx*2)+0%>_STATE <%=4+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+1%>_STATE <%=4+512+(data_idx*8)%> 2 UINT OVERLAP STATE UNUSED 0 STATE ACTIVE 1 STATE PASSIVE 2 STATE DISABLED 3 - ITEM AP_<%=(data_idx*2)+0%>_RESULT <%=6+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+1%>_RESULT <%=6+512+(data_idx*8)%> 2 UINT OVERLAP STATE PASS 0 STATE FAIL 1 diff --git a/targets/CFS/cmd_tlm/md_cmd_def.txt b/targets/CFS/cmd_tlm/md_cmd_def.txt index de866e9..49b4b1c 100644 --- a/targets/CFS/cmd_tlm/md_cmd_def.txt +++ b/targets/CFS/cmd_tlm/md_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'MD_SEND_HK_CMD', 0, "MD Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'MD_SEND_HK_CMD', 0, 'MD housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'MD_CMD_NOOP', 0, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/mm_cmd_def.txt b/targets/CFS/cmd_tlm/mm_cmd_def.txt index 28e4fc9..f3c6050 100644 --- a/targets/CFS/cmd_tlm/mm_cmd_def.txt +++ b/targets/CFS/cmd_tlm/mm_cmd_def.txt @@ -1,118 +1,89 @@ -<%= cfs_cmd_hdr(target_name, 'MM_SEND_HK_CMD', 0, "MM Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'MM_SEND_HK_CMD', 0, 'MM housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'MM_CMD_NOOP', 0, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'MM_CMD_RESET_COUNTERS', 1, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'MM_CMD_PEEK', 2, "Telecommand Message") %> - APPEND_PARAMETER Datasize 32 UINT MIN MAX 0 "Size of the data to be read" - APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory type to peek data from" - STATE RAM 1 - STATE EEPROM 2 - STATE MEM8 3 - STATE MEM16 4 - STATE MEM32 5 - APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" -<% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbolic source peek address" -<% else %> - APPEND_PARAMETER SrcsymaddressOffset 32 UINT MIN MAX 0 "Symbolic source peek address" -<% end %> - APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbolic source peek address" + APPEND_PARAMETER DATA_SIZE 32 UINT MIN MAX 0 "Size of the data to be read" + APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory type to peek data from" + STATE RAM 1 + STATE EEPROM 2 + STATE MEM8 3 + STATE MEM16 4 + STATE MEM32 5 + APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic source peek address" + APPEND_PARAMETER SRC_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic source peek address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_POKE', 3, "Telecommand Message") %> - APPEND_PARAMETER Datasize 32 UINT MIN MAX 0 "Size of the data to be written" - APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory type to poke data to" - STATE RAM 1 - STATE EEPROM 2 - STATE MEM8 3 - STATE MEM16 4 - STATE MEM32 5 - APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" - APPEND_PARAMETER Data 32 UINT MIN MAX 0 "Data to be written" - APPEND_PARAMETER Padding 32 UINT 0 0 0 "Structure padding" -<% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbolic destination poke address" -<% else %> - APPEND_PARAMETER DestsymaddressOffset 32 UINT MIN MAX 0 "Symbolic destination poke address" -<% end %> - APPEND_PARAMETER DestsymaddressSymname 512 STRING "" "Symbolic destination poke address" + APPEND_PARAMETER DATA_SIZE 32 UINT MIN MAX 0 "Size of the data to be written" + APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory type to poke data to" + STATE RAM 1 + STATE EEPROM 2 + STATE MEM8 3 + STATE MEM16 4 + STATE MEM32 5 + APPEND_PARAMETER DATA 32 UINT MIN MAX 0 "Data to be written" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 32 "Structure padding" + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic destination poke address" + APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic destination poke address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_LOAD_MEM_WID', 4, "Telecommand Message") %> - APPEND_PARAMETER Numofbytes 8 UINT MIN MAX 0 "Number of bytes to be loaded" - APPEND_ARRAY_PARAMETER Padding 8 UINT 24 "Structure padding" - APPEND_PARAMETER Crc 32 UINT MIN MAX 0 "Data check value" -<% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbolic destination load address" -<% else %> - APPEND_PARAMETER DestsymaddressOffset 32 UINT MIN MAX 0 "Symbolic destination load address" -<% end %> - APPEND_PARAMETER DestsymaddressSymname 512 STRING "" "Symbolic destination load address" - APPEND_ARRAY_PARAMETER Dataarray 8 UINT 1600 "Data to be loaded" + APPEND_PARAMETER NUM_OF_BYTES 8 UINT MIN MAX 0 "Number of bytes to be loaded" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Structure padding" + APPEND_PARAMETER CRC 32 UINT MIN MAX 0 "Data check value" + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic destination load address" + APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic destination load address" + APPEND_ARRAY_PARAMETER DATA_ARRAY 8 UINT 1600 "Data to be loaded" <%= cfs_cmd_hdr(target_name, 'MM_CMD_LOAD_MEM_FROM_FILE', 5, "Telecommand Message") %> - APPEND_PARAMETER Filename 512 STRING "" "Name of memory load file" + APPEND_PARAMETER FILENAME 512 STRING "" "Name of memory load file" <%= cfs_cmd_hdr(target_name, 'MM_CMD_DUMP_MEM_TO_FILE', 6, "Telecommand Message") %> - APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory dump type" - STATE RAM 1 - STATE EEPROM 2 - STATE MEM8 3 - STATE MEM16 4 - STATE MEM32 5 - APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" - APPEND_PARAMETER Numofbytes 32 UINT MIN MAX 0 "Number of bytes to be dumped" -<% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbol plus optional offset" -<% else %> - APPEND_PARAMETER SrcsymaddressOffset 32 UINT MIN MAX 0 "Symbol plus optional offset" -<% end %> - APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbol plus optional offset" - APPEND_PARAMETER Filename 512 STRING "" "Name of memory dump file" + APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory dump type" + STATE RAM 1 + STATE EEPROM 2 + STATE MEM8 3 + STATE MEM16 4 + STATE MEM32 5 + APPEND_PARAMETER NUM_OF_BYTES 32 UINT MIN MAX 0 "Number of bytes to be dumped" + APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbol plus optional offset" + APPEND_PARAMETER SRC_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbol plus optional offset" + APPEND_PARAMETER FILENAME 512 STRING "" "Name of memory dump file" <%= cfs_cmd_hdr(target_name, 'MM_CMD_DUMP_IN_EVENT', 7, "Telecommand Message") %> - APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory dump type" - STATE RAM 1 - STATE EEPROM 2 - STATE MEM8 3 - STATE MEM16 4 - STATE MEM32 5 - APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" - APPEND_PARAMETER Numofbytes 8 UINT MIN MAX 0 "Number of bytes to be dumped" - APPEND_ARRAY_PARAMETER Padding 8 UINT 24 "Structure padding" -<% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbolic source address" -<% else %> - APPEND_PARAMETER SrcsymaddressOffset 32 UINT MIN MAX 0 "Symbolic source address" -<% end %> - APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbolic source address" + APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory dump type" + STATE RAM 1 + STATE EEPROM 2 + STATE MEM8 3 + STATE MEM16 4 + STATE MEM32 5 + APPEND_PARAMETER NUM_OF_BYTES 8 UINT MIN MAX 0 "Number of bytes to be dumped" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Structure padding" + APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic source address" + APPEND_PARAMETER SRC_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic source address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_FILL_MEM', 8, "Telecommand Message") %> - APPEND_PARAMETER Memtype 8 UINT MIN MAX 0 "Memory type" - STATE RAM 1 - STATE EEPROM 2 - STATE MEM8 3 - STATE MEM16 4 - STATE MEM32 5 - APPEND_ARRAY_PARAMETER MemTypePadding 8 UINT 24 "Memtype Padding" - APPEND_PARAMETER Numofbytes 32 UINT MIN MAX 0 "Number of bytes to fill" - APPEND_PARAMETER Fillpattern 32 UINT MIN MAX 0 "Fill pattern to use" - APPEND_PARAMETER Padding 32 UINT MIN MAX 0 "Structure padding" -<% if $cfs_globals_mem_addr_size == 64 %> - APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbol plus optional offset" -<% else %> - APPEND_PARAMETER DestsymaddressOffset 32 UINT MIN MAX 0 "Symbol plus optional offset" -<% end %> - APPEND_PARAMETER DestsymaddressSymname 512 STRING "" "Symbol plus optional offset" + APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory type" + STATE RAM 1 + STATE EEPROM 2 + STATE MEM8 3 + STATE MEM16 4 + STATE MEM32 5 + APPEND_PARAMETER NUM_OF_BYTES 32 UINT MIN MAX 0 "Number of bytes to fill" + APPEND_PARAMETER FILL_PATTERN 32 UINT MIN MAX 0 "Fill pattern to use" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 32 "Structure padding" + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbol plus optional offset" + APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbol plus optional offset" -<%= cfs_cmd_hdr(target_name, 'MM_CMD_LOOKUPSYM', 9, "Telecommand Message") %> - APPEND_PARAMETER Symname 512 STRING "" "Symbol name string" +<%= cfs_cmd_hdr(target_name, 'MM_CMD_LOOKUP_SYM', 9, "Telecommand Message") %> + APPEND_PARAMETER SYMNAME 512 STRING "" "Symbol name string" -<%= cfs_cmd_hdr(target_name, 'MM_CMD_DUMP_SYM_TABLE', 10, "Telecommand Message") %> - APPEND_PARAMETER Filename 512 STRING "" "Name of symbol dump file" +<%= cfs_cmd_hdr(target_name, 'MM_CMD_SYM_TBL_TO_FILE', 10, "Telecommand Message") %> + APPEND_PARAMETER FILENAME 512 STRING "" "Name of symbol dump file" -<%= cfs_cmd_hdr(target_name, 'MM_CMD_ENABLE_EEPROM_WRITE', 11, "Telecommand Message") %> - APPEND_PARAMETER Bank 32 UINT MIN MAX 0 "EEPROM bank number to write-enable" +<%= cfs_cmd_hdr(target_name, 'MM_CMD_EEPROM_WRITE_ENA', 11, "Telecommand Message") %> + APPEND_PARAMETER BANK 32 UINT MIN MAX 0 "EEPROM bank number to write-enable" -<%= cfs_cmd_hdr(target_name, 'MM_CMD_DISABLE_EEPROM_WRITE', 12, "Telecommand Message") %> - APPEND_PARAMETER Bank 32 UINT MIN MAX 0 "EEPROM bank number to write-disable" +<%= cfs_cmd_hdr(target_name, 'MM_CMD_EEPROM_WRITE_DIS', 12, "Telecommand Message") %> + APPEND_PARAMETER BANK 32 UINT MIN MAX 0 "EEPROM bank number to write-disable" \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/mm_tlm_def.txt b/targets/CFS/cmd_tlm/mm_tlm_def.txt index 1209656..ff7d6a0 100644 --- a/targets/CFS/cmd_tlm/mm_tlm_def.txt +++ b/targets/CFS/cmd_tlm/mm_tlm_def.txt @@ -1,7 +1,7 @@ <%= cfs_tlm_hdr(target_name, 'MM_HK', "MM Hk Tlm") %> - APPEND_ITEM COMMAND_COUNTER 8 UINT "MM Application Command Counter" - APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "MM Application Command Error Counter" - APPEND_ITEM Lastaction 8 UINT "Last command action executed" + APPEND_ITEM COMMAND_COUNTER 8 UINT "MM Application Command Counter" + APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "MM Application Command Error Counter" + APPEND_ITEM LAST_ACTION 8 UINT "Last command action executed" STATE NO_ACTION 0 STATE PEEK 1 STATE POKE 2 @@ -16,8 +16,8 @@ STATE WRITE_DISABLE 11 STATE NOOP 12 STATE RESET 13 - APPEND_ITEM Spare 8 UINT "Spare byte" - APPEND_ITEM Memtype 32 UINT "Memory type for last command" + APPEND_ITEM PADDING 8 UINT "Padding for 32-bit alignment" + APPEND_ITEM MEM_TYPE 32 UINT "Memory type for last command" STATE NONE 0 STATE RAM 1 STATE EEPROM 2 @@ -25,13 +25,13 @@ STATE MEM16 4 STATE MEM32 5 <% if $cfs_globals_mem_addr_size == 64 %> - APPEND_ITEM Address 64 UINT "Fully resolved address used for last command" - FORMAT_STRING "0x%011X" + APPEND_ITEM ADDRESS 64 UINT "Fully resolved address used for last command" + FORMAT_STRING "0x%011X" <% else %> - APPEND_ITEM Address 32 UINT "Fully resolved address used for last command" - FORMAT_STRING "0x%08X" + APPEND_ITEM ADDRESS 32 UINT "Fully resolved address used for last command" + FORMAT_STRING "0x%08X" <% end %> - APPEND_ITEM Datavalue 32 UINT "Last command data (fill pattern or peek/poke value)" + APPEND_ITEM DATA_VALUE 32 UINT "Last command data (fill pattern or peek/poke value)" FORMAT_STRING "0x%08X" - APPEND_ITEM Bytesprocessed 32 UINT "Bytes processed for last command" - APPEND_ITEM Filename 512 STRING "Name of the data file used for last command, where applicable" + APPEND_ITEM BYTES_PROCESSED 32 UINT "Bytes processed for last command" + APPEND_ITEM FILE_NAME 512 STRING "Name of the data file used for last command, where applicable" diff --git a/targets/CFS/cmd_tlm/sample_app_cmd_def.txt b/targets/CFS/cmd_tlm/sample_app_cmd_def.txt index 96de896..ee6b1d1 100644 --- a/targets/CFS/cmd_tlm/sample_app_cmd_def.txt +++ b/targets/CFS/cmd_tlm/sample_app_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'SAMPLE_APP_SEND_HK_CMD', 0, "SAMPLE_APP Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'SAMPLE_APP_SEND_HK_CMD', 0, 'SAMPLE_APP housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'SAMPLE_APP_CMD_NOOP', 0, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/sample_app_tlm_def.txt b/targets/CFS/cmd_tlm/sample_app_tlm_def.txt index ac8f6bc..f4b1b65 100644 --- a/targets/CFS/cmd_tlm/sample_app_tlm_def.txt +++ b/targets/CFS/cmd_tlm/sample_app_tlm_def.txt @@ -1,4 +1,3 @@ <%= cfs_tlm_hdr(target_name, 'SAMPLE_APP_HK', "SAMPLE_APP Hk Tlm") %> APPEND_ITEM COMMAND_COUNTER 8 UINT "Command Counter" - APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Command Error Counter" - APPEND_ITEM SPARE_TO_ALIGN 16 UINT "Spare padding for alignment" + APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Command Error Counter" \ No newline at end of file diff --git a/targets/CFS/cmd_tlm/sbn_cmd_def.txt b/targets/CFS/cmd_tlm/sbn_cmd_def.txt index b0a0e1a..213caca 100644 --- a/targets/CFS/cmd_tlm/sbn_cmd_def.txt +++ b/targets/CFS/cmd_tlm/sbn_cmd_def.txt @@ -1,6 +1,6 @@ -<%= cfs_cmd_hdr(target_name, 'SBN_CMD_NOOP', 0, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'SBN_CMD_SEND_HK', 0, "SBN Send Housekeeping command") %> -<%= cfs_cmd_hdr(target_name, 'SBN_CMD_HK', 10, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'SBN_CMD_NOOP', 0, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'SBN_CMD_HK_NET', 11, "Telecommand Message") %> APPEND_PARAMETER NET_IDX 8 UINT 0 MAX_UINT8 0 "Net Index" diff --git a/targets/CFS/cmd_tlm/sc_cmd_def.txt b/targets/CFS/cmd_tlm/sc_cmd_def.txt index a5dc57a..161794f 100644 --- a/targets/CFS/cmd_tlm/sc_cmd_def.txt +++ b/targets/CFS/cmd_tlm/sc_cmd_def.txt @@ -1,60 +1,60 @@ -<%= cfs_cmd_hdr(target_name, 'SC_SEND_HK_CMD', 0, "SC Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'SC_SEND_HK_CMD', 0, 'SC housekeeping request command') %> -<%= cfs_cmd_hdr(target_name, 'SC_CMD_NOOP', 0, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'SC_CMD_NOOP', 0, "Generate an event that displays the application version") %> -<%= cfs_cmd_hdr(target_name, 'SC_CMD_RESET_COUNTERS', 1, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'SC_CMD_RESET_COUNTERS', 1, "Clear the command counters and error counters for SC") %> -<%= cfs_cmd_hdr(target_name, 'SC_CMD_START_ATS', 2, "Telecommand Message") %> - APPEND_PARAMETER ATS_ID 16 UINT 1 <%= $sc_num_ats %> 1 "The ID of the ATS to start, 1 = ATS_A, 2 = ATS_B." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_START_ATS', 2, "Start an ATS on the ATP") %> + APPEND_PARAMETER ATS_NUM 16 UINT 1 <%= $sc_num_ats %> 1 "The ID of the ATS to start, 1 = ATS_A, 2 = ATS_B." APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" -<%= cfs_cmd_hdr(target_name, 'SC_CMD_STOP_ATS', 3, "Telecommand Message") %> - -<%= cfs_cmd_hdr(target_name, 'SC_CMD_START_RTS', 4, "Telecommand Message") %> - APPEND_PARAMETER RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to start, 1 through SC_NUMBER_OF_RTS." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_STOP_ATS', 3, "Stops an ATS from executing on the ATP even if an ATS is not currently executing") %> + +<%= cfs_cmd_hdr(target_name, 'SC_CMD_START_RTS', 4, "Starts the execution of an RTS") %> + APPEND_PARAMETER RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to start, 1 through SC_NUMBER_OF_RTS." APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" -<%= cfs_cmd_hdr(target_name, 'SC_CMD_STOP_RTS', 5, "Telecommand Message") %> - APPEND_PARAMETER RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to stop, 1 through SC_NUMBER_OF_RTS." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_STOP_RTS', 5, "Stops the execution of an RTS") %> + APPEND_PARAMETER RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to stop, 1 through SC_NUMBER_OF_RTS." APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" - -<%= cfs_cmd_hdr(target_name, 'SC_CMD_DISABLE_RTS', 6, "Telecommand Message") %> - APPEND_PARAMETER RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to disable, 1 through SC_NUMBER_OF_RTS." + +<%= cfs_cmd_hdr(target_name, 'SC_CMD_DISABLE_RTS', 6, "Disables an enabled RTS") %> + APPEND_PARAMETER RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to disable, 1 through SC_NUMBER_OF_RTS." APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" -<%= cfs_cmd_hdr(target_name, 'SC_CMD_ENABLE_RTS', 7, "Telecommand Message") %> - APPEND_PARAMETER RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to enable, 1 through SC_NUMBER_OF_RTS." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_ENABLE_RTS', 7, "Enables a disabled RTS") %> + APPEND_PARAMETER RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "The ID of the RTS to enable, 1 through SC_NUMBER_OF_RTS." APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" -<%= cfs_cmd_hdr(target_name, 'SC_CMD_SWITCH_ATS', 8, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'SC_CMD_SWITCH_ATS', 8, "Initiates an ATS switch") %> -<%= cfs_cmd_hdr(target_name, 'SC_CMD_JUMP_ATS', 9, "Telecommand Message") %> +<%= cfs_cmd_hdr(target_name, 'SC_CMD_JUMP_ATS', 9, "Jumps to specified time in currently running ATS") %> APPEND_PARAMETER NEW_TIME 32 UINT MIN_UINT32 MAX_UINT32 0 "the time to 'jump' to" -<%= cfs_cmd_hdr(target_name, 'SC_CMD_CONTINUE_ATS_ON_FAILURE', 10, "Telecommand Message") %> - APPEND_PARAMETER CONTINUE_STATE 16 UINT 0 1 0 "TRUE or FALSE, to continue ATS after a failure." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_CONTINUE_ATS_ON_FAILURE', 10, "Lets an ATS continue if a command failed the checksum") %> + APPEND_PARAMETER CONTINUE_STATE 8 UINT 0 1 0 "TRUE or FALSE, to continue ATS after a failure." STATE FALSE 0 STATE TRUE 1 - APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Padding for packet alignment" -<%= cfs_cmd_hdr(target_name, 'SC_CMD_APPEND_ATS', 11, "Telecommand Message") %> - APPEND_PARAMETER ATS_ID 16 UINT 1 <%= $sc_num_ats %> 1 "The ID of the ATS to append to, 1 = ATS_A, 2 = ATS_B." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_APPEND_ATS', 11, "Adds the contents of the Append ATS table to the selected ATS then re-sorts for command execution order") %> + APPEND_PARAMETER ATS_NUM 16 UINT 1 <%= $sc_num_ats %> 1 "The ID of the ATS to append to, 1 = ATS_A, 2 = ATS_B." APPEND_PARAMETER PADDING 16 UINT 0 0 0 "Structure padding" # FC 12 is for an internal command -<%= cfs_cmd_hdr(target_name, 'SC_CMD_START_RTS_GROUP', 13, "Telecommand Message") %> - APPEND_PARAMETER FIRST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." - APPEND_PARAMETER LAST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_START_RTS_GRP', 13, "Starts the execution of a group of RTSs") %> + APPEND_PARAMETER FIRST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." + APPEND_PARAMETER LAST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." -<%= cfs_cmd_hdr(target_name, 'SC_CMD_STOP_RTS_GROUP', 14, "Telecommand Message") %> - APPEND_PARAMETER FIRST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." - APPEND_PARAMETER LAST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_STOP_RTS_GRP', 14, "Stops the execution of a group of RTSs") %> + APPEND_PARAMETER FIRST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." + APPEND_PARAMETER LAST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." -<%= cfs_cmd_hdr(target_name, 'SC_CMD_DISABLE_RTS_GROUP', 15, "Telecommand Message") %> - APPEND_PARAMETER FIRST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." - APPEND_PARAMETER LAST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_DISABLE_RTS_GRP', 15, "Disables a group of enabled RTSs") %> + APPEND_PARAMETER FIRST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." + APPEND_PARAMETER LAST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." -<%= cfs_cmd_hdr(target_name, 'SC_CMD_ENABLE_RTS_GROUP', 16, "Telecommand Message") %> - APPEND_PARAMETER FIRST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." - APPEND_PARAMETER LAST_RTS_ID 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." +<%= cfs_cmd_hdr(target_name, 'SC_CMD_ENABLE_RTS_GRP', 16, "Enables a group of disabled RTSs") %> + APPEND_PARAMETER FIRST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the first RTS to act on, 1 through SC_NUMBER_OF_RTS." + APPEND_PARAMETER LAST_RTS_NUM 16 UINT 1 <%= $sc_num_rts %> 1 "ID of the last RTS to act on, 1 through SC_NUMBER_OF_RTS." diff --git a/targets/CFS/cmd_tlm/sc_tlm_def.txt b/targets/CFS/cmd_tlm/sc_tlm_def.txt index e113ead..427d67e 100644 --- a/targets/CFS/cmd_tlm/sc_tlm_def.txt +++ b/targets/CFS/cmd_tlm/sc_tlm_def.txt @@ -1,5 +1,5 @@ <%= cfs_tlm_hdr(target_name, 'SC_HK', "SC Hk Tlm") %> - APPEND_ITEM ATS_NUMBER 8 UINT "Current ATS number 1 = ATS A, 2 = ATS B" + APPEND_ITEM CURR_ATS_NUM 8 UINT "Current ATS number 1 = ATS A, 2 = ATS B" APPEND_ITEM ATP_STATE 8 UINT "Current ATP state" STATE EMPTY 0 STATE LOADED 1 @@ -20,7 +20,7 @@ STATE NO 0 STATE YES 1 APPEND_ITEM NUM_RTS_ACTIVE 16 UINT "Number of RTSs currently active" - APPEND_ITEM RTS_NUMBER 16 UINT "Next RTS number" + APPEND_ITEM NEXT_RTS_NUM 16 UINT "Next RTS number" APPEND_ITEM RTS_ACTIVE_CTR 16 UINT "Increments when an RTS is started without error" APPEND_ITEM RTS_ACTIVE_ERR_CTR 16 UINT "Increments when an attempt to start an RTS fails" APPEND_ITEM ATS_CMD_CTR 16 UINT "Total ATS cmd cnter counts commands sent by the ATS" diff --git a/targets/CFS/cmd_tlm/to_lab_cmd_def.txt b/targets/CFS/cmd_tlm/to_lab_cmd_def.txt index f4b8584..0a5fb64 100644 --- a/targets/CFS/cmd_tlm/to_lab_cmd_def.txt +++ b/targets/CFS/cmd_tlm/to_lab_cmd_def.txt @@ -1,4 +1,4 @@ -<%= cfs_cmd_hdr(target_name, 'TO_LAB_SEND_HK_CMD', 0, "TO_LAB Housekeeping Request Cmd") %> +<%= cfs_cmd_hdr(target_name, 'TO_LAB_SEND_HK_CMD', 0, 'TO_LAB housekeeping request command') %> <%= cfs_cmd_hdr(target_name, 'TO_LAB_CMD_NOOP', 0, "Telecommand Message") %> diff --git a/targets/CFS/cmd_tlm/to_lab_tlm_def.txt b/targets/CFS/cmd_tlm/to_lab_tlm_def.txt index d2636ea..29103c3 100644 --- a/targets/CFS/cmd_tlm/to_lab_tlm_def.txt +++ b/targets/CFS/cmd_tlm/to_lab_tlm_def.txt @@ -1,3 +1,21 @@ <%= cfs_tlm_hdr(target_name, 'TO_LAB_HK', "TO_LAB Hk Tlm") %> APPEND_ITEM COMMAND_COUNTER 8 UINT "Command Counter" APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Command Error Counter" + +<%= cfs_tlm_hdr(target_name, 'TO_LAB_DATA_TYPES', "Data type test interface") %> + APPEND_ITEM SYNCH 16 UINT "Unsigned 16 bit integer" + APPEND_ITEM BL_1 8 UINT "Unsigned 8 bit integer" + APPEND_ITEM BL_2 8 UINT "Unsigned 8 bit integer" + APPEND_ITEM B1 8 INT "Signed 8 bit integer" + APPEND_ITEM B2 8 INT "Signed 8 bit integer" + APPEND_ITEM B3 8 INT "Signed 8 bit integer" + APPEND_ITEM B4 8 INT "Signed 8 bit integer" + APPEND_ITEM W1 16 UINT "Unsigned 16 bit integer" + APPEND_ITEM W2 16 UINT "Unsigned 16 bit integer" + APPEND_ITEM DW_1 32 UINT "Unsigned 32 bit integer" + APPEND_ITEM DW_2 32 UINT "Unsigned 32 bit integer" + APPEND_ITEM F1 32 FLOAT "Single precision (32 bit) floating point value" + APPEND_ITEM F2 32 FLOAT "Single precision (32 bit) floating point value" + APPEND_ITEM DF_1 64 FLOAT "Double precision (64 bit) floating point value" + APPEND_ITEM DF_2 64 FLOAT "Double precision (64 bit) floating point value" + APPEND_ITEM STR 80 STRING "Value" diff --git a/targets/CFS/lib/cfs_cmd_tlm_list.rb b/targets/CFS/lib/cfs_cmd_tlm_list.rb index 3eae12f..8a0cdc0 100644 --- a/targets/CFS/lib/cfs_cmd_tlm_list.rb +++ b/targets/CFS/lib/cfs_cmd_tlm_list.rb @@ -5,9 +5,11 @@ #------------------------------------------------------------------------------ class FswMsgInfo attr_accessor :fsw_msg_base_stream_id + attr_accessor :fsw_msg_base_eds_stream_id attr_accessor :fsw_msg_packet_names def initialize(params) @fsw_msg_base_stream_id = params[:base_stream_id] + @fsw_msg_base_eds_stream_id = params[:base_eds_stream_id] @fsw_msg_packet_names = params[:packet_names] end end @@ -47,7 +49,7 @@ def initialize(params) ] ), "CFE_EVS_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x1809, # DEFAULT_CFE_MISSION_EVS_SEND_HK_TOPICID + base_stream_id: 0x1809, packet_names: [ "CFE_EVS_SEND_HK_CMD", ] @@ -66,7 +68,7 @@ def initialize(params) ] ), "CFE_SB_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x180B, # DEFAULT_CFE_MISSION_SB_SEND_HK_TOPICID + base_stream_id: 0x180B, packet_names: [ "CFE_SB_SEND_HK_CMD", ] @@ -87,7 +89,7 @@ def initialize(params) ] ), "CFE_TBL_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x180C, # DEFAULT_CFE_MISSION_TBL_SEND_HK_TOPICID + base_stream_id: 0x180C, packet_names: [ "CFE_TBL_SEND_HK_CMD", ] @@ -114,7 +116,7 @@ def initialize(params) ] ), "CFE_TIME_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x180D, # DEFAULT_CFE_MISSION_TIME_SEND_HK_TOPICID + base_stream_id: 0x180D, packet_names: [ "CFE_TIME_SEND_HK_CMD", ] @@ -149,7 +151,7 @@ def initialize(params) ] ), "CFE_ES_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x1808, # DEFAULT_CFE_MISSION_ES_SEND_HK_TOPICID + base_stream_id: 0x1808, packet_names: [ "CFE_ES_SEND_HK_CMD", ] @@ -175,7 +177,7 @@ def initialize(params) ] ), "TO_LAB_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x1881, # DEFAULT_TO_LAB_MISSION_SEND_HK_TOPICID + base_stream_id: 0x1881, packet_names: [ "TO_LAB_SEND_HK_CMD", ] @@ -206,7 +208,7 @@ def initialize(params) ] ), "CF_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x18B4, # DEFAULT_CFE_MISSION_CF_SEND_HK_TOPICID + base_stream_id: 0x18B4, packet_names: [ "CF_SEND_HK_CMD", ] @@ -221,7 +223,7 @@ def initialize(params) ] ), "SAMPLE_APP_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x1883, # DEFAULT_SAMPLE_APP_MISSION_SEND_HK_TOPICID + base_stream_id: 0x1883, packet_names: [ "SAMPLE_APP_SEND_HK_CMD", ] @@ -230,7 +232,7 @@ def initialize(params) base_stream_id: 0x18FA, packet_names: [ "SBN_CMD_NOOP", - "SBN_CMD_HK", + "SBN_CMD_SEND_HK", "SBN_CMD_HK_NET", "SBN_CMD_HK_PEER", "SBN_CMD_HK_PEERSUBS", @@ -247,7 +249,7 @@ def initialize(params) ] ), "CI_LAB_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x1885, # DEFAULT_CI_LAB_MISSION_SEND_HK_TOPICID + base_stream_id: 0x1885, packet_names: [ "CI_LAB_SEND_HK_CMD", ] @@ -276,7 +278,7 @@ def initialize(params) ] ), "FM_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x188D, # FM_SEND_HK_TOPICID + base_stream_id: 0x188D, packet_names: [ "FM_SEND_HK_CMD", ] @@ -293,14 +295,14 @@ def initialize(params) "MM_CMD_DUMP_MEM_TO_FILE", "MM_CMD_DUMP_IN_EVENT", "MM_CMD_FILL_MEM", - "MM_CMD_LOOKUPSYM", - "MM_CMD_DUMP_SYM_TABLE", - "MM_CMD_ENABLE_EEPROM_WRITE", - "MM_CMD_DISABLE_EEPROM_WRITE", + "MM_CMD_LOOKUP_SYM", + "MM_CMD_SYM_TBL_TO_FILE", + "MM_CMD_EEPROM_WRITE_ENA", + "MM_CMD_EEPROM_WRITE_DIS", ] ), "MM_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x1889, # MM_SEND_HK_TOPICID + base_stream_id: 0x1889, packet_names: [ "MM_SEND_HK_CMD", ] @@ -317,7 +319,7 @@ def initialize(params) ] ), "MD_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x1891, # DEFAULT_CFE_MISSION_MD_SEND_HK_TOPICID + base_stream_id: 0x1891, packet_names: [ "MD_SEND_HK_CMD", ] @@ -341,17 +343,17 @@ def initialize(params) "CS_CMD_RECOMPUTE_BASELINE_OS", "CS_CMD_ENABLE_EEPROM", "CS_CMD_DISABLE_EEPROM", - "CS_CMD_REPORT_BASELINE_EEPROM", + "CS_CMD_REPORT_BASELINE_ENTRY_ID_EEPROM", "CS_CMD_RECOMPUTE_BASELINE_EEPROM", - "CS_CMD_ENABLE_ENTRY_EEPROM", - "CS_CMD_DISABLE_ENTRY_EEPROM", + "CS_CMD_ENABLE_ENTRY_ID_EEPROM", + "CS_CMD_DISABLE_ENTRY_ID_EEPROM", "CS_CMD_GET_ENTRY_ID_EEPROM", "CS_CMD_ENABLE_MEMORY", "CS_CMD_DISABLE_MEMORY", - "CS_CMD_REPORT_BASELINE_MEMORY", + "CS_CMD_REPORT_BASELINE_ENTRY_ID_MEMORY", "CS_CMD_RECOMPUTE_BASELINE_MEMORY", - "CS_CMD_ENABLE_ENTRY_MEMORY", - "CS_CMD_DISABLE_ENTRY_MEMORY", + "CS_CMD_ENABLE_ENTRY_ID_MEMORY", + "CS_CMD_DISABLE_ENTRY_ID_MEMORY", "CS_CMD_GET_ENTRY_ID_MEMORY", "CS_CMD_ENABLE_TABLES", "CS_CMD_DISABLE_TABLES", @@ -368,7 +370,7 @@ def initialize(params) ] ), "CS_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x18A0, # CS_SEND_HK_TOPICID + base_stream_id: 0x18A0, packet_names: [ "CS_SEND_HK_CMD", ] @@ -381,7 +383,7 @@ def initialize(params) ] ), "HK_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x189B, # HK_SEND_HK_TOPICID + base_stream_id: 0x189B, packet_names: [ "HK_SEND_HK_CMD", ] @@ -399,7 +401,7 @@ def initialize(params) ] ), "LC_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x18A5, # LC_SEND_HK_TOPICID + base_stream_id: 0x18A5, packet_names: [ "LC_SEND_HK_CMD", ] @@ -409,23 +411,23 @@ def initialize(params) packet_names: [ "HS_CMD_NOOP", "HS_CMD_RESET_COUNTERS", - "HS_CMD_ENA_APP_MON", - "HS_CMD_DIS_APP_MON", - "HS_CMD_ENA_EVENT_MON", - "HS_CMD_DIS_EVENT_MON", - "HS_CMD_ENA_ALIVENESS", - "HS_CMD_DIS_ALIVENESS", - "HS_CMD_CLR_CPU_RESET_CNT", - "HS_CMD_SET_MAX_CPU_RESETS", - "HS_CMD_ENA_CPU_HOG", - "HS_CMD_DIS_CPU_HOG", + "HS_CMD_ENABLE_APP_MON", + "HS_CMD_DISABLE_APP_MON", + "HS_CMD_ENABLE_EVENT_MON", + "HS_CMD_DISABLE_EVENT_MON", + "HS_CMD_ENABLE_ALIVENESS", + "HS_CMD_DISABLE_ALIVENESS", + "HS_CMD_RESET_RESETS_PERFORMED", + "HS_CMD_SET_MAX_RESETS", + "HS_CMD_ENABLE_CPU_HOG", + "HS_CMD_DISABLE_CPU_HOG", "HS_CMD_REPORT_DIAG", "HS_CMD_SET_UTIL_PARAMS", "HS_CMD_SET_UTIL_DIAG", ] ), "HS_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x18AF, # DEFAULT_CFE_MISSION_HS_SEND_HK_TOPICID + base_stream_id: 0x18AF, packet_names: [ "HS_SEND_HK_CMD", ] @@ -445,14 +447,15 @@ def initialize(params) "SC_CMD_JUMP_ATS", "SC_CMD_CONTINUE_ATS_ON_FAILURE", "SC_CMD_APPEND_ATS", - "SC_CMD_START_RTS_GROUP", - "SC_CMD_STOP_RTS_GROUP", - "SC_CMD_DISABLE_RTS_GROUP", - "SC_CMD_ENABLE_RTS_GROUP", + "SC_CMD_MANAGE_TABLE", + "SC_CMD_START_RTS_GRP", + "SC_CMD_STOP_RTS_GRP", + "SC_CMD_DISABLE_RTS_GRP", + "SC_CMD_ENABLE_RTS_GRP", ] ), "SC_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x18AA, # SC_SEND_HK_TOPICID + base_stream_id: 0x18AA, packet_names: [ "SC_SEND_HK_CMD", ] @@ -482,7 +485,7 @@ def initialize(params) ] ), "DS_SEND_HK_CMD" => FswMsgInfo.new( - base_stream_id: 0x18BC, # DS_SEND_HK_TOPICID + base_stream_id: 0x18BC, packet_names: [ "DS_SEND_HK_CMD", ] @@ -503,6 +506,12 @@ def initialize(params) "CFE_EVS_HK", ] ), + "CFE_TESTCASE_HK" => FswMsgInfo.new( + base_stream_id: 0x0802, + packet_names: [ + "CFE_TESTCASE_HK", + ] + ), "CFE_SB_HK" => FswMsgInfo.new( base_stream_id: 0x0803, packet_names: [ @@ -581,6 +590,12 @@ def initialize(params) "TO_LAB_HK", ] ), + "TO_LAB_DATA_TYPES" => FswMsgInfo.new( + base_stream_id: 0x0881, + packet_names: [ + "TO_LAB_DATA_TYPES", + ] + ), "CF_HK" => FswMsgInfo.new( base_stream_id: 0x08B0, packet_names: [ @@ -659,10 +674,10 @@ def initialize(params) "FM_OPEN_FILES", ] ), - "FM_MONITOR_TLM" => FswMsgInfo.new( + "FM_MONITOR" => FswMsgInfo.new( base_stream_id: 0x088E, packet_names: [ - "FM_MONITOR_TLM", + "FM_MONITOR", ] ), "MM_HK" => FswMsgInfo.new( @@ -707,28 +722,28 @@ def initialize(params) "HK_HK", ] ), - "HK_COMBINED_PKT1" => FswMsgInfo.new( + "HK_HK_COMBINED_PKT1" => FswMsgInfo.new( base_stream_id: 0x089C, packet_names: [ - "HK_COMBINED_PKT1", + "HK_HK_COMBINED_PKT1", ] ), - "HK_COMBINED_PKT2" => FswMsgInfo.new( + "HK_HK_COMBINED_PKT2" => FswMsgInfo.new( base_stream_id: 0x089D, packet_names: [ - "HK_COMBINED_PKT2", + "HK_HK_COMBINED_PKT2", ] ), - "HK_COMBINED_PKT3" => FswMsgInfo.new( + "HK_HK_COMBINED_PKT3" => FswMsgInfo.new( base_stream_id: 0x089E, packet_names: [ - "HK_COMBINED_PKT3", + "HK_HK_COMBINED_PKT3", ] ), - "HK_COMBINED_PKT4" => FswMsgInfo.new( + "HK_HK_COMBINED_PKT4" => FswMsgInfo.new( base_stream_id: 0x089F, packet_names: [ - "HK_COMBINED_PKT4", + "HK_HK_COMBINED_PKT4", ] ), "CS_HK" => FswMsgInfo.new( @@ -820,13 +835,14 @@ def get_cfs_msg_id_from_base(stream_id_base, cpu_num) # The cpu num is a 3-bit field, so the max value is b'111' (7) cpu_num_min = 0 cpu_num_max = $cfs_total_valid_cpus - 1 + num_cpu = cpu_num - 1 # Set the CPU Number bit field - if ((cpu_num >= cpu_num_min) && (cpu_num <= cpu_num_max)) + if ((num_cpu >= cpu_num_min) && (num_cpu <= cpu_num_max)) stream_id = stream_id_base stream_id = stream_id & 0xF8FF # clear the 3-bit cpu-num field - stream_id = stream_id | (cpu_num << 8) + stream_id = stream_id | (num_cpu << 8) else - # On cpu_num range error, return the base by default + # On num_cpu range error, return the base by default stream_id = stream_id_base end return stream_id @@ -852,8 +868,8 @@ def get_cfs_pkt_msg_id(pkt_name, cpu_num_input) msg_id << "cpu_num_input error: should be 1 or 2. instead got: #{cpu_num}." else msg_id_with_cpu_num = get_cfs_msg_id_from_base( - $CFS_CMD_TLM_LIST[pkt_list_key].fsw_msg_base_stream_id, - cpu_num-1) + $CFS_CMD_TLM_LIST[pkt_list_key].fsw_msg_base_stream_id, + cpu_num-1) msg_id << sprintf("0x%04X", msg_id_with_cpu_num) end return msg_id diff --git a/targets/CFS/lib/cfs_packet_headers.rb b/targets/CFS/lib/cfs_packet_headers.rb index 7dbda88..0327cd7 100755 --- a/targets/CFS/lib/cfs_packet_headers.rb +++ b/targets/CFS/lib/cfs_packet_headers.rb @@ -31,9 +31,7 @@ def cfs_tlm_hdr(target_name, tlm_name, pkt_desc) tlmPacket << " APPEND_ITEM CCSDS_LENGTH 16 UINT \"CCSDS Packet Data Length\" BIG_ENDIAN \n" tlmPacket << " APPEND_ITEM SECONDS 32 UINT \"CCSDS Telemetry Secondary Header (seconds)\" BIG_ENDIAN \n" tlmPacket << " APPEND_ITEM SUBSECS 16 UINT \"CCSDS Telemetry Secondary Header (subseconds)\" BIG_ENDIAN \n" - if $cfs_globals_eds_enabled == false tlmPacket << " APPEND_ITEM SPARE_FOR_64_ALIGN 32 UINT \"Spare padding for 64-bit alignment\" \n" - end tlmPacket << " ITEM PACKET_TIME 0 0 DERIVED \"Ruby time based on SECONDS and SUBSECS\" \n" tlmPacket << " READ_CONVERSION unix_time_conversion_epoch_offset.rb SECONDS SUBSECS \n" return tlmPacket diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_es.py b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_es.py index 26e0d51..f32896d 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_es.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_es.py @@ -20,18 +20,17 @@ def test_00_Aliveness(self): Group.print("Testing CFE_ES aliveness on <%= target_name %>") - wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 100) - # Assuming no one else is sending commands, grab the latest command count + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm("<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send NOOP command, then check result to prove application is up and running cmd("<%= target_name %> CFE_ES_CMD_NOOP") - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Send Reset Counters command, check resullt cmd("<%= target_name %> CFE_ES_CMD_RESET_COUNTERS") - wait_check("<%= target_name %> CFE_ES_HK COMMAND_COUNTER == 0", 100) + wait_check("<%= target_name %> CFE_ES_HK COMMAND_COUNTER == 0", 20) def test_01_NoOp(self): @@ -39,12 +38,13 @@ def test_01_NoOp(self): Test the no-op command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") cmd("<%= target_name %> CFE_ES_CMD_NOOP") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # FIXME: Currently don't have a good way to restart cFS from COSMOS. @@ -112,13 +112,14 @@ def test_05_RestartApp(self): self.StartApp_test() wait(1) + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_RESTART_APP with APPLICATION 'SAMPLE_APP'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) wait(10) # Wait for the app to fully restart (5 for stop, 5 for start). @@ -139,13 +140,14 @@ def test_06_ReloadApp(self): stopSampleAppAtEnd = True self.StartApp_test() + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_RELOAD_APP with APPLICATION 'SAMPLE_APP', APP_FILE_NAME 'sample_app'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) wait(10) # Wait for the app to fully restart (5 for stop, 5 for start). @@ -158,13 +160,14 @@ def test_07_QueryOne(self): Test the QueryOne command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_QUERY_ONE with APPLICATION 'CS'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_08_QueryAll(self): @@ -172,13 +175,14 @@ def test_08_QueryAll(self): Test the QueryAll command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test - cmd(f"<%= target_name %> CFE_ES_CMD_QUERY_ALL with FILE_NAME 'apps.txt'") + cmd(f"<%= target_name %> CFE_ES_CMD_QUERY_ALL with FILE_NAME '/cf/apps.txt'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_09_QueryAllTasks(self): @@ -186,13 +190,14 @@ def test_09_QueryAllTasks(self): Test the QueryAllTasks command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under tests - cmd(f"<%= target_name %> CFE_ES_CMD_QUERY_ALL_TASKS with FILE_NAME 'sample_app'") + cmd(f"<%= target_name %> CFE_ES_CMD_QUERY_ALL_TASKS with FILE_NAME '/cf/sample_app'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_10_WriteSysLog(self): @@ -200,13 +205,14 @@ def test_10_WriteSysLog(self): Test the WriteSysLog command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm("<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test - cmd("<%= target_name %> CFE_ES_CMD_WRITE_SYS_LOG with FILE_NAME 'logfile.txt'") + cmd("<%= target_name %> CFE_ES_CMD_WRITE_SYS_LOG with FILE_NAME '/cf/logfile.txt'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_11_ClearSysLog(self): @@ -214,13 +220,14 @@ def test_11_ClearSysLog(self): Test the ClearSysLog command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_CLEAR_SYS_LOG") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_12_OverwriteSysLog_Discard(self): @@ -228,13 +235,14 @@ def test_12_OverwriteSysLog_Discard(self): Test the OverwriteSysLog command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_OVER_WRITE_SYS_LOG with MODE DISCARD") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_13_OverwriteSysLog_Overwrite(self): @@ -242,13 +250,14 @@ def test_13_OverwriteSysLog_Overwrite(self): Test the OverwriteSysLog command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_OVER_WRITE_SYS_LOG with MODE OVERWRITE") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_14_WriteERLog(self): @@ -256,13 +265,14 @@ def test_14_WriteERLog(self): Test the WriteERLog command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test - cmd(f"<%= target_name %> CFE_ES_CMD_WRITE_ER_LOG with FILE_NAME 'logfile.txt'") + cmd(f"<%= target_name %> CFE_ES_CMD_WRITE_ER_LOG with FILE_NAME '/cf/logfile.txt'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_15_ClearERLog(self): @@ -270,13 +280,14 @@ def test_15_ClearERLog(self): Test the ClearERLog command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_CLEAR_ER_LOG") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_16_StartPerfData(self): @@ -284,13 +295,14 @@ def test_16_StartPerfData(self): Test the StartPerfData command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_START_PERF_DATA with TRIGGER_MODE START") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_17_StopPerfData(self): @@ -298,13 +310,14 @@ def test_17_StopPerfData(self): Test the StopPerfData command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test - cmd(f"<%= target_name %> CFE_ES_CMD_STOP_PERF_DATA with DATA_FILE_NAME 'datafile.txt'") + cmd(f"<%= target_name %> CFE_ES_CMD_STOP_PERF_DATA with DATA_FILE_NAME '/cf/datafile.txt'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_18_SetPerfFilterMask(self): @@ -312,13 +325,14 @@ def test_18_SetPerfFilterMask(self): Test the SetPerfFilterMask command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_SET_PERF_FILTER_MASK with FILTER_MASK_NUM 1, FILTER_MASK 10") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_19_SetPerfTriggerMask(self): @@ -326,13 +340,14 @@ def test_19_SetPerfTriggerMask(self): Test the SetPerfTriggerMask command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_SET_PERF_TRIGGER_MASK with TRIGGER_MASK_NUM 1, TRIGGER_MASK 10") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_20_ResetPRCount(self): @@ -340,13 +355,14 @@ def test_20_ResetPRCount(self): Test the ResetPRCount command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_RESET_PR_COUNT") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_21_SetMaxPRCount(self): @@ -354,13 +370,14 @@ def test_21_SetMaxPRCount(self): Test the SetMaxPRCount command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_SET_MAX_PR_COUNT with MAX_PR_COUNT 1") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # FIXME: Add this back when we start implementing non-nominal test cases. @@ -373,13 +390,14 @@ def test_21_SetMaxPRCount(self): # # First, delete the CS app, so we're allowed to delete its CDS # CFE_ES_DeleteApp(AppID) # + # wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) # cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # # # Send command under test # cmd(f"<%= target_name %> CFE_ES_CMD_DELETE_CDS with CDS_NAME 'CS.CS_CDS'") # # # Verify command count incremented - # wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # @@ -389,21 +407,23 @@ def test_22_DeleteCDS(self): """ # First, stop the CS app, so we're allowed to delete its CDS + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") cmd(f"<%= target_name %> CFE_ES_CMD_STOP_APP with APPLICATION 'CS'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) wait(5) # Wait for the CS app to finish exiting + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_DELETE_CDS with CDS_NAME 'CS.CS_CDS'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Re-start the CS app, to restore the system state to as it was before this step cmd(f"<%= target_name %> CFE_ES_CMD_START_APP with APPLICATION 'CS', APP_ENTRY_POINT 'CS_AppMain', APP_FILE_NAME 'cs', STACK_SIZE 16384, EXCEPTION_ACTION 0, PRIORITY 65") @@ -415,15 +435,17 @@ def test_23_SendMemPoolStats(self): """ # Get and save SB HK mempool handle. Needed for command. + wait_check_packet("<%= target_name %>", "CFE_SB_HK", 1, 20) sb_mempool_handle = tlm("<%= target_name %> CFE_SB_HK MEM_POOL_HANDLE") + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_SEND_MEM_POOL_STATS with APPLICATION 'TO', POOL_HANDLE {sb_mempool_handle}") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_24_DumpCDSRegistry(self): @@ -431,13 +453,14 @@ def test_24_DumpCDSRegistry(self): Test the DumpCDSRegistry command. """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test - cmd(f"<%= target_name %> CFE_ES_CMD_DUMP_CDS_REGISTRY with DUMP_FILENAME 'dumpfile.txt'") + cmd(f"<%= target_name %> CFE_ES_CMD_DUMP_CDS_REGISTRY with DUMP_FILENAME '/cf/dumpfile.txt'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) def test_25_ResetCounters(self): @@ -452,8 +475,8 @@ def test_25_ResetCounters(self): cmd(f"<%= target_name %> CFE_ES_CMD_RESET_COUNTERS") # Verify counter are reset to zero - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_ERROR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == 0", 20) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_ERROR_COUNTER == 0", 20) def is_Sample_App_Running(self) -> bool: @@ -466,6 +489,7 @@ def is_Sample_App_Running(self) -> bool: - False if Sample_App is notrunning """ # save counters to dermine if Sample_App is running + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) saved_cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") seq_count = tlm(f"<%= target_name %> CFE_ES_HK CCSDS_SEQUENCE") @@ -476,8 +500,9 @@ def is_Sample_App_Running(self) -> bool: wait(1) # If this check fails, stop the test, no telemetry packet was received within the timeout - wait_check(f"<%= target_name %> CFE_ES_HK CCSDS_SEQUENCE > {seq_count}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK CCSDS_SEQUENCE > {seq_count}", 20) + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) current_cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") if(current_cmd_count == (saved_cmd_count + 1)): @@ -494,13 +519,14 @@ def StopApp_test(self): Called from the StopApp_StartApp test """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_STOP_APP with APPLICATION 'SAMPLE_APP'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) wait(5) # wait for the application to stop @@ -511,13 +537,14 @@ def StartApp_test(self): Called from the StopApp_StartApp test """ + wait_check_packet("<%= target_name %>", "CFE_ES_HK", 1, 20) cmd_count = tlm(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER") # Send command under test cmd(f"<%= target_name %> CFE_ES_CMD_START_APP with APPLICATION 'SAMPLE_APP', APP_ENTRY_POINT 'SAMPLE_APP_Main', APP_FILE_NAME 'sample_app', STACK_SIZE 16384, EXCEPTION_ACTION 0, PRIORITY 50") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_ES_HK COMMAND_COUNTER == {cmd_count + 1}", 20) wait(5) # wait for the application to start @@ -531,7 +558,7 @@ def setup(self): global sample_app_needs_shutdown_at_end # lets python know we plan to change this global in this function # Wait for a new housekeeping packet, to ensure we're using its latest status info - wait_check_packet(f"<%= target_name %>", f"CFE_ES_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_ES_HK", 1, 20) # If the Sample_App is not running, start it, setting a var to stop it at the end of the test # this call here ensures that the system is in the state needed diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_evs.py b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_evs.py index 6348d49..deeb70e 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_evs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_evs.py @@ -14,23 +14,22 @@ def test_00_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing CFE_EVS aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_NOOP") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == 0", 100) def test_01_event_type(self): """ @@ -40,24 +39,23 @@ def test_01_event_type(self): - Send disable event type then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Disable/Enable Event Type on <%= target_name %>") + Group.print(f"Testing CFE_EVS Disable/Enable Event Type on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Enable Event Type command - cmd(f"<%= target_name %> {app_name}_CMD_ENABLE_EVENT_TYPE with BIT_MASK DEBUG") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK DEBUG") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Disable Event Type command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_DISABLE_EVENT_TYPE with BIT_MASK DEBUG") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_DISABLE_EVENT_TYPE with BIT_MASK DEBUG") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_02_set_event_format_mode(self): """ @@ -65,22 +63,21 @@ def test_02_set_event_format_mode(self): - Send set event format mode then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Set Event Format Mode on <%= target_name %>") + Group.print(f"Testing CFE_EVS Set Event Format Mode on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Set Event Format Mode command - cmd(f"<%= target_name %> {app_name}_CMD_SET_EVENT_FORMAT_MODE with MSG_FORMAT SHORT") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_SET_EVENT_FORMAT_MODE with MSG_FORMAT SHORT") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Restore default event format - cmd(f"<%= target_name %> {app_name}_CMD_SET_EVENT_FORMAT_MODE with MSG_FORMAT LONG") + cmd(f"<%= target_name %> CFE_EVS_CMD_SET_EVENT_FORMAT_MODE with MSG_FORMAT LONG") def test_03_app_event_type(self): """ @@ -90,24 +87,23 @@ def test_03_app_event_type(self): - Send disable app event type then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Enable/Disable App Event Type on <%= target_name %>") + Group.print(f"Testing CFE_EVS Enable/Disable App Event Type on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Enable App Event Type command - cmd(f"<%= target_name %> {app_name}_CMD_ENABLE_APP_EVENT_TYPE with APP_NAME SAMPLE_APP, BIT_MASK DEBUG") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_ENABLE_APP_EVENT_TYPE with APP_NAME SAMPLE_APP, BIT_MASK DEBUG") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Disable App Event Type command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_DISABLE_APP_EVENT_TYPE with APP_NAME SAMPLE_APP, BIT_MASK DEBUG") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_DISABLE_APP_EVENT_TYPE with APP_NAME SAMPLE_APP, BIT_MASK DEBUG") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_04_app_events(self): """ @@ -117,24 +113,23 @@ def test_04_app_events(self): - Send enable app events then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Enable/Disable App Events on <%= target_name %>") + Group.print(f"Testing CFE_EVS Enable/Disable App Events on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Disable App Events Type command - cmd(f"<%= target_name %> {app_name}_CMD_DISABLE_APP_EVENTS with APP_NAME SAMPLE_APP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_DISABLE_APP_EVENTS with APP_NAME SAMPLE_APP") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Enable App Events Type command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_ENABLE_APP_EVENTS with APP_NAME SAMPLE_APP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_ENABLE_APP_EVENTS with APP_NAME SAMPLE_APP") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_05_reset_app_counter(self): """ @@ -142,19 +137,18 @@ def test_05_reset_app_counter(self): - Send reset app counter then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Reset App Counter on <%= target_name %>") + Group.print(f"Testing CFE_EVS Reset App Counter on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Reset App Counter command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_APP_COUNTER with APP_NAME SAMPLE_APP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_RESET_APP_COUNTER with APP_NAME SAMPLE_APP") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_06_filter_commands(self): """ @@ -172,39 +166,38 @@ def test_06_filter_commands(self): - Send reset all filters then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Filter Commands on <%= target_name %>") + Group.print(f"Testing CFE_EVS Filter Commands on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Add Event Filter command - cmd(f"<%= target_name %> {app_name}_CMD_ADD_EVENT_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3, MASK 0x0001") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_ADD_EVENT_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3, MASK 0x0001") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Set Filter command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_SET_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3, MASK 0x0003") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_SET_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3, MASK 0x0003") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Filter command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_RESET_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_RESET_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Delete Event Filter command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_DELETE_EVENT_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_DELETE_EVENT_FILTER with APP_NAME SAMPLE_APP, EVENT_ID 3") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset All Filters command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_RESET_ALL_FILTERS with APP_NAME SAMPLE_APP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_RESET_ALL_FILTERS with APP_NAME SAMPLE_APP") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_07_ports(self): """ @@ -214,24 +207,23 @@ def test_07_ports(self): - Send Disable Ports then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Enable/Disable Ports on <%= target_name %>") + Group.print(f"Testing CFE_EVS Enable/Disable Ports on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Enable Ports command - cmd(f"<%= target_name %> {app_name}_CMD_ENABLE_PORTS with BIT_MASK 2") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_ENABLE_PORTS with BIT_MASK 2") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Disable Ports command - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> {app_name}_CMD_DISABLE_PORTS with BIT_MASK 2") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") + cmd(f"<%= target_name %> CFE_EVS_CMD_DISABLE_PORTS with BIT_MASK 2") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_08_write_app_data_file(self): """ @@ -239,19 +231,18 @@ def test_08_write_app_data_file(self): - Send Write App Data File then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Write App Data Files on <%= target_name %>") + Group.print(f"Testing CFE_EVS Write App Data Files on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Write App Data File command - cmd(f"<%= target_name %> {app_name}_CMD_WRITE_APP_DATA_FILE with APP_DATA_FILENAME 'evs_app.dat'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_WRITE_APP_DATA_FILE with APP_DATA_FILENAME '/cf/evs_app.dat'") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_09_write_log_data_file(self): """ @@ -259,19 +250,18 @@ def test_09_write_log_data_file(self): - Send Write Log Data File then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Write Log Data File on <%= target_name %>") + Group.print(f"Testing CFE_EVS Write Log Data File on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Write Log Data File command - cmd(f"<%= target_name %> {app_name}_CMD_WRITE_LOG_DATA_FILE with LOG_FILENAME 'evs_log.dat'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_WRITE_LOG_DATA_FILE with LOG_FILENAME '/cf/evs_log.dat'") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_10_set_log_mode(self): """ @@ -279,22 +269,21 @@ def test_10_set_log_mode(self): - Send Set Log Mode then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Set Log Mode on <%= target_name %>") + Group.print(f"Testing CFE_EVS Set Log Mode on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Set Log Mode command - cmd(f"<%= target_name %> {app_name}_CMD_SET_LOG_MODE with LOG_MODE OVERWRITE") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_SET_LOG_MODE with LOG_MODE OVERWRITE") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Restore default log mode - cmd(f"<%= target_name %> {app_name}_CMD_SET_LOG_MODE with LOG_MODE DISCARD") + cmd(f"<%= target_name %> CFE_EVS_CMD_SET_LOG_MODE with LOG_MODE DISCARD") def test_11_clear_log(self): """ @@ -302,19 +291,18 @@ def test_11_clear_log(self): - Send Clear Log then verify the command was received (by checking the command counter incremented) """ - app_name = "CFE_EVS" - Group.print(f"Testing {app_name} Clear Log on <%= target_name %>") + Group.print(f"Testing CFE_EVS Clear Log on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_EVS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER") # Check accepted Clear Log command - cmd(f"<%= target_name %> {app_name}_CMD_CLEAR_LOG") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CFE_EVS_CMD_CLEAR_LOG") + wait_check(f"<%= target_name %> CFE_EVS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def setup(self): """ diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_sb.py b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_sb.py index 3adae91..0c7eee7 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_sb.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_sb.py @@ -16,18 +16,18 @@ def test_00_aliveness(self): Group.print(f"Testing CFE_SB aliveness on <%= target_name %>") # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running cmd(f"<%= target_name %> CFE_SB_CMD_NOOP") - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Check accepted Reset Counters command cmd(f"<%= target_name %> CFE_SB_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == 0", 20) def test_01_sb_cmd_sb_stats(self): """ @@ -44,7 +44,7 @@ def test_01_sb_cmd_sb_stats(self): curr_sb_stats_pkt_count = 0 # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") @@ -53,10 +53,10 @@ def test_01_sb_cmd_sb_stats(self): cmd(f"<%= target_name %> CFE_SB_CMD_SEND_SB_STATS") # Verify that the command counter increments from the CFE_SB_CMD_SEND_SB_STATS command - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Verify that we have a recent CFE_SB_STATS packet - wait_check(f"<%= target_name %> CFE_SB_STATS RECEIVED_COUNT >= {curr_sb_stats_pkt_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_STATS RECEIVED_COUNT >= {curr_sb_stats_pkt_count + 1}", 20) def test_02_sb_cmd_write_routing_info(self): """ @@ -69,10 +69,10 @@ def test_02_sb_cmd_write_routing_info(self): Group.print(f"Testing CFE_SB's CFE_SB_CMD_WRITE_ROUTING_INFO command functionality on <%= target_name %>") # Delete /cf/func_file_route.dat before attempting CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/func_file_route.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/func_file_route.dat'") # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") @@ -81,7 +81,7 @@ def test_02_sb_cmd_write_routing_info(self): cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/func_file_route.dat'") # Verify the command was accepted by incrementing HK command counter - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Get current packet count of FM_FILE_INFO curr_fm_file_info_pkt_count = tlm(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT") @@ -89,14 +89,14 @@ def test_02_sb_cmd_write_routing_info(self): curr_fm_file_info_pkt_count = 0 # Send FM cmd to see if file created - cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with FILE_CRC 'CRC_NONE', FILENAME '/cf/func_file_route.dat'") + cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with CRC_METHOD 'CRC_NONE', PATH '/cf/func_file_route.dat'") # Verify that we have a recent FM_FILE_INFO packet (by waiting for a new one to arrive) - wait_check(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT >= {curr_fm_file_info_pkt_count + 1}", 100) + wait_check(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT >= {curr_fm_file_info_pkt_count + 1}", 20) # Verify the file was created - wait_check(f"<%= target_name %> FM_FILE_INFO FILENAME == '/cf/func_file_route.dat'", 100) - wait_check(f"<%= target_name %> FM_FILE_INFO FILE_STATUS == 'CLOSED_FILE'", 100) + wait_check(f"<%= target_name %> FM_FILE_INFO NAME == '/cf/func_file_route.dat'", 20) + wait_check(f"<%= target_name %> FM_FILE_INFO STATUS == 'CLOSED_FILE'", 20) def test_03_sb_cmd_write_pipe_info(self): @@ -110,10 +110,10 @@ def test_03_sb_cmd_write_pipe_info(self): Group.print(f"Testing CFE_SB's CFE_SB_CMD_WRITE_PIPE_INFO command functionality on <%= target_name %>") # Delete /cf/func_file_pipe.dat before attempting CFE_SB_CMD_WRITE_PIPE_INFO command - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/func_file_pipe.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/func_file_pipe.dat'") # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest hk command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") @@ -122,7 +122,7 @@ def test_03_sb_cmd_write_pipe_info(self): cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_PIPE_INFO with FILENAME '/cf/func_file_pipe.dat'") # Wait for a new HK packet - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Get current packet count of FM_FILE_INFO curr_fm_file_info_pkt_count = tlm(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT") @@ -130,14 +130,14 @@ def test_03_sb_cmd_write_pipe_info(self): curr_fm_file_info_pkt_count = 0 # Send FM cmd to see if file created - cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with FILE_CRC 'CRC_NONE', FILENAME '/cf/func_file_pipe.dat'") + cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with CRC_METHOD 'CRC_NONE', PATH '/cf/func_file_pipe.dat'") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT >= {curr_fm_file_info_pkt_count + 1}", 100) + wait_check(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT >= {curr_fm_file_info_pkt_count + 1}", 20) # Verify the file was created - wait_check(f"<%= target_name %> FM_FILE_INFO FILENAME == '/cf/func_file_pipe.dat'", 100) - wait_check(f"<%= target_name %> FM_FILE_INFO FILE_STATUS == 'CLOSED_FILE'", 100) + wait_check(f"<%= target_name %> FM_FILE_INFO NAME == '/cf/func_file_pipe.dat'", 20) + wait_check(f"<%= target_name %> FM_FILE_INFO STATUS == 'CLOSED_FILE'", 20) def test_04_sb_cmd_write_map_info(self): @@ -151,10 +151,10 @@ def test_04_sb_cmd_write_map_info(self): Group.print(f"Testing CFE_SB's CFE_SB_CMD_WRITE_MAP_INFO command functionality on <%= target_name %>") # Delete /cf/func_file_map.dat before attempting CFE_SB_CMD_WRITE_MAP_INFO command - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/func_file_map.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/func_file_map.dat'") # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest hk command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") @@ -163,7 +163,7 @@ def test_04_sb_cmd_write_map_info(self): cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_MAP_INFO with FILENAME '/cf/func_file_map.dat'") # Wait for a new HK packet - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Get current packet count of FM_FILE_INFO curr_fm_file_info_pkt_count = tlm(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT") @@ -171,14 +171,14 @@ def test_04_sb_cmd_write_map_info(self): curr_fm_file_info_pkt_count = 0 # Send FM cmd to see if file created - cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with FILE_CRC 'CRC_NONE', FILENAME '/cf/func_file_map.dat'") + cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with CRC_METHOD 'CRC_NONE', PATH '/cf/func_file_map.dat'") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT >= {curr_fm_file_info_pkt_count + 1}", 100) + wait_check(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT >= {curr_fm_file_info_pkt_count + 1}", 20) # Verify the file name - wait_check(f"<%= target_name %> FM_FILE_INFO FILENAME == '/cf/func_file_map.dat'", 100) - wait_check(f"<%= target_name %> FM_FILE_INFO FILE_STATUS == 'CLOSED_FILE'", 100) + wait_check(f"<%= target_name %> FM_FILE_INFO NAME == '/cf/func_file_map.dat'", 20) + wait_check(f"<%= target_name %> FM_FILE_INFO STATUS == 'CLOSED_FILE'", 20) def test_05_sb_cmd_enable_disable_route(self): """ @@ -198,30 +198,30 @@ def test_05_sb_cmd_enable_disable_route(self): curr_sb_stats_pkt_count = 0 # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest HK command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Check accepted CFE_SB_CMD_SEND_SB_STATS command cmd(f"<%= target_name %> CFE_SB_CMD_SEND_SB_STATS") - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Verify that we have a recent SB Stats packet (by waiting for a new one to arrive) - wait_check(f"<%= target_name %> CFE_SB_STATS RECEIVED_COUNT >= {curr_sb_stats_pkt_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_STATS RECEIVED_COUNT >= {curr_sb_stats_pkt_count + 1}", 20) # Get the verify first SB Pipe ID registered - pipe_id = tlm(f"<%= target_name %> CFE_SB_STATS PIPE_DEPTH_STATS_0_PIPE_ID") + pipe_id = tlm(f"<%= target_name %> CFE_SB_STATS PIPE_DEPTH_STATS_1_PIPE_ID") # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest HK command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Check accepted VALID CFE_SB_CMD_DISABLE_ROUTE command cmd(f"<%= target_name %> CFE_SB_CMD_DISABLE_ROUTE with PIPE {pipe_id}, MSG_ID_VALUE {input_cmd_msg_id}") - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Get the latest cmd/err counter values cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") @@ -229,8 +229,8 @@ def test_05_sb_cmd_enable_disable_route(self): # Check rejected INVALID CFE_SB_CMD_DISABLE_ROUTE command cmd(f"<%= target_name %> CFE_SB_CMD_DISABLE_ROUTE with PIPE {pipe_id + 1}, MSG_ID_VALUE {input_cmd_msg_id}") - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count}", 100) - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count}", 20) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 20) """ FSW Enable Route Command Test @@ -245,14 +245,14 @@ def test_05_sb_cmd_enable_disable_route(self): curr_sb_stats_pkt_count = 0 # Verify that we have a recent HK packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CFE_SB_HK", 1, 20) # Assuming no one else is sending commands, grab the latest HK command count cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Check accepted VALID CFE_SB_CMD_ENABLE_ROUTE command cmd(f"<%= target_name %> CFE_SB_CMD_ENABLE_ROUTE with PIPE {pipe_id}, MSG_ID_VALUE {input_cmd_msg_id}") - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Get the latest cmd/err counter values cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") @@ -260,8 +260,8 @@ def test_05_sb_cmd_enable_disable_route(self): # Check rejected INVALID CFE_SB_CMD_ENABLE_ROUTE command cmd(f"<%= target_name %> CFE_SB_CMD_ENABLE_ROUTE with PIPE {pipe_id + 1}, MSG_ID_VALUE {input_cmd_msg_id}") - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count}", 100) - wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count}", 20) + wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 20) def setup(self): """ diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_time.py b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_time.py index 396c3ca..5456524 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_time.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfe/cfe_time.py @@ -25,7 +25,7 @@ def test_00_Aliveness(self): # Send NOOP command, then check result to prove application is up and running cmd("<%= target_name %> CFE_TIME_CMD_NOOP") - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Send Reset Counters command, check resullt cmd("<%= target_name %> CFE_TIME_CMD_RESET_COUNTERS") @@ -42,7 +42,7 @@ def test_01_NoOp(self): cmd("<%= target_name %> CFE_TIME_CMD_NOOP") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_02_SendDiagnosticTlm(self): @@ -86,7 +86,7 @@ def test_03_SetStateCmd_Invalid(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_STATE with CLOCK_STATE 'INVALID'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct clock state is set wait_check(f"<%= target_name %> CFE_TIME_HK CLOCK_STATE_API == 'INVALID'", 100) @@ -103,7 +103,7 @@ def test_04_SetStateCmd_Valid(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_STATE with CLOCK_STATE 'VALID'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct clock state is set wait_check(f"<%= target_name %> CFE_TIME_HK CLOCK_STATE_API == 'VALID'", 100) @@ -120,7 +120,7 @@ def test_05_SetStateCmd_Flywheel(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_STATE with CLOCK_STATE 'FLYWHEEL'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct clock state is set wait_check(f"<%= target_name %> CFE_TIME_HK CLOCK_STATE_API == 'FLYWHEEL'", 100) @@ -139,7 +139,7 @@ def disabled_test_06_SetSourceCmd_Internal(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_SOURCE with TIME_SOURCE 'INTERNAL'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct clock source is set # Request a new diags packet to check this telemetry @@ -161,7 +161,7 @@ def disabled_test_07_SetSourceCmd_External(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_SOURCE with TIME_SOURCE 'EXTERNAL'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct clock source is set # Request a new diags packet to check this telemetry @@ -183,7 +183,7 @@ def disabled_test_08_SetSignalCmd_Primary(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_SIGNAL with TONE_SOURCE 'TONE_PRI'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct tone source is set # Request a new diags packet to check this telemetry @@ -205,7 +205,7 @@ def disabled_test_09_SetSignalCmd_Redundant(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_SIGNAL with TONE_SOURCE 'TONE_RED'") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct tone source is set # Request a new diags packet to check this telemetry @@ -227,7 +227,7 @@ def disabled_test_10_AddDelayCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_ADD_DELAY with SECONDS 1, MICROSECONDS 2") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct delay is set wait_check(f"<%= target_name %> CFE_TIME_HK SECONDS_DELAY == 1", 100) @@ -249,7 +249,7 @@ def disabled_test_11_SubDelayCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SUB_DELAY with SECONDS 1, MICROSECONDS 2") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct delay is set wait_check(f"<%= target_name %> CFE_TIME_HK SECONDS_DELAY == 0", 100) @@ -267,7 +267,7 @@ def test_12_SetTimeCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_TIME with SECONDS 3, MICROSECONDS 4") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_13_SetMETCmd(self): @@ -281,7 +281,7 @@ def test_13_SetMETCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_MET with SECONDS 4, MICROSECONDS 5") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Notes seconds / subseconds changes too quickly to be checked # wait_check(f"<%= target_name %> CFE_TIME_HK SECONDS_MET >= 4", 100) @@ -298,12 +298,12 @@ def test_14_SetSTCFCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_STCF with SECONDS 5, MICROSECONDS 6") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct values are set # Note: microseconds converted to (and reported as) subseconds in FSW - wait_check(f"<%= target_name %> CFE_TIME_HK SECONDS_STCF == 5", 100) - wait_check(f"<%= target_name %> CFE_TIME_HK SUBSECS_STCF == 25770", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK STCF_SECONDS == 5", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK STCF_SUBSECONDS == 25770", 100) def test_15_SetLeapSecondsCmd(self): @@ -317,7 +317,7 @@ def test_15_SetLeapSecondsCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SET_LEAP_SECONDS with LEAP_SECONDS 99") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify correct value of leap seconds is set wait_check(f"<%= target_name %> CFE_TIME_HK LEAP_SECONDS == 99", 100) @@ -334,7 +334,7 @@ def test_16_AddAdjustCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_ADD_ADJUST with SECONDS 1, MICROSECONDS 2") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_17_SubAdjustCmd(self): @@ -348,7 +348,7 @@ def test_17_SubAdjustCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SUB_ADJUST with SECONDS 1, MICROSECONDS 2") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_18_AddOneHzAdjustmentCmd(self): @@ -362,7 +362,7 @@ def test_18_AddOneHzAdjustmentCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_ADD_ONE_HZ_ADJUSTMENT with SECONDS 1, SUBSECONDS 2") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Get current number of CFE_TIME_DIAG packets received by GSW prev_time_diag_pkt_rcvd_count = tlm(f"<%= target_name %> CFE_TIME_DIAG RECEIVED_COUNT") @@ -396,7 +396,7 @@ def test_19_SubOneHzAdjustmentCmd(self): cmd(f"<%= target_name %> CFE_TIME_CMD_SUB_ONE_HZ_ADJUSTMENT with SECONDS 3, SUBSECONDS 4") # Verify command count incremented - wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> CFE_TIME_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Get current number of CFE_TIME_DIAG packets received by GSW prev_time_diag_pkt_rcvd_count = tlm(f"<%= target_name %> CFE_TIME_DIAG RECEIVED_COUNT") diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_ci_lab.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_ci_lab.py index b7371a4..b66076f 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_ci_lab.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_ci_lab.py @@ -14,23 +14,22 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "CI_LAB" - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing CI_LAB aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"CI_LAB_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CI_LAB_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> CI_LAB_CMD_NOOP") + wait_check(f"<%= target_name %> CI_LAB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> CI_LAB_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> CI_LAB_HK COMMAND_COUNTER == 0", 100) def setup(self): diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cf.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cf.py index 75aa689..df3d788 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cf.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cf.py @@ -61,7 +61,7 @@ def test_channel_management(self): cmd_count = tlm("<%= target_name %> CF_HK COMMAND_COUNTER") err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") cmd( - f"<%= target_name %> CF_CMD_FREEZE with CHANNEL_NUM {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_FREEZE with CHANNEL_NUM {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) @@ -74,7 +74,7 @@ def test_channel_management(self): self._require_hk("CF") err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") cmd( - f"<%= target_name %> CF_CMD_THAW with CHANNEL_NUM {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_THAW with CHANNEL_NUM {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) @@ -86,7 +86,7 @@ def test_channel_management(self): self._require_hk("CF") err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") cmd( - f"<%= target_name %> CF_CMD_DISABLE_DEQUEUE with CHANNEL_NUM {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_DISABLE_DEQUEUE with CHANNEL_NUM {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) @@ -97,7 +97,7 @@ def test_channel_management(self): self._require_hk("CF") err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") cmd( - f"<%= target_name %> CF_CMD_ENABLE_DEQUEUE with CHANNEL_NUM {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_ENABLE_DEQUEUE with CHANNEL_NUM {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) @@ -108,7 +108,7 @@ def test_channel_management(self): self._require_hk("CF") err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") cmd( - f"<%= target_name %> CF_CMD_ENABLE_DIR_POLLING with CHANNEL_NUM {channel}, POLL_DIR 255, SPARE 0" + f"<%= target_name %> CF_CMD_ENABLE_DIR_POLLING with CHANNEL_NUM {channel}, POLL_DIR 255" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) @@ -119,7 +119,7 @@ def test_channel_management(self): self._require_hk("CF") err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") cmd( - f"<%= target_name %> CF_CMD_DISABLE_DIR_POLLING with CHANNEL_NUM {channel}, POLL_DIR 255, SPARE 0" + f"<%= target_name %> CF_CMD_DISABLE_DIR_POLLING with CHANNEL_NUM {channel}, POLL_DIR 255" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) @@ -130,7 +130,7 @@ def test_channel_management(self): self._require_hk("CF") err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") cmd( - f"<%= target_name %> CF_CMD_PURGE_QUEUE with CHANNEL_NUM {channel}, QUEUE_TYPE 2, SPARE 0" + f"<%= target_name %> CF_CMD_PURGE_QUEUE with CHANNEL_NUM {channel}, QUEUE_TYPE 2" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) @@ -152,7 +152,7 @@ def test_transaction_controls(self): #------------- Command 1: Suspend ----------------------------------------- Group.print("Testing CF suspend transaction handling on <%= target_name %>") cmd( - f"<%= target_name %> CF_CMD_SUSPEND with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_SUSPEND with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 100) @@ -161,7 +161,7 @@ def test_transaction_controls(self): #------------- Command 2: Resume ------------------------------------------ Group.print("Testing CF resume transaction handling on <%= target_name %>") cmd( - f"<%= target_name %> CF_CMD_RESUME with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_RESUME with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 100) @@ -170,7 +170,7 @@ def test_transaction_controls(self): #------------- Command 3: Cancel ------------------------------------------ Group.print("Testing CF cancel transaction handling on <%= target_name %>") cmd( - f"<%= target_name %> CF_CMD_CANCEL with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_CANCEL with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 100) @@ -179,7 +179,7 @@ def test_transaction_controls(self): #------------- Command 4: Abandon ----------------------------------------- Group.print("Testing CF abandon transaction handling on <%= target_name %>") cmd( - f"<%= target_name %> CF_CMD_ABANDON with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}, SPARE_1 0, SPARE_2 0, SPARE_3 0" + f"<%= target_name %> CF_CMD_ABANDON with TRANSACTION_SEQ_NUM 1, EID 23, CHAN {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 100) @@ -203,54 +203,64 @@ def test_file_and_config_commands(self): #------------- Command 1: TX File (expected error) ------------------------- Group.print("Testing CF tx_file error handling on <%= target_name %>") cmd( - f"<%= target_name %> CF_CMD_TX_FILE with CFDP_CLASS 0, KEEP 1, CHAN_NUM {channel}, PRIORITY 1, DEST_ID {CFDP_GROUND_ENTITY_ID}, SRC_FILENAME '/cf/missing_src', DST_FILENAME '/ram/missing_dst'" + f"<%= target_name %> CF_CMD_TX_FILE with CFDP_CLASS 0, KEEP_FILE_FLAG 1, CHAN_NUM {channel}, PRIORITY 1, DEST_ID {CFDP_GROUND_ENTITY_ID}, SRC_FILENAME '/cf/missing_src', DEST_FILENAME '/ram/missing_dst'" ) try: wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 10) - cmd_count += 1 err_expected = err_count except Exception: # Some CF builds accept the command and fail later in the transaction; handle either counter path. wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count}", 10) err_expected = err_count + 1 - err_count += 1 wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_expected}", 10) #------------- Command 2: Playback Dir (expected error) -------------------- + self._require_hk("CF") + cmd_count = tlm("<%= target_name %> CF_HK COMMAND_COUNTER") + err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") + Group.print("Testing CF playback_dir error handling on <%= target_name %>") cmd( f"<%= target_name %> CF_CMD_PLAYBACK_DIR with CFDP_CLASS 0, KEEP 1, CHAN_NUM {channel}, PRIORITY 1, DEST_ID {CFDP_GROUND_ENTITY_ID}, SRC_FILENAME '/cf/missing_dir', DST_FILENAME '/ram/missing_dir'" ) try: wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 10) - cmd_count += 1 err_expected = err_count except Exception: # Some CF builds accept the command and fail later in the transaction; handle either counter path. wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count}", 10) err_expected = err_count + 1 - err_count += 1 wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_expected}", 10) #------------- Command 3: Write Queue (expected error) --------------------- + self._require_hk("CF") + cmd_count = tlm("<%= target_name %> CF_HK COMMAND_COUNTER") + err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") + Group.print("Testing CF write_queue error handling on <%= target_name %>") cmd( - f"<%= target_name %> CF_CMD_WRITE_QUEUE with TYPE 1, CHAN {channel}, QUEUE 0, SPARE 0, FILENAME '/cf/tmp/cf_queue_error.txt'" + f"<%= target_name %> CF_CMD_WRITE_QUEUE with TYPE 1, CHAN {channel}, QUEUE 0, FILENAME '/cf/tmp/cf_queue_error.txt'" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count + 1}", 100) - err_count += 1 #------------- Command 4: Set Param --------------------------------------- + self._require_hk("CF") + cmd_count = tlm("<%= target_name %> CF_HK COMMAND_COUNTER") + err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") + Group.print("Testing CF set_param on <%= target_name %>") cmd( - f"<%= target_name %> CF_CMD_SET_PARAM with VALUE 4, KEY 6, CHAN_NUM {channel}, SPARE 0" + f"<%= target_name %> CF_CMD_SET_PARAM with VALUE 4, KEY 6, CHAN_NUM {channel}" ) wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) - cmd_count += 1 #------------- Command 5: Get Param --------------------------------------- + self._require_hk("CF") + cmd_count = tlm("<%= target_name %> CF_HK COMMAND_COUNTER") + err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") + Group.print("Testing CF get_param on <%= target_name %>") cmd(f"<%= target_name %> CF_CMD_GET_PARAM with KEY 6, CHAN_NUM {channel}") wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -272,16 +282,22 @@ def test_engine_control(self): cmd("<%= target_name %> CF_CMD_ENABLE_ENGINE") wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) - cmd_count += 1 #------------- Command 2: Disable Engine ---------------------------------- + self._require_hk("CF") + cmd_count = tlm("<%= target_name %> CF_HK COMMAND_COUNTER") + err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") + Group.print("Testing CF disable_engine on <%= target_name %>") cmd("<%= target_name %> CF_CMD_DISABLE_ENGINE") wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> CF_HK COMMAND_ERROR_COUNTER == {err_count}", 100) - cmd_count += 1 #------------- Command 3: Enable Engine (restore) ------------------------- + self._require_hk("CF") + cmd_count = tlm("<%= target_name %> CF_HK COMMAND_COUNTER") + err_count = tlm("<%= target_name %> CF_HK COMMAND_ERROR_COUNTER") + Group.print("Restoring CF engine enable state on <%= target_name %>") cmd("<%= target_name %> CF_CMD_ENABLE_ENGINE") wait_check(f"<%= target_name %> CF_HK COMMAND_COUNTER == {cmd_count + 1}", 100) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py index 61c5067..41194b1 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_cs.py @@ -16,20 +16,21 @@ def test_00_Aliveness(self): then verify the command was received (by checking the command counter was cleared) """ - Group.print("Testing CS aliveness on <%= target_name %>") - - wait_check_packet("<%= target_name %>", "CS_HK", 1, 100) - + Group.print(f"Testing CS aliveness on <%= target_name %>") + + # Verify that we have a recent packet (by waiting for a new one to arrive) + wait_check_packet(f"<%= target_name %>", "CS_HK", 1, 100) + # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm("<%= target_name %> CS_HK COMMAND_COUNTER") - - # Send NOOP command, then check result to prove application is up and running - cmd("<%= target_name %> CS_CMD_NOOP") - wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - - # Send Reset Counters command, check resullt - cmd("<%= target_name %> CS_CMD_RESET_COUNTERS") - wait_check("<%= target_name %> CS_HK COMMAND_COUNTER == 0", 100) + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + # Check accepted NOOP command proving application is up and running + cmd(f"<%= target_name %> CS_CMD_NOOP") + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + # Check accepted Reset Counters command + cmd(f"<%= target_name %> CS_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER == 0", 100) def test_01_NoOp(self): @@ -58,12 +59,12 @@ def test_02_OneShot(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Lastoneshotaddress == 0x00000000", 100) - wait_check(f"<%= target_name %> CS_HK Lastoneshotsize == 1", 100) - wait_check(f"<%= target_name %> CS_HK Lastoneshotmaxbytespercycle == 1", 100) - wait_check(f"<%= target_name %> CS_HK Lastoneshotchecksum == 0", 100) - # Recomputeinprogress does not stay FALSE long enough to show in packet. - # Oneshotinprogress does not stay TRUE long enough to show in packet. + wait_check(f"<%= target_name %> CS_HK LAST_ONE_SHOT_ADDRESS == 0x00000000", 100) + wait_check(f"<%= target_name %> CS_HK LAST_ONE_SHOT_SIZE == 1", 100) + wait_check(f"<%= target_name %> CS_HK LAST_ONE_SHOT_MAX_BYTES_PER_CYCLE == 1", 100) + wait_check(f"<%= target_name %> CS_HK LAST_ONE_SHOT_CHECKSUM == 0", 100) + # RECOMPUTE_IN_PROGRESS does not stay FALSE long enough to show in packet. + # ONE_SHOT_IN_PROGRESS does not stay TRUE long enough to show in packet. def test_03_CancelOneShot(self): @@ -93,7 +94,7 @@ def test_04_EnableAllCS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Checksumstate == 'ENABLED'", 100) + wait_check(f"<%= target_name %> CS_HK CHECKSUM_STATE == 'ENABLED'", 100) def test_05_DisableAllCS(self): @@ -109,7 +110,7 @@ def test_05_DisableAllCS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Checksumstate == 'DISABLED'", 100) + wait_check(f"<%= target_name %> CS_HK CHECKSUM_STATE == 'DISABLED'", 100) def test_06_EnableCfeCore(self): @@ -125,7 +126,7 @@ def test_06_EnableCfeCore(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == 'ENABLED'", 100) + wait_check(f"<%= target_name %> CS_HK CFE_CORE_CS_STATE == 'ENABLED'", 100) def test_07_DisableCfeCore(self): @@ -141,7 +142,7 @@ def test_07_DisableCfeCore(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Cfecorecsstate == 'DISABLED'", 100) + wait_check(f"<%= target_name %> CS_HK CFE_CORE_CS_STATE == 'DISABLED'", 100) def test_08_ReportBaselineCfeCore(self): @@ -170,7 +171,7 @@ def test_09_RecomputeBaselineCfeCore(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - # Recomputeinprogress does not stay TRUE long enough to show in packet. + # RECOMPUTE_IN_PROGRESS does not stay TRUE long enough to show in packet. def test_10_EnableOS(self): @@ -186,7 +187,7 @@ def test_10_EnableOS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Oscsstate == 'ENABLED'", 100) + wait_check(f"<%= target_name %> CS_HK OS_CS_STATE == 'ENABLED'", 100) def test_11_DisableOS(self): @@ -202,7 +203,7 @@ def test_11_DisableOS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Oscsstate == 'DISABLED'", 100) + wait_check(f"<%= target_name %> CS_HK OS_CS_STATE == 'DISABLED'", 100) def test_12_ReportBaselineOS(self): @@ -231,7 +232,7 @@ def test_13_RecomputeBaselineOS(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - # Recomputeinprogress does not stay TRUE long enough to show in packet. + # RECOMPUTE_IN_PROGRESS does not stay TRUE long enough to show in packet. def test_14_EnableEEPROM(self): @@ -247,7 +248,7 @@ def test_14_EnableEEPROM(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Eepromcsstate == 'ENABLED'", 100) + wait_check(f"<%= target_name %> CS_HK EEPROM_CS_STATE == 'ENABLED'", 100) def test_15_DisableEEPROM(self): @@ -263,7 +264,7 @@ def test_15_DisableEEPROM(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Eepromcsstate == 'DISABLED'", 100) + wait_check(f"<%= target_name %> CS_HK EEPROM_CS_STATE == 'DISABLED'", 100) # TODO: The tests below were implemented, then commented-out because EEPROM and Memory # functions currently can't be tested in a straightforward way. That requires a change to the PSP module. @@ -276,7 +277,7 @@ def test_15_DisableEEPROM(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM with EntryID 0") + # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Was not fixed by commenting out DisableEEPROM command. <======= @@ -291,14 +292,14 @@ def test_15_DisableEEPROM(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_EEPROM with EntryID 0") + # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_EEPROM with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # # Verify any other telemetry changes - # wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + # wait_check(f"<%= target_name %> CS_HK RECOMPUTE_IN_PROGRESS == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? # def test_18_EnableEntryIDEepromCmd(self): @@ -308,7 +309,7 @@ def test_15_DisableEEPROM(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_EEPROM with EntryID 0") + # cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_EEPROM with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Verify command count incremented @@ -322,7 +323,7 @@ def test_15_DisableEEPROM(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_EEPROM with EntryID 0") + # cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_EEPROM with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Verify command count incremented @@ -336,7 +337,7 @@ def test_15_DisableEEPROM(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_EEPROM with Address 0x00000000") + # cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_EEPROM with ADDRESS 0x00000000") # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -355,7 +356,7 @@ def test_18_EnableMemory(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Memorycsstate == 'ENABLED'", 100) + wait_check(f"<%= target_name %> CS_HK MEMORY_CS_STATE == 'ENABLED'", 100) def test_19_DisableMemory(self): @@ -371,7 +372,7 @@ def test_19_DisableMemory(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Memorycsstate == 'DISABLED'", 100) + wait_check(f"<%= target_name %> CS_HK MEMORY_CS_STATE == 'DISABLED'", 100) # TODO: The tests below were implemented, then commented-out because EEPROM and Memory # functions currently can't be tested in a straightforward way. That requires a change to the PSP module. @@ -384,7 +385,7 @@ def test_19_DisableMemory(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_MEMORY with EntryID 0") + # cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_MEMORY with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Verify command count incremented @@ -398,14 +399,14 @@ def test_19_DisableMemory(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_MEMORY with EntryID 0") + # cmd("<%= target_name %> CS_CMD_RECOMPUTE_BASELINE_MEMORY with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # # Verify any other telemetry changes - # wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + # wait_check(f"<%= target_name %> CS_HK RECOMPUTE_IN_PROGRESS == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? # def test_22_EnableEntryIDMemory(self): @@ -415,7 +416,7 @@ def test_19_DisableMemory(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_MEMORY with EntryID 0") + # cmd("<%= target_name %> CS_CMD_ENABLE_ENTRY_MEMORY with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Verify command count incremented @@ -429,7 +430,7 @@ def test_19_DisableMemory(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_MEMORY with EntryID 0") + # cmd("<%= target_name %> CS_CMD_DISABLE_ENTRY_MEMORY with ENTRY_ID 0") # # FIXME: Entry ID invalid: 0 # # Verify command count incremented @@ -443,7 +444,7 @@ def test_19_DisableMemory(self): # cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") - # cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_MEMORY with Address 0x00000000") + # cmd("<%= target_name %> CS_CMD_GET_ENTRY_ID_MEMORY with ADDRESS 0x00000000") # # Verify command count incremented # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -462,7 +463,7 @@ def test_25_EnableTables(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Tablescsstate == 'ENABLED'", 100) + wait_check(f"<%= target_name %> CS_HK TABLES_CS_STATE == 'ENABLED'", 100) def test_26_DisableTables(self): @@ -478,7 +479,7 @@ def test_26_DisableTables(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Tablescsstate == 'DISABLED'", 100) + wait_check(f"<%= target_name %> CS_HK TABLES_CS_STATE == 'DISABLED'", 100) def test_28_RecomputeBaselineTable(self): @@ -494,7 +495,21 @@ def test_28_RecomputeBaselineTable(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - # Recomputeinprogress does not stay TRUE long enough to show in packet. + # RECOMPUTE_IN_PROGRESS does not stay TRUE long enough to show in packet. + + + def test_29_ReportBaselineTable(self): + """ + Test the ReportBaselineTable command. + """ + + cmd_count = tlm(f"<%= target_name %> CS_HK COMMAND_COUNTER") + + cmd("<%= target_name %> CS_CMD_REPORT_BASELINE_TABLE with NAME 'SAMPLE_APP.ExampleTable'") + + # Verify command count incremented + wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + def test_29_ReportBaselineTable(self): @@ -562,7 +577,7 @@ def test_33_EnableApps(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) + wait_check(f"<%= target_name %> CS_HK APP_CS_STATE == 'ENABLED'", 100) def test_34_DisableApps(self): @@ -578,7 +593,7 @@ def test_34_DisableApps(self): wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Verify any other telemetry changes - wait_check(f"<%= target_name %> CS_HK Appcsstate == 'DISABLED'", 100) + wait_check(f"<%= target_name %> CS_HK APP_CS_STATE == 'DISABLED'", 100) # TODO: The tests below were implemented, then commented-out because app functions currently can't # be tested. This is because the Linux implementation of the module loader isn't able to get the actual addresses. @@ -609,7 +624,7 @@ def test_34_DisableApps(self): # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # # Verify any other telemetry changes - # wait_check(f"<%= target_name %> CS_HK Recomputeinprogress == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? + # wait_check(f"<%= target_name %> CS_HK RECOMPUTE_IN_PROGRESS == 'TRUE'", 100) # FIXME: Does this stay true long enough to make it into the HK packet? # def test_37_EnableNameApp(self): @@ -625,7 +640,7 @@ def test_34_DisableApps(self): # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # # Verify any other telemetry changes - # wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) + # wait_check(f"<%= target_name %> CS_HK APP_CS_STATE == 'ENABLED'", 100) # def test_38_DisableNameApp(self): @@ -641,7 +656,7 @@ def test_34_DisableApps(self): # wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # # Verify any other telemetry changes - # wait_check(f"<%= target_name %> CS_HK Appcsstate == 'ENABLED'", 100) + # wait_check(f"<%= target_name %> CS_HK APP_CS_STATE == 'ENABLED'", 100) def test_39_ResetCounters(self): @@ -668,13 +683,13 @@ def test_39_ResetCounters(self): # Verify counters are reset to zero wait_check(f"<%= target_name %> CS_HK COMMAND_COUNTER == 0", 100) wait_check(f"<%= target_name %> CS_HK COMMAND_ERROR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> CS_HK Eepromcserrcounter == 0", 100) - wait_check(f"<%= target_name %> CS_HK Memorycserrcounter == 0", 100) - wait_check(f"<%= target_name %> CS_HK Appcserrcounter == 0", 100) - wait_check(f"<%= target_name %> CS_HK Tablescserrcounter == 0", 100) - wait_check(f"<%= target_name %> CS_HK Cfecorecserrcounter == 0", 100) - wait_check(f"<%= target_name %> CS_HK Oscserrcounter == 0", 100) - wait_check(f"<%= target_name %> CS_HK Passcounter == 0", 100) + wait_check(f"<%= target_name %> CS_HK EEPROM_CS_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK MEMORY_CS_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK APP_CS_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK TABLES_CS_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK CFE_CORE_CS_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK OS_CS_ERR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> CS_HK PASS_COUNTER == 0", 100) def setup(self): diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py index 32a75a7..5cf22f5 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_ds.py @@ -18,18 +18,19 @@ def test_00_Aliveness(self): Group.print("Testing DS aliveness on <%= target_name %>") - wait_check_packet("<%= target_name %>", "DS_HK", 1, 100) - + # Verify that we have a recent packet (by waiting for a new one to arrive) + wait_check_packet(f"<%= target_name %>", "DS_HK", 1, 100) + # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm("<%= target_name %> DS_HK COMMAND_COUNTER") - - # Send NOOP command, then check result to prove application is up and running - cmd("<%= target_name %> DS_CMD_NOOP") - wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - - # Send Reset Counters command, check resullt - cmd("<%= target_name %> DS_CMD_RESET_COUNTERS") - wait_check("<%= target_name %> DS_HK COMMAND_COUNTER == 0", 100) + cmd_count = tlm(f"<%= target_name %> DS_HK COMMAND_COUNTER") + + # Check accepted NOOP command proving application is up and running + cmd(f"<%= target_name %> DS_CMD_NOOP") + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + + # Check accepted Reset Counters command + cmd(f"<%= target_name %> DS_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER == 0", 100) def test_01_NoOp(self): diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index b8b616c..83c62eb 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -18,18 +18,19 @@ def test_00_Aliveness(self): Group.print("Testing FM aliveness on <%= target_name %>") - wait_check_packet("<%= target_name %>", "FM_HK", 1, 100) - + # Verify that we have a recent packet (by waiting for a new one to arrive) + wait_check_packet(f"<%= target_name %>", "FM_HK", 1, 20) + # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm("<%= target_name %> FM_HK COMMAND_COUNTER") - - # Send NOOP command, then check result to prove application is up and running - cmd("<%= target_name %> FM_CMD_NOOP") - wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - - # Send Reset Counters command, check resullt - cmd("<%= target_name %> FM_CMD_RESET_COUNTERS") - wait_check("<%= target_name %> FM_HK COMMAND_COUNTER == 0", 100) + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + # Check accepted NOOP command proving application is up and running + cmd(f"<%= target_name %> FM_CMD_NOOP") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER == {cmd_count + 1}", 20) + + # Check accepted Reset Counters command + cmd(f"<%= target_name %> FM_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER == 0", 20) def test_01_NoOp(self): @@ -64,7 +65,7 @@ def test_02_CopyFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE '/cf/file_rt.dat', TARGET '/cf/file_rt-cp.dat'") + cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/cf/file_rt.dat', TARGET_PATH '/cf/file_rt-cp.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -72,10 +73,10 @@ def test_02_CopyFile(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt-cp.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt-cp.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -98,7 +99,7 @@ def test_03_MoveFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE '/cf/file_rt.dat', TARGET '/cf/file_rt-mv.dat'") + cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/cf/file_rt.dat', TARGET_PATH '/cf/file_rt-mv.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -106,7 +107,7 @@ def test_03_MoveFile(self): # Cleanup: Delete the file that was created/moved # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt-mv.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt-mv.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -128,7 +129,7 @@ def test_04_RenameFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE '/cf/file_rt.dat', TARGET '/cf/file_rt-rnm.dat'") + cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE_PATH '/cf/file_rt.dat', TARGET_PATH '/cf/file_rt-rnm.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -136,7 +137,7 @@ def test_04_RenameFile(self): # Cleanup: Delete the file that was created/renamed # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt-rnm.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt-rnm.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -158,7 +159,7 @@ def test_05_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -190,7 +191,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with DIRECTORY '/cf/'") + cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/cf/'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -206,7 +207,7 @@ def test_07_DecompressFile(self): # cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # # Send the command under test - # cmd("<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE 'source.txt', TARGET 'target.txt'") + # cmd("<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE_PATH 'source.txt', TARGET_PATH 'target.txt'") # # Verify command count incremented # wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -239,7 +240,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE1 '/cf/file_rt1.dat', SOURCE2 '/cf/file_rt2.dat', TARGET '/cf/file_rt3.dat'") + cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE_PATH1 '/cf/file_rt1.dat', SOURCE_PATH2 '/cf/file_rt2.dat', TARGET_PATH '/cf/file_rt3.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -247,13 +248,13 @@ def test_08_ConcatFiles(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt1.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt1.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt2.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt2.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt3.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt3.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -276,7 +277,7 @@ def test_09_GetFileInfo(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with FILENAME '/cf/file_rt.dat', FILE_CRC CRC_NONE") + cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '/cf/file_rt.dat', CRC_METHOD CRC_NONE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -284,7 +285,7 @@ def test_09_GetFileInfo(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -310,7 +311,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the CreateDirectory command - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/cf/new-directory'") + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/cf/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -318,7 +319,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the DeleteDirectory command - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/cf/new-directory'") + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/cf/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -332,7 +333,7 @@ def test_12_GetDirListFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY '/cf/', FILENAME 'dirlist.txt', GET_SIZE_TIME_MODE FALSE") + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY_PATH '/cf/', OUTPUT_FILE_PATH 'dirlist.txt', GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -346,7 +347,7 @@ def test_13_GetDirListPkt(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/cf/', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with PATH '/cf/', OFFSET 0, GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -374,7 +375,7 @@ def test_15_SetTableState(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_SET_TABLE_STATE with TABLE_ENTRY_INDEX 0, TABLE_ENTRY_STATE DISABLED") + cmd("<%= target_name %> FM_CMD_SET_TABLE_STATE with INDEX 0, STATE DISABLED") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -399,7 +400,7 @@ def test_16_SetPermissions(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with FILENAME '/cf/file_rt.dat', MODE 777") + cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with PATH '/cf/file_rt.dat', PERMISSIONS 777") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -407,7 +408,7 @@ def test_16_SetPermissions(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with FILENAME '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -416,26 +417,26 @@ def test_17_ResetCounters(self): Test the ResetCounters command. """ - # Increment COMMAND_COUNTER and CHILD_CMD_COUNTER by sending CreateDirectory command - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with DIRECTORY '/cf/new-directory'") + # Increment COMMAND_COUNTER and CHILD_COMMAND_COUNTER by sending CreateDirectory command + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/cf/new-directory'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) - wait_check(f"<%= target_name %> FM_HK CHILD_CMD_COUNTER > 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_COUNTER > 0", 100) # Delete the created directory, for cleanup cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/cf/new-directory'") + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/cf/new-directory'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Cause COMMAND_ERROR_COUNTER and CHILD_CMD_ERR_COUNTER to increment, + # Cause COMMAND_ERROR_COUNTER and CHILD_COMMAND_ERROR_COUNTER to increment, # by sending a DeleteDirectory command with a non-existant directory. - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with DIRECTORY '/ram/non-existant'") + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/non-existant'") wait_check(f"<%= target_name %> FM_HK COMMAND_ERROR_COUNTER > 0", 100) - wait_check(f"<%= target_name %> FM_HK CHILD_CMD_ERR_COUNTER > 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_ERROR_COUNTER > 0", 100) - # Cause CHILD_CMD_WARN_COUNTER to increment, + # Cause CHILD_COMMAND_WARNING_COUNTER to increment, # by sending a DirListPkt command with an extremely-long directory/file path. - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with DIRECTORY '/ram/path-too-long-path-too-long-path-too-long-path-too-long', DIR_LIST_OFFSET 0, GET_SIZE_TIME_MODE FALSE") - wait_check(f"<%= target_name %> FM_HK CHILD_CMD_WARN_COUNTER > 0", 100) + cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with PATH '/ram/path-too-long-path-too-long-path-too-long-path-too-long', OFFSET 0, GET_SIZE_TIME_MODE FALSE") + wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_WARNING_COUNTER > 0", 100) # Send ResetCounters command cmd(f"<%= target_name %> FM_CMD_RESET_COUNTERS") @@ -443,9 +444,9 @@ def test_17_ResetCounters(self): # Verify counters are reset to zero wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER == 0", 100) wait_check(f"<%= target_name %> FM_HK COMMAND_ERROR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> FM_HK CHILD_CMD_COUNTER == 0", 100) - wait_check(f"<%= target_name %> FM_HK CHILD_CMD_ERR_COUNTER == 0", 100) - wait_check(f"<%= target_name %> FM_HK CHILD_CMD_WARN_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_ERROR_COUNTER == 0", 100) + wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_WARNING_COUNTER == 0", 100) def setup(self): diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hk.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hk.py index f30cb39..5ecd35f 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hk.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hk.py @@ -14,23 +14,22 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "HK" - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing HK aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"HK_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> HK_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> HK_CMD_NOOP") + wait_check(f"<%= target_name %> HK_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> HK_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> HK_HK COMMAND_COUNTER == 0", 100) def setup(self): diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hs.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hs.py index 87cb35d..51d05fc 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hs.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_hs.py @@ -56,23 +56,22 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "HS" - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing HS aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"HS_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> HS_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> HS_CMD_NOOP") + wait_check(f"<%= target_name %> HS_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> HS_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> HS_HK COMMAND_COUNTER == 0", 100) def test_application_monitor(self): """ @@ -83,23 +82,22 @@ def test_application_monitor(self): then verify the command was received (by checking the command counter incremented) - Restore initial state of Application Monitor command """ - app_name = "HS" # Command being tested test_cmd = "Enable Application Monitor" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK APP_MON_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK APP_MON_STATE") # Check accepted Enable Application Monitor Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_ENA_APP_MON") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_ENABLE_APP_MON") + self.util_verify_command_count("HS", cmd_count) # Check Application Monitor telemetry - wait_check(f"<%= target_name %> {app_name}_HK APP_MON_STATE == 'ENABLED'", 100) + wait_check(f"<%= target_name %> HS_HK APP_MON_STATE == 'ENABLED'", 100) # Verify Event Message event_id = 25 @@ -107,23 +105,23 @@ def test_application_monitor(self): event_msg = "Application Monitoring is *already* Enabled" else: event_msg = "Application Monitoring Enabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Command being tested test_cmd = "Disable Application Monitor" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK APP_MON_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK APP_MON_STATE") # Check accepted Enable Application Monitor Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_DIS_APP_MON") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_DISABLE_APP_MON") + self.util_verify_command_count("HS", cmd_count) # Check Application Monitor telemetry - wait_check(f"<%= target_name %> {app_name}_HK APP_MON_STATE == 'DISABLED'", 100) + wait_check(f"<%= target_name %> HS_HK APP_MON_STATE == 'DISABLED'", 100) # Verify Event Message event_id = 26 @@ -131,14 +129,14 @@ def test_application_monitor(self): event_msg = "Application Monitoring is *already* Disabled" else: event_msg = "Application Monitoring Disabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Restore initial Application Monitor State Group.print(f"Restoring Application Monitor to {cmd_state}...") if cmd_state == "ENABLED": - cmd(f"<%= target_name %> {app_name}_CMD_ENA_APP_MON") + cmd(f"<%= target_name %> HS_CMD_ENABLE_APP_MON") else: - cmd(f"<%= target_name %> {app_name}_CMD_DIS_APP_MON") + cmd(f"<%= target_name %> HS_CMD_DISABLE_APP_MON") def test_events_monitor(self): """ @@ -149,23 +147,22 @@ def test_events_monitor(self): then verify the command was received (by checking the command counter incremented) - Restore initial state of Events Monitor command """ - app_name = "HS" # Command being tested test_cmd = "Enable Event Monitor" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK EVENT_MON_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK EVENT_MON_STATE") # Check accepted Enable Events Monitor Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_ENA_EVENT_MON") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_ENABLE_EVENT_MON") + self.util_verify_command_count("HS", cmd_count) # Check Event Monitor telemetry - wait_check(f"<%= target_name %> {app_name}_HK EVENT_MON_STATE == 'ENABLED'", 100) + wait_check(f"<%= target_name %> HS_HK EVENT_MON_STATE == 'ENABLED'", 100) # Verify Event Message event_id = 27 @@ -173,23 +170,23 @@ def test_events_monitor(self): event_msg = "Event Monitoring is *already* Enabled" else: event_msg = "Event Monitoring Enabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Command being tested test_cmd = "Disable Event Monitor" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK EVENT_MON_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK EVENT_MON_STATE") # Check accepted Enable Event Monitor Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_DIS_EVENT_MON") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_DISABLE_EVENT_MON") + self.util_verify_command_count("HS", cmd_count) # Check Event Monitor telemetry - wait_check(f"<%= target_name %> {app_name}_HK EVENT_MON_STATE == 'DISABLED'", 100) + wait_check(f"<%= target_name %> HS_HK EVENT_MON_STATE == 'DISABLED'", 100) # Verify Event Message event_id = 28 @@ -197,14 +194,14 @@ def test_events_monitor(self): event_msg = "Event Monitoring is *already* Disabled" else: event_msg = "Event Monitoring Disabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Restore initial Event Monitor State Group.print(f"Restoring Event Monitor to {cmd_state}...") if cmd_state == "ENABLED": - cmd(f"<%= target_name %> {app_name}_CMD_ENA_EVENT_MON") + cmd(f"<%= target_name %> HS_CMD_ENABLE_EVENT_MON") else: - cmd(f"<%= target_name %> {app_name}_CMD_DIS_EVENT_MON") + cmd(f"<%= target_name %> HS_CMD_DISABLE_EVENT_MON") def test_aliveness_indicator(self): """ @@ -215,23 +212,22 @@ def test_aliveness_indicator(self): then verify the command was received (by checking the command counter incremented) - Restore initial state of Aliveness Indicator command """ - app_name = "HS" # Command being tested test_cmd = "Enable Aliveness Indicator" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK ALIVENESS_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK ALIVENESS_STATE") # Check accepted Enable Aliveness Indicator Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_ENA_ALIVENESS") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_ENABLE_ALIVENESS") + self.util_verify_command_count("HS", cmd_count) # Check Aliveness Indicator telemetry - wait_check(f"<%= target_name %> {app_name}_HK ALIVENESS_STATE == 'ENABLED'", 100) + wait_check(f"<%= target_name %> HS_HK ALIVENESS_STATE == 'ENABLED'", 100) # Verify Event Message event_id = 29 @@ -239,23 +235,23 @@ def test_aliveness_indicator(self): event_msg = "Aliveness Indicator is *already* Enabled" else: event_msg = "Aliveness Indicator Enabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Command being tested test_cmd = "Disable Aliveness Indicator" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK ALIVENESS_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK ALIVENESS_STATE") # Check accepted Enable Aliveness Indicator Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_DIS_ALIVENESS") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_DISABLE_ALIVENESS") + self.util_verify_command_count("HS", cmd_count) # Check Aliveness Indicator telemetry - wait_check(f"<%= target_name %> {app_name}_HK ALIVENESS_STATE == 'DISABLED'", 100) + wait_check(f"<%= target_name %> HS_HK ALIVENESS_STATE == 'DISABLED'", 100) # Verify Event Message event_id = 30 @@ -263,14 +259,14 @@ def test_aliveness_indicator(self): event_msg = "Aliveness Indicator is *already* Disabled" else: event_msg = "Aliveness Indicator Disabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Restore initial Aliveness Indicator State Group.print(f"Restoring Aliveness Indicator to {cmd_state}...") if cmd_state == "ENABLED": - cmd(f"<%= target_name %> {app_name}_CMD_ENA_ALIVENESS") + cmd(f"<%= target_name %> HS_CMD_ENABLE_ALIVENESS") else: - cmd(f"<%= target_name %> {app_name}_CMD_DIS_ALIVENESS") + cmd(f"<%= target_name %> HS_CMD_DISABLE_ALIVENESS") def test_reset_processor_resets_performed_count(self): """ @@ -278,25 +274,24 @@ def test_reset_processor_resets_performed_count(self): - Send Reset Processor Resets Performed command then verify the command was received (by checking the command counter incremented) """ - app_name = "HS" # Command being tested test_cmd = "Reset Processor Resets Performed Count" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Check accepted Reset Processor Resets Performed Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_CLR_CPU_RESET_CNT") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_RESET_RESETS_PERFORMED") + self.util_verify_command_count("HS", cmd_count) # Check Reset Processor Resets Performed telemetry - wait_check(f"<%= target_name %> {app_name}_HK CPU_RESET_CNT == 0", 100) + wait_check(f"<%= target_name %> HS_HK RESETS_PERFORMED == 0", 100) # Verify Event Message event_id = 31 event_msg = "Processor Resets Performed by HS Counter has been Reset" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) def test_set_max_processor_resets(self): """ @@ -305,33 +300,32 @@ def test_set_max_processor_resets(self): then verify the command was received (by checking the command counter incremented) - Restore initial value of Set Max Processor Resets command """ - app_name = "HS" # Command being tested test_cmd = "Set Max Processor Resets" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current max resets value - max_resets = tlm(f"<%= target_name %> {app_name}_HK MAX_RESETS") + max_resets = tlm(f"<%= target_name %> HS_HK MAX_RESETS") # Check accepted Set Max Processor Resets Command and verify command counter cmd_resets = 1024 - cmd(f"<%= target_name %> {app_name}_CMD_SET_MAX_CPU_RESETS with MAX_RESETS {cmd_resets}, PADDING 0") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_SET_MAX_RESETS with MAX_RESETS {cmd_resets}, PADDING 0") + self.util_verify_command_count("HS", cmd_count) # Check Set Max Processor Resets telemetry - wait_check(f"<%= target_name %> {app_name}_HK MAX_RESETS == {cmd_resets}", 100) + wait_check(f"<%= target_name %> HS_HK MAX_RESETS == {cmd_resets}", 100) # Verify Event Message event_id = 32 event_msg = f"Max Resets Performable by HS has been set to {cmd_resets}" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Restore initial Max Processor Resets Group.print(f"Restoring Max Processor Resets to {max_resets}...") - cmd(f"<%= target_name %> {app_name}_CMD_SET_MAX_CPU_RESETS with MAX_RESETS {max_resets}, PADDING 0") + cmd(f"<%= target_name %> HS_CMD_SET_MAX_RESETS with MAX_RESETS {max_resets}, PADDING 0") def test_cpu_hogging_indicator(self): """ @@ -342,23 +336,22 @@ def test_cpu_hogging_indicator(self): then verify the command was received (by checking the command counter incremented) - Restore initial state of CPU Hogging Indicator command """ - app_name = "HS" # Command being tested test_cmd = "Enable CPU Hogging Indicator" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK CPU_HOG_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK CPU_HOG_STATE") # Check accepted Enable CPU Hogging Indicator Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_ENA_CPU_HOG") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_ENABLE_CPU_HOG") + self.util_verify_command_count("HS", cmd_count) # Check CPU Hogging Indicator telemetry - wait_check(f"<%= target_name %> {app_name}_HK CPU_HOG_STATE == 'ENABLED'", 100) + wait_check(f"<%= target_name %> HS_HK CPU_HOG_STATE == 'ENABLED'", 100) # Verify Event Message event_id = 64 @@ -366,23 +359,23 @@ def test_cpu_hogging_indicator(self): event_msg = "CPU Hogging Indicator is *already* Enabled" else: event_msg = "CPU Hogging Indicator Enabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Command being tested test_cmd = "Disable CPU Hogging Indicator" # Display command under test and get current command counter - cmd_count = self.util_setup_test_command(app_name, test_cmd) + cmd_count = self.util_setup_test_command("HS", test_cmd) # Get current state value - cmd_state = tlm(f"<%= target_name %> {app_name}_HK CPU_HOG_STATE") + cmd_state = tlm(f"<%= target_name %> HS_HK CPU_HOG_STATE") # Check accepted Enable CPU Hogging Indicator Command and verify command counter - cmd(f"<%= target_name %> {app_name}_CMD_DIS_CPU_HOG") - self.util_verify_command_count(app_name, cmd_count) + cmd(f"<%= target_name %> HS_CMD_DISABLE_CPU_HOG") + self.util_verify_command_count("HS", cmd_count) # Check CPU Hogging Indicator telemetry - wait_check(f"<%= target_name %> {app_name}_HK CPU_HOG_STATE == 'DISABLED'", 100) + wait_check(f"<%= target_name %> HS_HK CPU_HOG_STATE == 'DISABLED'", 100) # Verify Event Message event_id = 65 @@ -390,14 +383,14 @@ def test_cpu_hogging_indicator(self): event_msg = "CPU Hogging Indicator is *already* Disabled" else: event_msg = "CPU Hogging Indicator Disabled" - self.util_verify_event_message(app_name, test_cmd, event_id, event_msg) + self.util_verify_event_message("HS", test_cmd, event_id, event_msg) # Restore initial CPU Hogging Indicator State Group.print(f"Restoring CPU Hogging Indicator to {cmd_state}...") if cmd_state == "ENABLED": - cmd(f"<%= target_name %> {app_name}_CMD_ENA_CPU_HOG") + cmd(f"<%= target_name %> HS_CMD_ENABLE_CPU_HOG") else: - cmd(f"<%= target_name %> {app_name}_CMD_DIS_CPU_HOG") + cmd(f"<%= target_name %> HS_CMD_DISABLE_CPU_HOG") def setup(self): diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py index b86e98c..a2ede65 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py @@ -24,12 +24,11 @@ def test_00_aliveness(self): # Check accepted NOOP command proving application is up and running cmd(f"<%= target_name %> LC_CMD_NOOP") - wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == {cmd_count + 1}", 20) # Check accepted Reset Counters command cmd(f"<%= target_name %> LC_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == 0", 100) - + wait_check(f"<%= target_name %> LC_HK COMMAND_COUNTER == 0", 20) def test_01_set_lc_state(self): """ @@ -49,7 +48,7 @@ def test_01_set_lc_state(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") # Check accepted Set LC State = 1 command cmd(f"<%= target_name %> LC_CMD_SET_LC_STATE with NEW_LC_STATE ACTIVE") @@ -71,7 +70,7 @@ def test_01_set_lc_state(self): # Check accepted Set LC State = 4 (invalid) command cmd(f"<%= target_name %> LC_CMD_SET_LC_STATE with NEW_LC_STATE 4") - wait_check(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER == {cmd_err_count + 1}", 100) + wait_check(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER == {cmd_err_count + 1}", 100) # NOTE: Expected event message: "Set LC state error: invalid state = 4" @@ -109,7 +108,7 @@ def test_02_set_ap_state(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") # Check accepted Set AP State = 1 command cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_NUMBER 0, NEW_AP_STATE ACTIVE") @@ -131,7 +130,7 @@ def test_02_set_ap_state(self): # Check accepted Set AP State = 4 (invalid) command cmd(f"<%= target_name %> LC_CMD_SET_AP_STATE with AP_NUMBER 0, NEW_AP_STATE PERM_OFF") - wait_check(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER == {cmd_err_count + 1}", 100) + wait_check(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER == {cmd_err_count + 1}", 100) # NOTE: Expected event message: "Set AP state error: AP = %d, Invalid new state = 4" @@ -167,7 +166,7 @@ def test_03_set_ap_perm_off(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") # Check accepted Set AP Perm Off Command cmd(f"<%= target_name %> LC_CMD_SET_AP_PERM_OFF with AP_NUMBER 0") @@ -192,7 +191,7 @@ def test_04_reset_ap_stats(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") # Check accepted Reset AP Stats Command cmd(f"<%= target_name %> LC_CMD_RESET_AP_STATS with AP_NUMBER 0") @@ -217,7 +216,7 @@ def test_05_reset_wp_stats(self): cmd_count = tlm(f"<%= target_name %> LC_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest command err count - cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERR_COUNTER") + cmd_err_count = tlm(f"<%= target_name %> LC_HK COMMAND_ERROR_COUNTER") # Check accepted Reset WP Stats Command cmd(f"<%= target_name %> LC_CMD_RESET_WP_STATS with WP_NUMBER 0") diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_md.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_md.py index b473452..1ccd144 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_md.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_md.py @@ -14,23 +14,22 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "MD" - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing MD aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MD_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MD_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> MD_CMD_NOOP") + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> MD_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == 0", 100) def test_dwell_commands(self): """ @@ -54,87 +53,86 @@ def test_dwell_commands(self): then verify the command was received (by checking the command counter incremented) and verify that the command specified dwell table is cleared (by checking the dwell mask value) """ - app_name = "MD" dwell_sym = 'MD_AppData' dwell_delay = 5 - Group.print(f"Testing {app_name} Dwell Commands on <%= target_name %>") + Group.print(f"Testing MD Dwell Commands on <%= target_name %>") #------------- Command 1: Jam Dwell ---------------------------------------- - Group.print(f"Testing {app_name} jam_dwell on <%= target_name %>") + Group.print(f"Testing MD jam_dwell on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MD_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MD_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the dwell table address count 1 - dwell_mask = tlm(f"<%= target_name %> {app_name}_HK DWELL_TBL_ADDR_COUNT_1") + dwell_mask = tlm(f"<%= target_name %> MD_HK DWELL_TBL_ADDR_COUNT_1") # send the jam dwell command - parameters are: table, entry/row, field size, delay, offset, and symbol - cmd(f"<%= target_name %> {app_name}_CMD_JAM_DWELL with TABLE_ID 1, ENTRY_ID 1, FIELD_LENGTH 4, DWELL_DELAY {dwell_delay}, OFFSET 0, SYM_NAME {dwell_sym} ") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> MD_CMD_JAM_DWELL with TABLE_ID 1, ENTRY_ID 1, FIELD_LENGTH 4, DWELL_DELAY {dwell_delay}, OFFSET 0, SYM_NAME {dwell_sym} ") + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check Dwell Table Address Count 1 - wait_check(f"<%= target_name %> {app_name}_HK DWELL_TBL_ADDR_COUNT_1 == 1", 100) + wait_check(f"<%= target_name %> MD_HK DWELL_TBL_ADDR_COUNT_1 == 1", 100) # Check Dwell Num Waits per Packet 1 - wait_check(f"<%= target_name %> {app_name}_HK NUM_WAITS_PER_PKT_1 == {dwell_delay}", 100) + wait_check(f"<%= target_name %> MD_HK NUM_WAITS_PER_PKT_1 == {dwell_delay}", 100) #------------- Command 2: Start Dwell --------------------------------------- - Group.print(f"Testing {app_name} start_dwell on <%= target_name %>") + Group.print(f"Testing MD start_dwell on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MD_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MD_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest dwell mask - dwell_mask = tlm(f"<%= target_name %> {app_name}_HK DWELL_ENABLED_MASK") + dwell_mask = tlm(f"<%= target_name %> MD_HK DWELL_ENABLED_MASK") # send the start dwell command - parameters are table mask and padding - cmd(f"<%= target_name %> {app_name}_CMD_START_DWELL with TABLE_MASK 1, PADDING 0") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> MD_CMD_START_DWELL with TABLE_MASK 1, PADDING 0") + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check Dwell Mask - Make sure the dwell enabled mask first bit is set - wait_check(f"<%= target_name %> {app_name}_HK DWELL_ENABLED_MASK & 1 == 1", 100) + wait_check(f"<%= target_name %> MD_HK DWELL_ENABLED_MASK & 1 == 1", 100) #------------- Command 3: Stop Dwell ---------------------------------------- # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MD_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MD_HK COMMAND_COUNTER") # Assuming no one else is sending commands, grab the latest dwell mask - dwell_mask = tlm(f"<%= target_name %> {app_name}_HK DWELL_ENABLED_MASK") + dwell_mask = tlm(f"<%= target_name %> MD_HK DWELL_ENABLED_MASK") # send the stop dwell command - parameters are table mask and padding - cmd(f"<%= target_name %> {app_name}_CMD_STOP_DWELL with TABLE_MASK 1, PADDING 0") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> MD_CMD_STOP_DWELL with TABLE_MASK 1, PADDING 0") + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check Dwell Mask - Make sure the dwell enabled mask first bit is clear - wait_check(f"<%= target_name %> {app_name}_HK DWELL_ENABLED_MASK & 1 == 0", 100) + wait_check(f"<%= target_name %> MD_HK DWELL_ENABLED_MASK & 1 == 0", 100) #------------- Command 4: Jam Dwell (restore original table value ) --------- # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MD_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MD_HK COMMAND_COUNTER") # send the jam dwell command - jam the original null entry - cmd(f"<%= target_name %> {app_name}_CMD_JAM_DWELL with TABLE_ID 1, ENTRY_ID 1, FIELD_LENGTH 0, DWELL_DELAY 0, OFFSET 0, SYM_NAME '' ") + cmd(f"<%= target_name %> MD_CMD_JAM_DWELL with TABLE_ID 1, ENTRY_ID 1, FIELD_LENGTH 0, DWELL_DELAY 0, OFFSET 0, SYM_NAME '' ") # check command count - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check Dwell Table Address Count 1 - wait_check(f"<%= target_name %> {app_name}_HK DWELL_TBL_ADDR_COUNT_1 == 0", 100) + wait_check(f"<%= target_name %> MD_HK DWELL_TBL_ADDR_COUNT_1 == 0", 100) # Check Dwell Num Waits per Packet 1 - wait_check(f"<%= target_name %> {app_name}_HK NUM_WAITS_PER_PKT_1 == 0", 100) + wait_check(f"<%= target_name %> MD_HK NUM_WAITS_PER_PKT_1 == 0", 100) def test_cmd_set_signature(self): """ @@ -142,29 +140,28 @@ def test_cmd_set_signature(self): - Send a set_signature command then verify the command was received (by checking the command counter incremented) """ - app_name = "MD" - Group.print(f"Testing {app_name} set_signature on <%= target_name %>") + Group.print(f"Testing MD set_signature on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MD_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MD_HK COMMAND_COUNTER") # send the set signature command - parameters are table and signature - cmd(f"<%= target_name %> {app_name}_CMD_SET_SIGNATURE with TABLE_ID 1, PADDING 0, SIGNATURE 'TABLE1SIG'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> MD_CMD_SET_SIGNATURE with TABLE_ID 1, PADDING 0, SIGNATURE 'TABLE1SIG'") + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MD_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MD_HK COMMAND_COUNTER") # send the set signature command - restore the original value - cmd(f"<%= target_name %> {app_name}_CMD_SET_SIGNATURE with TABLE_ID 1, PADDING 0, SIGNATURE ''") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> MD_CMD_SET_SIGNATURE with TABLE_ID 1, PADDING 0, SIGNATURE ''") + wait_check(f"<%= target_name %> MD_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def setup(self): """ diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_mm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_mm.py index 7192ce4..94c255d 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_mm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_mm.py @@ -1,7 +1,5 @@ from openc3.script.suite import Group -_app_name = "MM" - # Group class name should indicate what the scripts are testing class cfs_test_group_cfs_mm(Group): """ @@ -17,40 +15,40 @@ def test_0_aliveness(self): then verify the command was received (by checking the command counter was cleared) """ - Group.print(f"Testing {_app_name} aliveness on <%= target_name %>") + Group.print(f"Testing MM aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{_app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"MM_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {_app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> MM_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {_app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {_app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> MM_CMD_NOOP") + wait_check(f"<%= target_name %> MM_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {_app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {_app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> MM_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> MM_HK COMMAND_COUNTER == 0", 100) def test_1_LookupSym_test(self): - - Group.print(f"Testing {_app_name} MM_CMD_LOOKUPSYM command on <%= target_name %>") - + + Group.print(f"Testing MM MM_CMD_LOOKUP_SYM command on <%= target_name %>") + # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{_app_name}_HK", 1, 100) - - cmd_count = tlm(f"<%= target_name %> {_app_name}_HK COMMAND_COUNTER") - - # Check accepted MM_CMD_LOOKUPSYM command and LASTACTION set correctly - cmd(f"<%= target_name %> MM_CMD_LOOKUPSYM with SYMNAME 'SAMPLE_LIB_Buffer'") - wait_check(f"<%= target_name %> {_app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) - wait_check(f"<%= target_name %> {_app_name}_HK LASTACTION == 'SYM_LOOKUP'", 100) - + wait_check_packet(f"<%= target_name %>", f"MM_HK", 1, 100) + + cmd_count = tlm(f"<%= target_name %> MM_HK COMMAND_COUNTER") + + # Check accepted MM_CMD_LOOKUP_SYM command and LAST_ACTION set correctly + cmd(f"<%= target_name %> MM_CMD_LOOKUP_SYM with SYMNAME 'SAMPLE_LIB_Buffer'") + wait_check(f"<%= target_name %> MM_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + wait_check(f"<%= target_name %> MM_HK LAST_ACTION == 'SYM_LOOKUP'", 100) + # Check accepted Reset Counters command - cmd(f"<%= target_name %> {_app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {_app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> MM_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> MM_HK COMMAND_COUNTER == 0", 100) def setup(self): diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sample_app.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sample_app.py index 15caed8..3de96e4 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sample_app.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sample_app.py @@ -14,23 +14,22 @@ def test_aliveness(self): - Reset the command counter then verify the command was received (by checking the command counter was cleared) """ - app_name = "SAMPLE_APP" - Group.print(f"Testing {app_name} aliveness on <%= target_name %>") + Group.print(f"Testing SAMPLE_APP aliveness on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"SAMPLE_APP_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> SAMPLE_APP_HK COMMAND_COUNTER") # Check accepted NOOP command proving application is up and running - cmd(f"<%= target_name %> {app_name}_CMD_NOOP") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> SAMPLE_APP_CMD_NOOP") + wait_check(f"<%= target_name %> SAMPLE_APP_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Check accepted Reset Counters command - cmd(f"<%= target_name %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> SAMPLE_APP_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> SAMPLE_APP_HK COMMAND_COUNTER == 0", 100) def test_cmd_process(self): """ @@ -38,19 +37,18 @@ def test_cmd_process(self): - Send command process then verify the command was received (by checking the command counter incremented) """ - app_name = "SAMPLE_APP" - Group.print(f"Testing {app_name} command process on <%= target_name %>") + Group.print(f"Testing SAMPLE_APP command process on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"SAMPLE_APP_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> SAMPLE_APP_HK COMMAND_COUNTER") # Check accepted Command Process - cmd(f"<%= target_name %> {app_name}_CMD_PROCESS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> SAMPLE_APP_CMD_PROCESS") + wait_check(f"<%= target_name %> SAMPLE_APP_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def test_display_param(self): """ @@ -58,19 +56,18 @@ def test_display_param(self): - Send display param command then verify the command was received (by checking the command counter incremented) """ - app_name = "SAMPLE_APP" - Group.print(f"Testing {app_name} display param command on <%= target_name %>") + Group.print(f"Testing SAMPLE_APP display param command on <%= target_name %>") # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"{app_name}_HK", 1, 100) + wait_check_packet(f"<%= target_name %>", f"SAMPLE_APP_HK", 1, 100) # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> SAMPLE_APP_HK COMMAND_COUNTER") # Check accepted Display Param command - cmd(f"<%= target_name %> {app_name}_CMD_DISPLAY_PARAM with VAL_U32 10, VAL_I16 -4, VAL_STR 'Hello'") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + cmd(f"<%= target_name %> SAMPLE_APP_CMD_DISPLAY_PARAM with VAL_U32 10, VAL_I16 -4, VAL_STR 'Hello'") + wait_check(f"<%= target_name %> SAMPLE_APP_HK COMMAND_COUNTER == {cmd_count + 1}", 100) def setup(self): """ diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sc.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sc.py index 2c5f2a4..6d99661 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sc.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_sc.py @@ -6,6 +6,14 @@ class cfs_test_group_cfs_sc(Group): - Methods beginning with script_ or test_ are added to Script dropdown """ + def get_command_count(self): + # Verify we have a recent packet + wait_check_packet("<%= target_name %>", "SC_HK", 1, 100) + + # Assuming no one else is sending commands, grab the latest command count + return tlm("<%= target_name %> SC_HK COMMAND_COUNTER") + + def test_00_aliveness(self): """ FSW Aliveness Test @@ -17,11 +25,8 @@ def test_00_aliveness(self): Group.print(f"Testing SC aliveness on <%= target_name %>") - # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"SC_HK", 1, 100) - # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") + cmd_count = self.get_command_count() # Check accepted NOOP command proving application is up and running cmd(f"<%= target_name %> SC_CMD_NOOP") @@ -31,6 +36,7 @@ def test_00_aliveness(self): cmd(f"<%= target_name %> SC_CMD_RESET_COUNTERS") wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == 0", 100) + def test_01_continue_ats_on_failure(self): """ Continue ATS on Failure Test @@ -38,14 +44,11 @@ def test_01_continue_ats_on_failure(self): then verify the command was received (by checking the command counter incremented) and set back to default value (True) """ - - Group.print(f"Testing SC Continue ATS on Failure on <%= target_name %>") - # Verify we have a recent packet - wait_check_packet(f"<%= target_name %>", f"SC_HK", 1, 100) + Group.print(f"Testing SC Continue ATS on Failure on <%= target_name %>") # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") + cmd_count = self.get_command_count() # Check accepted Continue ATS on Failure command cmd(f"<%= target_name %> SC_CMD_CONTINUE_ATS_ON_FAILURE with CONTINUE_STATE FALSE") @@ -58,6 +61,7 @@ def test_01_continue_ats_on_failure(self): wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) wait_check(f"<%= target_name %> SC_HK CONT_ATS_ON_FAIL == 'TRUE'", 100) + def test_02_rts_operations(self): """ RTS Operations Test @@ -73,35 +77,39 @@ def test_02_rts_operations(self): Group.print(f"Testing SC rts operations on <%= target_name %>") - # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"SC_HK", 1, 100) + # Assuming no one else is sending commands, grab the latest command count + cmd_count = self.get_command_count() # Enable RTS 1 - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> SC_CMD_ENABLE_RTS with RTS_ID 1") + cmd(f"<%= target_name %> SC_CMD_ENABLE_RTS with RTS_NUM 1") wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) # Test Start RTS command # Expect the SC cmd count to increase by 1 for this SC_CMD_START_RTS command, # plus 3 for the commands in the RTS1 (SC No-Op, SC Enable RTS 2, SC Start RTS 2) # plus 3 for the commands in the RTS2 (three SC No-Ops) - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") - expected_num_sc_cmd_count = cmd_count + 1 + 6 - cmd(f"<%= target_name %> SC_CMD_START_RTS with RTS_ID 1") - wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {expected_num_sc_cmd_count}", 100) - wait(3) + # Assuming no one else is sending commands, grab the latest command count + cmd_count = self.get_command_count() + 1 + 6 + + cmd(f"<%= target_name %> SC_CMD_START_RTS with RTS_NUM 1") + wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count}", 100) + + # Assuming no one else is sending commands, grab the latest command count + cmd_count = self.get_command_count() # Check accepted Stop RTS command - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> SC_CMD_STOP_RTS with RTS_ID 1") + cmd(f"<%= target_name %> SC_CMD_STOP_RTS with RTS_NUM 1") wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # Assuming no one else is sending commands, grab the latest command count + cmd_count = self.get_command_count() + # Check accepted Disable RTS command - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> SC_CMD_DISABLE_RTS with RTS_ID 1") + cmd(f"<%= target_name %> SC_CMD_DISABLE_RTS with RTS_NUM 1") wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + def test_03_rts_group_operations(self): """ RTS Group Operations Test @@ -117,36 +125,37 @@ def test_03_rts_group_operations(self): Group.print(f"Testing SC rts group operations on <%= target_name %>") - # Verify that we have a recent packet (by waiting for a new one to arrive) - wait_check_packet(f"<%= target_name %>", f"SC_HK", 1, 100) - # Assuming no one else is sending commands, grab the latest command count - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") + cmd_count = self.get_command_count() # Check accepted Enable RTS Group command - cmd(f"<%= target_name %> SC_CMD_ENABLE_RTS_GROUP with FIRST_RTS_ID 2, LAST_RTS_ID 4") + cmd(f"<%= target_name %> SC_CMD_ENABLE_RTS_GRP with FIRST_RTS_NUM 2, LAST_RTS_NUM 4") wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # Assuming no one else is sending commands, grab the latest command count + cmd_count = self.get_command_count() + # Check accepted Start RTS Group command - # Expect the cmd count to increase by 1 for this SC_CMD_START_RTS_GROUP command, + # Expect the cmd count to increase by 1 for this SC_CMD_START_RTS_GRP command, # plus 9 for the commands in the RTSs (three SC no-ops per RTS) - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") - expected_num_sc_cmd_count = cmd_count + 1 + (3 * 3) - cmd(f"<%= target_name %> SC_CMD_START_RTS_GROUP with FIRST_RTS_ID 2, LAST_RTS_ID 4") - wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {expected_num_sc_cmd_count}", 100) + cmd(f"<%= target_name %> SC_CMD_START_RTS_GRP with FIRST_RTS_NUM 2, LAST_RTS_NUM 4") + wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER > {cmd_count}", 100) - wait(3) + # Assuming no one else is sending commands, grab the latest command count + cmd_count = self.get_command_count() # Check accepted Stop RTS Group command - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> SC_CMD_STOP_RTS_GROUP with FIRST_RTS_ID 2, LAST_RTS_ID 4") + cmd(f"<%= target_name %> SC_CMD_STOP_RTS_GRP with FIRST_RTS_NUM 2, LAST_RTS_NUM 4") wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + # Assuming no one else is sending commands, grab the latest command count + cmd_count = self.get_command_count() + # Check accepted Disable RTS Group command - cmd_count = tlm(f"<%= target_name %> SC_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> SC_CMD_DISABLE_RTS_GROUP with FIRST_RTS_ID 2, LAST_RTS_ID 4") + cmd(f"<%= target_name %> SC_CMD_DISABLE_RTS_GRP with FIRST_RTS_NUM 2, LAST_RTS_NUM 4") wait_check(f"<%= target_name %> SC_HK COMMAND_COUNTER == {cmd_count + 1}", 100) + def setup(self): """ Test Group Setup @@ -155,6 +164,7 @@ def setup(self): """ pass + def teardown(self): """ Test Group Teardown diff --git a/targets/CFS/procedures/cfs_test_suite.py b/targets/CFS/procedures/cfs_test_suite.py index e3f94cb..d0bb6e4 100644 --- a/targets/CFS/procedures/cfs_test_suite.py +++ b/targets/CFS/procedures/cfs_test_suite.py @@ -22,9 +22,12 @@ load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_md.py") load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_mm.py") load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_sample_app.py") -load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_sbn.py") load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_sc.py") +# Only test applications that have EDS implemented +if "<%= $cfs_globals_eds_enabled %>" == "false": + load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_sbn.py") + class cfs_test_suite(Suite): def __init__(self): @@ -55,9 +58,12 @@ def __init__(self): self.add_group(cfs_test_group_cfs_md) self.add_group(cfs_test_group_cfs_mm) self.add_group(cfs_test_group_cfs_sample_app) - self.add_group(cfs_test_group_cfs_sbn) self.add_group(cfs_test_group_cfs_sc) + # Only test applications that have EDS implemented + if "<%= $cfs_globals_eds_enabled %>" == "false": + self.add_group(cfs_test_group_cfs_sbn) + def setup(self): # Run when Suite Setup button is pressed # Run before all groups when Suite Start is pressed diff --git a/targets/CFS/procedures/get_file_info.py b/targets/CFS/procedures/get_file_info.py index 3824d0e..d471298 100644 --- a/targets/CFS/procedures/get_file_info.py +++ b/targets/CFS/procedures/get_file_info.py @@ -15,11 +15,11 @@ exp_file_info_pkt_count = curr_file_info_pkt_count + 1 # Send FM get file information command -cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with FILENAME '{file_to_get}', FILE_CRC 'CRC_16'") +cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '{file_to_get}', CRC_METHOD 'CRC_16'") # Wait for a file info packet to be returned and validate its contents wait_check(f"<%= target_name %> FM_FILE_INFO RECEIVED_COUNT == {exp_file_info_pkt_count}", 10) -check(f"<%= target_name %> FM_FILE_INFO FILENAME == '{file_to_get}'") +check(f"<%= target_name %> FM_FILE_INFO NAME == '{file_to_get}'") check(f"<%= target_name %> FM_FILE_INFO CRC == {exp_file_crc}") print(f"File info for {file_to_get} successfully retrieved!") From 8aff06e6e849f0a67684433b17b889ed68fb62f3 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 10 Apr 2026 10:14:09 -0400 Subject: [PATCH 29/39] Fix cFS/SC#28, Update SC HKTLM definition Updates the RTS status fields to match the TLM change --- targets/CFS/cmd_tlm/sc_tlm_def.txt | 8 ++++---- targets/CFS/lib/cfs_globals.rb | 10 ++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/targets/CFS/cmd_tlm/sc_tlm_def.txt b/targets/CFS/cmd_tlm/sc_tlm_def.txt index 427d67e..ea76caa 100644 --- a/targets/CFS/cmd_tlm/sc_tlm_def.txt +++ b/targets/CFS/cmd_tlm/sc_tlm_def.txt @@ -42,10 +42,10 @@ APPEND_ITEM NEXT_RTS_TIME 32 UINT "Next RTS cmd Absolute Time" APPEND_ITEM NEXT_ATS_TIME 32 UINT "Next ATS Command Time (seconds)" <% $sc_num_rts_status_fields.times do |n| %> - APPEND_ITEM RTS_W<%=n%>_EXE_STATUS 16 UINT "RTS Executing Status Word <%=n%> Bit Map" - FORMAT_STRING "0x%04X" + APPEND_ITEM RTS_W<%=n%>_EXE_STATUS 8 UINT "RTS Executing Status Word <%=n%> Bit Map" + FORMAT_STRING "0x%02X" <% end %> <% $sc_num_rts_status_fields.times do |n| %> - APPEND_ITEM RTS_W<%=n%>_DIS_STATUS 16 UINT "RTS Disabled Status Word <%=n%> Bit Map" - FORMAT_STRING "0x%04X" + APPEND_ITEM RTS_W<%=n%>_DIS_STATUS 8 UINT "RTS Disabled Status Word <%=n%> Bit Map" + FORMAT_STRING "0x%02X" <% end %> diff --git a/targets/CFS/lib/cfs_globals.rb b/targets/CFS/lib/cfs_globals.rb index 57d6cfc..340be4a 100644 --- a/targets/CFS/lib/cfs_globals.rb +++ b/targets/CFS/lib/cfs_globals.rb @@ -98,15 +98,9 @@ def cfs_globals_set_endianness(endianness_input_string) $sc_num_rts = 4 # ------------------------------------------------------------------------------------------------- -# Number of RTSs that can fit their statuses in a uint16 -# Note: This value should correspond with SC_NUMBER_OF_RTS_IN_UINT16 +# Number of RTS status fields in the SC housekeeping telemetry (octets) # ------------------------------------------------------------------------------------------------- -$sc_num_rts_in_uint16 = 16 - -# ------------------------------------------------------------------------------------------------- -# Number of uint16 RTS status fields in the SC housekeeping telemetry -# ------------------------------------------------------------------------------------------------- -$sc_num_rts_status_fields = (($sc_num_rts + $sc_num_rts_in_uint16 - 1) / $sc_num_rts_in_uint16) +$sc_num_rts_status_fields = (($sc_num_rts + 7) / 8) # ------------------------------------------------------------------------------------------------- # Number of MD dwell tables defined in the system From b49865776fcd14e1fa53a30dc65ce1feff0aad9c Mon Sep 17 00:00:00 2001 From: czogby Date: Tue, 14 Apr 2026 19:43:51 -0400 Subject: [PATCH 30/39] Fix #122: Fixed. Also fixes other 2 related issues, #121 & #123. --- .../cfs_fm.py | 85 +++++++++++-------- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index 83c62eb..951b8aa 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -56,7 +56,7 @@ def test_02_CopyFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -65,7 +65,7 @@ def test_02_CopyFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/cf/file_rt.dat', TARGET_PATH '/cf/file_rt-cp.dat'") + cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/file_rt.dat', TARGET_PATH '/ram/fm_test/file_rt-cp.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -73,10 +73,10 @@ def test_02_CopyFile(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt-cp.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt-cp.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -90,7 +90,7 @@ def test_03_MoveFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -99,7 +99,7 @@ def test_03_MoveFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/cf/file_rt.dat', TARGET_PATH '/cf/file_rt-mv.dat'") + cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/file_rt.dat', TARGET_PATH '/ram/fm_test/file_rt-mv.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -107,7 +107,7 @@ def test_03_MoveFile(self): # Cleanup: Delete the file that was created/moved # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt-mv.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt-mv.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -120,7 +120,7 @@ def test_04_RenameFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -129,7 +129,7 @@ def test_04_RenameFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE_PATH '/cf/file_rt.dat', TARGET_PATH '/cf/file_rt-rnm.dat'") + cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE_PATH '/ram/fm_test/file_rt.dat', TARGET_PATH '/ram/fm_test/file_rt-rnm.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -137,7 +137,7 @@ def test_04_RenameFile(self): # Cleanup: Delete the file that was created/renamed # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt-rnm.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt-rnm.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -150,7 +150,7 @@ def test_05_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -159,7 +159,7 @@ def test_05_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -174,7 +174,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt1.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt1.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -182,7 +182,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt2.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt2.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -191,7 +191,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/cf/'") + cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/fm_test/'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -223,7 +223,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt1.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt1.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -231,7 +231,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt2.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt2.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -240,7 +240,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE_PATH1 '/cf/file_rt1.dat', SOURCE_PATH2 '/cf/file_rt2.dat', TARGET_PATH '/cf/file_rt3.dat'") + cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE_PATH1 '/ram/fm_test/file_rt1.dat', SOURCE_PATH2 '/ram/fm_test/file_rt2.dat', TARGET_PATH '/ram/fm_test/file_rt3.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -248,13 +248,13 @@ def test_08_ConcatFiles(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt1.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt1.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt2.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt2.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt3.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt3.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -268,7 +268,7 @@ def test_09_GetFileInfo(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -277,7 +277,7 @@ def test_09_GetFileInfo(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '/cf/file_rt.dat', CRC_METHOD CRC_NONE") + cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '/ram/fm_test/file_rt.dat', CRC_METHOD CRC_NONE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -285,7 +285,7 @@ def test_09_GetFileInfo(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -311,7 +311,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the CreateDirectory command - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/cf/new-directory'") + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -319,7 +319,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the DeleteDirectory command - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/cf/new-directory'") + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -391,7 +391,7 @@ def test_16_SetPermissions(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/cf/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -400,7 +400,7 @@ def test_16_SetPermissions(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with PATH '/cf/file_rt.dat', PERMISSIONS 777") + cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with PATH '/ram/fm_test/file_rt.dat', PERMISSIONS 777") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -408,7 +408,7 @@ def test_16_SetPermissions(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/cf/file_rt.dat'") + cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -418,15 +418,10 @@ def test_17_ResetCounters(self): """ # Increment COMMAND_COUNTER and CHILD_COMMAND_COUNTER by sending CreateDirectory command - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/cf/new-directory'") + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_COUNTER > 0", 100) - # Delete the created directory, for cleanup - cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/cf/new-directory'") - wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) - # Cause COMMAND_ERROR_COUNTER and CHILD_COMMAND_ERROR_COUNTER to increment, # by sending a DeleteDirectory command with a non-existant directory. cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/non-existant'") @@ -434,10 +429,21 @@ def test_17_ResetCounters(self): wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_ERROR_COUNTER > 0", 100) # Cause CHILD_COMMAND_WARNING_COUNTER to increment, - # by sending a DirListPkt command with an extremely-long directory/file path. - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with PATH '/ram/path-too-long-path-too-long-path-too-long-path-too-long', OFFSET 0, GET_SIZE_TIME_MODE FALSE") + # by creating a directory within a directory, and then sending a DeleteAllFiles command + # on the outer directory (DeleteAllFiles skips subdirectory, increments count) + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory/subdir'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) + cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/new-directory'") wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_WARNING_COUNTER > 0", 100) + # Delete the created directories, for cleanup + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory/subdir'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + # Send ResetCounters command cmd(f"<%= target_name %> FM_CMD_RESET_COUNTERS") @@ -455,6 +461,9 @@ def setup(self): - Runs when Group Setup button is pressed - Runs before all scripts when Group Start is pressed """ + # Create test directory to work in + cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/fm_test'") + # Wait for a new housekeeping packet, to ensure we're using its latest status info wait_check_packet(f"<%= target_name %>", "FM_HK", 1, 100) @@ -475,4 +484,6 @@ def teardown(self): - Runs when Group Teardown button is pressed - Runs after all scripts when Group Start is pressed """ + # Cleanup: Delete test directory + cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/fm_test'") pass From 1c5c0dbd4919ac67b98af8175865965ccece6b7d Mon Sep 17 00:00:00 2001 From: Cameron Sykes Date: Thu, 16 Apr 2026 11:50:12 -0400 Subject: [PATCH 31/39] Fix #127, Make SC housekeeping implicit padding explicit --- targets/CFS/cmd_tlm/sc_tlm_def.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/targets/CFS/cmd_tlm/sc_tlm_def.txt b/targets/CFS/cmd_tlm/sc_tlm_def.txt index ea76caa..ed47b61 100644 --- a/targets/CFS/cmd_tlm/sc_tlm_def.txt +++ b/targets/CFS/cmd_tlm/sc_tlm_def.txt @@ -15,7 +15,7 @@ STATE TRUE 1 APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Counts Request Errors" APPEND_ITEM COMMAND_COUNTER 8 UINT "Counts Ground Requests" - APPEND_ITEM PADDING8 8 UINT "" + APPEND_ITEM PADDING1 8 UINT "" APPEND_ITEM SWITCH_PEND_FLAG 16 UINT "Is an ats switch pending? 0 = NO, 1 = YES This means that the ATS switch is waiting until a safe time" STATE NO 0 STATE YES 1 @@ -49,3 +49,4 @@ APPEND_ITEM RTS_W<%=n%>_DIS_STATUS 8 UINT "RTS Disabled Status Word <%=n%> Bit Map" FORMAT_STRING "0x%02X" <% end %> + APPEND_ARRAY_ITEM PADDING2 8 UINT 16 \ No newline at end of file From fe1eeacbc307f2c4014f81d202aeb7cf4645b97d Mon Sep 17 00:00:00 2001 From: Cameron Sykes Date: Thu, 16 Apr 2026 12:07:02 -0400 Subject: [PATCH 32/39] Fix #126, Make AP results breakdown little endian --- targets/CFS/cmd_tlm/lc_tlm_def.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/targets/CFS/cmd_tlm/lc_tlm_def.txt b/targets/CFS/cmd_tlm/lc_tlm_def.txt index 5176f16..8ebb8f9 100644 --- a/targets/CFS/cmd_tlm/lc_tlm_def.txt +++ b/targets/CFS/cmd_tlm/lc_tlm_def.txt @@ -40,25 +40,25 @@ APPEND_ARRAY_ITEM AP_RESULTS 8 UINT 704 "Packed actionpoint results data, 4 bits per actionpoint." # Decompose AP_RESULTS packed data into discrete values <% 2.times do |data_idx| %> - ITEM AP_<%=(data_idx*2)+0%>_STATE <%=0+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+1%>_STATE <%=0+512+(data_idx*8)%> 2 UINT OVERLAP STATE UNUSED 0 STATE ACTIVE 1 STATE PASSIVE 2 STATE DISABLED 3 - ITEM AP_<%=(data_idx*2)+0%>_RESULT <%=2+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+1%>_RESULT <%=2+512+(data_idx*8)%> 2 UINT OVERLAP STATE PASS 0 STATE FAIL 1 STATE ERROR 2 STATE STALE 3 - ITEM AP_<%=(data_idx*2)+1%>_STATE <%=4+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+0%>_STATE <%=4+512+(data_idx*8)%> 2 UINT OVERLAP STATE UNUSED 0 STATE ACTIVE 1 STATE PASSIVE 2 STATE DISABLED 3 - ITEM AP_<%=(data_idx*2)+1%>_RESULT <%=6+512+(data_idx*8)%> 2 UINT + ITEM AP_<%=(data_idx*2)+0%>_RESULT <%=6+512+(data_idx*8)%> 2 UINT OVERLAP STATE PASS 0 STATE FAIL 1 From 33704336b5d5439ebf4bfeb68c174e9e5190b038 Mon Sep 17 00:00:00 2001 From: Justin Figueroa Date: Fri, 24 Apr 2026 18:42:05 -0400 Subject: [PATCH 33/39] Fix cFS/cFS#679, Removes double offset and uncomments regression test --- targets/CFS/lib/cfs_cmd_tlm_list.rb | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/targets/CFS/lib/cfs_cmd_tlm_list.rb b/targets/CFS/lib/cfs_cmd_tlm_list.rb index 8a0cdc0..7a7bea8 100644 --- a/targets/CFS/lib/cfs_cmd_tlm_list.rb +++ b/targets/CFS/lib/cfs_cmd_tlm_list.rb @@ -835,14 +835,13 @@ def get_cfs_msg_id_from_base(stream_id_base, cpu_num) # The cpu num is a 3-bit field, so the max value is b'111' (7) cpu_num_min = 0 cpu_num_max = $cfs_total_valid_cpus - 1 - num_cpu = cpu_num - 1 # Set the CPU Number bit field - if ((num_cpu >= cpu_num_min) && (num_cpu <= cpu_num_max)) + if ((cpu_num >= cpu_num_min) && (cpu_num <= cpu_num_max)) stream_id = stream_id_base stream_id = stream_id & 0xF8FF # clear the 3-bit cpu-num field - stream_id = stream_id | (num_cpu << 8) + stream_id = stream_id | (cpu_num << 8) else - # On num_cpu range error, return the base by default + # On cpu_num range error, return the base by default stream_id = stream_id_base end return stream_id @@ -851,8 +850,8 @@ def get_cfs_msg_id_from_base(stream_id_base, cpu_num) #------------------------------------------------------------------------------ # Embedded Ruby Utility to output a Message ID based on the following: -# 1. msg_id_name -# - must be a key from the $CFS_CMD_TLM_LIST hash, above +# 1. pkt_name +# - must be a packet name found in a $CFS_CMD_TLM_LIST entry's packet_names array # 2. cpu_num # - must be '1' or '2' #------------------------------------------------------------------------------ @@ -879,9 +878,8 @@ def get_cfs_pkt_msg_id(pkt_name, cpu_num_input) # Tests for definitions in this file #------------------------------------------------------------------------------ def cfs_cmd_tlm_list_test - raise "TEST_FAIL" unless (get_cfs_pkt_msg_id("CFE_TBL_CMD", "1") == "0x1804") - raise "TEST_FAIL" unless (get_cfs_pkt_msg_id("CFE_TBL_CMD", "2") == "0x1904") + raise "TEST_FAIL" unless (get_cfs_pkt_msg_id("CFE_TBL_CMD_NOOP", "1") == "0x1804") + raise "TEST_FAIL" unless (get_cfs_pkt_msg_id("CFE_TBL_CMD_NOOP", "2") == "0x1904") end -# Uncomment to run tests -# cfs_cmd_tlm_list_test() +cfs_cmd_tlm_list_test() From e72dba67e8b65331c05bd8ae80d48b3b9c9c18a7 Mon Sep 17 00:00:00 2001 From: Rodriguez Date: Mon, 27 Apr 2026 17:37:00 -0400 Subject: [PATCH 34/39] Fix cFS/cFS#532, add TA artifacts --- targets/CFS/cmd_tlm/cfe_ta_cmd_def.txt | 18 ++++++++++ targets/CFS/cmd_tlm/cfe_ta_tlm_def.txt | 39 ++++++++++++++++++++ targets/CFS/lib/cfs_cmd_tlm_list.rb | 22 ++++++++++++ targets/CFS/lib/cfs_packet_headers.rb | 22 ++++++++++++ targets/CFS/lib/ta_file_tlm_load.rb | 36 +++++++++++++++++++ targets/CFS/screens/cfe_ta_file_screen.txt | 41 ++++++++++++++++++++++ 6 files changed, 178 insertions(+) create mode 100644 targets/CFS/cmd_tlm/cfe_ta_cmd_def.txt create mode 100644 targets/CFS/cmd_tlm/cfe_ta_tlm_def.txt create mode 100644 targets/CFS/lib/ta_file_tlm_load.rb create mode 100644 targets/CFS/screens/cfe_ta_file_screen.txt diff --git a/targets/CFS/cmd_tlm/cfe_ta_cmd_def.txt b/targets/CFS/cmd_tlm/cfe_ta_cmd_def.txt new file mode 100644 index 0000000..1411b8c --- /dev/null +++ b/targets/CFS/cmd_tlm/cfe_ta_cmd_def.txt @@ -0,0 +1,18 @@ +<%= cfs_cmd_hdr(target_name, 'TA_SEND_HK_CMD', 0, "TA Housekeeping Request Cmd") %> + +<%= cfs_cmd_hdr(target_name, 'TA_CMD_NOOP', 0, "TA No-Op Command") %> + +<%= cfs_cmd_hdr(target_name, 'TA_CMD_RESET_COUNTERS', 1, "TA Reset Counters Command") %> + +<%= cfs_cmd_hdr(target_name, 'TA_CMD_QUERY_ALL_TASKS', 2, "TA Query All Tasks to File") %> + APPEND_PARAMETER FILENAME 512 STRING "" "Filename (and path) to write task affinity data" + +<%= cfs_cmd_hdr(target_name, 'TA_CMD_SET_TASK_AFFINITY', 3, "TA Set Affinity for a Specific Task") %> + APPEND_PARAMETER TASK_NAME 160 STRING "" "Name of the task to modify" + APPEND_PARAMETER AFFINITY_MASK1 32 UINT 0 0xFFFFFFFF 0 "CPU Core Affinity Mask (Bitfield)" + APPEND_PARAMETER AFFINITY_MASK2 32 UINT 0 0xFFFFFFFF 0 "CPU Core Affinity Mask (Bitfield)" + # Add 32 bits (4 bytes) of padding to match the C-compiler's struct alignment + APPEND_PARAMETER SPARE 32 UINT 0 0 0 "Padding" + +<%= cfs_cmd_hdr(target_name, 'TA_CMD_GET_TASK_AFFINITY', 4, "TA Get Affinity for a Specific Task") %> + APPEND_PARAMETER TASK_NAME 160 STRING "" "Name of the task to query" diff --git a/targets/CFS/cmd_tlm/cfe_ta_tlm_def.txt b/targets/CFS/cmd_tlm/cfe_ta_tlm_def.txt new file mode 100644 index 0000000..d3c6cb8 --- /dev/null +++ b/targets/CFS/cmd_tlm/cfe_ta_tlm_def.txt @@ -0,0 +1,39 @@ +<%= cfs_tlm_hdr(target_name, 'TA_HK', "TA Housekeeping Tlm Packet") %> + APPEND_ITEM COMMAND_COUNTER 8 UINT "Count of valid commands received" + APPEND_ITEM COMMAND_ERROR_COUNTER 8 UINT "Count of invalid commands received" + APPEND_ITEM TA_STARTUP_COUNTER 8 UINT "Count of successful startup affinity configs" + APPEND_ITEM TA_STARTUP_ERROR_COUNTER 8 UINT "Count of invalid startup affinity configs" + +<%= cfs_file_hdr(target_name, 'TA_AFFINITY_FILE', "TA Task Affinity Data File") %> + + # --- File Payload Header --- + APPEND_ITEM CORES_AVAILABLE 16 UINT "Cores Available" + APPEND_ITEM OSAL_CORES_MAX 16 UINT "OSAL cores Configured max" + APPEND_ITEM MAX_AFFINITY_BITS 16 UINT "Max Affinity Bits" + APPEND_ITEM SPARE 16 UINT "Alignment Spare" + + # --- Array of TA_TaskAffinityLog Structures --- + # Note: Replace '64' with whatever numerical value OS_MAX_TASKS actually is in your build +<% 64.times do |i| %> + APPEND_ITEM TASK_NAME_<%= i %> 160 STRING "Task Name" + + APPEND_ITEM TA_TYPE_<%= i %> 32 UINT "Affinity Type" + STATE OS_DEFAULT 0 + STATE MASK 1 + STATE ADDED 2 + + APPEND_ITEM TA_STATUS_<%= i %> 32 UINT "Affinity Status" + STATE UNKNOWN 0 + STATE OK 1 + STATE ERROR 2 + + APPEND_ITEM TA_MASK1_<%= i %> 32 UINT "Affinity Mask 1" + FORMAT_STRING "0x%08X" + APPEND_ITEM TA_MASK2_<%= i %> 32 UINT "Affinity Mask 2" + FORMAT_STRING "0x%08X" + APPEND_ITEM TA_FROM_OS1_<%= i %> 32 UINT "Affinity From OS 1" + FORMAT_STRING "0x%08X" + APPEND_ITEM TA_FROM_OS2_<%= i %> 32 UINT "Affinity From OS 2" + FORMAT_STRING "0x%08X" + APPEND_ITEM SPARE_PAD_<%= i %> 32 UINT "Compiler Padding" + <% end %> diff --git a/targets/CFS/lib/cfs_cmd_tlm_list.rb b/targets/CFS/lib/cfs_cmd_tlm_list.rb index 7a7bea8..8560517 100644 --- a/targets/CFS/lib/cfs_cmd_tlm_list.rb +++ b/targets/CFS/lib/cfs_cmd_tlm_list.rb @@ -490,6 +490,22 @@ def initialize(params) "DS_SEND_HK_CMD", ] ), + "TA_CMD" => FswMsgInfo.new( + base_stream_id: 0x1812, + packet_names: [ + "TA_CMD_NOOP", + "TA_CMD_RESET_COUNTERS", + "TA_CMD_QUERY_ALL_TASKS", + "TA_CMD_SET_TASK_AFFINITY", + "TA_CMD_GET_TASK_AFFINITY", + ] + ), + "TA_SEND_HK_CMD" => FswMsgInfo.new( + base_stream_id: 0x1813, + packet_names: [ + "TA_SEND_HK_CMD", + ] + ), # ------------------------------------------------------------------------- # Telemetry @@ -787,6 +803,12 @@ def initialize(params) packet_names: [ "DS_COMP", ] + ), + "TA_HK" => FswMsgInfo.new( + base_stream_id: 0x080F, + packet_names: [ + "TA_HK", + ] ), } diff --git a/targets/CFS/lib/cfs_packet_headers.rb b/targets/CFS/lib/cfs_packet_headers.rb index 0327cd7..ab72a4c 100755 --- a/targets/CFS/lib/cfs_packet_headers.rb +++ b/targets/CFS/lib/cfs_packet_headers.rb @@ -60,3 +60,25 @@ def cfs_tbl_hdr(cfs_tbl_name, tbl_description, cfs_app_name) tblPacket << "\n" return tblPacket end + +# Output a cFS File Header (Standard 64-byte header) +# Used for parsing cFE formatted files (like diagnostic dumps or logs) +def cfs_file_hdr(target_name, file_pkt_name, file_desc) + filePacket = String.new + # Defines this as a TELEMETRY packet so COSMOS can display it in screens/Data Viewer + filePacket << "TELEMETRY #{target_name} #{file_pkt_name} #{$cfs_globals_endianness} \"#{file_desc}\" \n" + filePacket << " APPEND_ITEM CONTENT_TYPE 32 UINT \"cFE Content Type (usually 0x63464531 for 'cFE1')\" BIG_ENDIAN \n" + filePacket << " FORMAT_STRING \"0x%08X\" \n" + filePacket << " APPEND_ITEM SUB_TYPE 32 UINT \"Type of Content Type\" BIG_ENDIAN \n" + filePacket << " APPEND_ITEM LENGTH 32 UINT \"Length of Primary Header\" BIG_ENDIAN \n" + filePacket << " APPEND_ITEM SPACECRAFT_ID 32 UINT \"Spacecraft that generated the file\" BIG_ENDIAN \n" + filePacket << " APPEND_ITEM PROCESSOR_ID 32 UINT \"Processor that generated the file\" BIG_ENDIAN \n" + filePacket << " APPEND_ITEM APPLICATION_ID 32 UINT \"Application that generated the file\" BIG_ENDIAN \n" + filePacket << " APPEND_ITEM CREATE_TIME_SECONDS 32 UINT \"File creation timestamp (seconds)\" BIG_ENDIAN \n" + filePacket << " APPEND_ITEM CREATE_TIME_SUBSECS 32 UINT \"File creation timestamp (sub-seconds)\" BIG_ENDIAN \n" + filePacket << " APPEND_ITEM DESCRIPTION 256 STRING \"File description\" \n" + # Automatically calculate the Ruby time + filePacket << " ITEM FILE_CREATE_TIME 0 0 DERIVED \"Ruby time based on SECONDS and SUBSECS\" \n" + filePacket << " READ_CONVERSION unix_time_conversion_epoch_offset.rb CREATE_TIME_SECONDS CREATE_TIME_SUBSECS \n" + return filePacket +end diff --git a/targets/CFS/lib/ta_file_tlm_load.rb b/targets/CFS/lib/ta_file_tlm_load.rb new file mode 100644 index 0000000..81cd37f --- /dev/null +++ b/targets/CFS/lib/ta_file_tlm_load.rb @@ -0,0 +1,36 @@ +# 1. Read file and chop off the 64-byte cFE File Header +raw = File.binread(get_target_file('CFS-1/lib/ta_dump.bin').path)[64..-1] + +data = { + 'CORES_AVAILABLE' => raw[0,2].unpack1('v'), + 'OSAL_CORES_MAX' => raw[2,2].unpack1('v'), + 'MAX_AFFINITY_BITS'=> raw[4,2].unpack1('v') +} + +type_map = {0 => 'OS_DEFAULT', 1 => 'MASK', 2 => 'ADDED'} +stat_map = {0 => 'UNKNOWN', 1 => 'OK', 2 => 'ERROR'} + +# 2. Divide by the TRUE struct size (48 bytes) +task_bytes_only = raw.length - 8 +num_tasks_in_file = task_bytes_only / 48 + +puts "Found #{num_tasks_in_file} tasks (48 bytes each) in this dump!" + +# 3. The Magic Fix: Z20 (String) + V6 (6 Ints) + x4 (Skip 4 bytes padding) +raw[8..-1].unpack("Z20V6x4" * num_tasks_in_file).each_slice(7).with_index do |t, i| + break if i >= 64 + + type_str = type_map[t[1]] || 'OS_DEFAULT' + stat_str = stat_map[t[2]] || 'UNKNOWN' + + data.merge!("TASK_NAME_#{i}"=>t[0].strip, + "TA_TYPE_#{i}"=>type_str, + "TA_STATUS_#{i}"=>stat_str, + "TA_MASK1_#{i}"=>t[3].to_i, + "TA_MASK2_#{i}"=>t[4].to_i, + "TA_FROM_OS1_#{i}"=>t[5].to_i, + "TA_FROM_OS2_#{i}"=>t[6].to_i) +end + +# 4. Inject! +inject_tlm('CFS-1', 'TA_AFFINITY_FILE', data) diff --git a/targets/CFS/screens/cfe_ta_file_screen.txt b/targets/CFS/screens/cfe_ta_file_screen.txt new file mode 100644 index 0000000..fbec5f7 --- /dev/null +++ b/targets/CFS/screens/cfe_ta_file_screen.txt @@ -0,0 +1,41 @@ +SCREEN AUTO AUTO 1.0 +<% require 'cfs_target_num_color' %> + +VERTICAL + TITLE "<%= target_name %> TA Task Affinity File Dump" Courier 20 Normal true + SETTING TEXTCOLOR <%= cfs_target_num_color(target_name) %> + + # --- File Info --- + LABEL "=== File Header ===" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE DESCRIPTION "File Desc:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE FILE_CREATE_TIME "Created:" + + LABEL " " # Padding + + # --- Global Config --- + LABEL "=== Global Configuration ===" + HORIZONTAL + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE CORES_AVAILABLE "Cores Available:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE OSAL_CORES_MAX "OSAL cores Configured max:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE MAX_AFFINITY_BITS "Max Affinity Bits:" + END + + LABEL " " # Padding + + # --- Task Array --- + LABEL "=== Task Affinity Log ===" + VERTICAL + # NOTE: Change '64' to match your OS_MAX_TASKS limit + <% 64.times do |i| %> + HORIZONTAL + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE TASK_NAME_<%= i %> "[<%= i %>] Name:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE TA_TYPE_<%= i %> "Type:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE TA_STATUS_<%= i %> "Status:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE TA_MASK1_<%= i %> "Mask1:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE TA_MASK2_<%= i %> "Mask2:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE TA_FROM_OS1_<%= i %> "OS1:" + LABELVALUEDESC <%= target_name %> TA_AFFINITY_FILE TA_FROM_OS2_<%= i %> "OS2:" + END + <% end %> + END +END From a015bf55b1da3a04df8baec8a15e372f1523a085 Mon Sep 17 00:00:00 2001 From: czogby Date: Mon, 27 Apr 2026 20:47:06 -0400 Subject: [PATCH 35/39] Fix 147: Created LC test suite. --- targets/CFS/procedures/cfs_lc_test_suite.py | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 targets/CFS/procedures/cfs_lc_test_suite.py diff --git a/targets/CFS/procedures/cfs_lc_test_suite.py b/targets/CFS/procedures/cfs_lc_test_suite.py new file mode 100644 index 0000000..6c476ad --- /dev/null +++ b/targets/CFS/procedures/cfs_lc_test_suite.py @@ -0,0 +1,48 @@ +from openc3.script.suite import Suite, Group + +load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py") +# FIXME: Later on, divide into the following test groups: +# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_acceptance.py") +# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_functional.py") +# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_error.py") +# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_tables.py") +# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_resets.py") + + +class cfs_lc_test_suite(Suite): + def __init__(self): + # Add each test group + # ------------------------------------------------------------------------ + # The order that we add these test groups affects the order + # they're listed in the COSMOS Script Runner drop-down menu + # To make it easier to find tests using the drop-down, + # these are added in alphabetical order + # ----------------------------------------------------------------------- + self.add_group(cfs_test_group_cfs_lc) + # FIXME: Later on, divide into the following test groups: + # self.add_group(cfs_test_group_cfs_lc_acceptance) + # self.add_group(cfs_test_group_cfs_lc_functional) + # self.add_group(cfs_test_group_cfs_lc_error) + # self.add_group(cfs_test_group_cfs_lc_tables) + # self.add_group(cfs_test_group_cfs_lc_resets) + + + def setup(self): + # Run when Suite Setup button is pressed + # Run before all groups when Suite Start is pressed + Group.print(f"Starting LC Integration Test Suite against the following target:") + Group.print(f"cFS Target Name (target_name): <%= target_name %>") + + # Send the command, TO_LAB_CMD_ENABLE_OUTPUT + to_lab_dest_ip = "<%= global_tlm_output_ip %>" + cmd(f"<%= target_name %> TO_LAB_CMD_ENABLE_OUTPUT with DEST_IP '{to_lab_dest_ip}'") + + Group.print(f"Sent TO_LAB_CMD_ENABLE_OUTPUT command to <%= target_name %> with DEST_IP '{to_lab_dest_ip}'") + + # Wait for one TO packet to be received + wait_check_packet(f"<%= target_name %>", "TO_LAB_HK", 1, 100) + + def teardown(self): + # Run when Suite Teardown button is pressed + # Run after all groups when Suite Start is pressed + pass From c532ee076e991916d1e3191b25252c4227a50b1e Mon Sep 17 00:00:00 2001 From: czogby Date: Tue, 28 Apr 2026 12:29:15 -0400 Subject: [PATCH 36/39] Fix 147: Removed FIXME comments. --- targets/CFS/procedures/cfs_lc_test_suite.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/targets/CFS/procedures/cfs_lc_test_suite.py b/targets/CFS/procedures/cfs_lc_test_suite.py index 6c476ad..7b23f55 100644 --- a/targets/CFS/procedures/cfs_lc_test_suite.py +++ b/targets/CFS/procedures/cfs_lc_test_suite.py @@ -1,12 +1,6 @@ from openc3.script.suite import Suite, Group load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.py") -# FIXME: Later on, divide into the following test groups: -# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_acceptance.py") -# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_functional.py") -# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_error.py") -# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_tables.py") -# load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc_resets.py") class cfs_lc_test_suite(Suite): @@ -19,12 +13,6 @@ def __init__(self): # these are added in alphabetical order # ----------------------------------------------------------------------- self.add_group(cfs_test_group_cfs_lc) - # FIXME: Later on, divide into the following test groups: - # self.add_group(cfs_test_group_cfs_lc_acceptance) - # self.add_group(cfs_test_group_cfs_lc_functional) - # self.add_group(cfs_test_group_cfs_lc_error) - # self.add_group(cfs_test_group_cfs_lc_tables) - # self.add_group(cfs_test_group_cfs_lc_resets) def setup(self): From eb0ffe3f879785343bdfe32f7a22157e56ddab11 Mon Sep 17 00:00:00 2001 From: Cameron Sykes Date: Tue, 28 Apr 2026 14:55:54 -0400 Subject: [PATCH 37/39] Fix #131, Undo Overwrite of MM Command Arguments Squashed commit of the following: commit bf5779f46107b73152319029d1aeb8372fa96c69 Author: Cameron Sykes Date: Tue Apr 28 14:50:34 2026 -0400 Fix #131, Refactor CF tlm packet def commit dcf3461f915e2380088a16ac5249776c8eef4a51 Author: Cameron Sykes Date: Tue Apr 28 10:05:39 2026 -0400 Fix #131, Undo Overwrite of MM Command Arguments Squashed commit of the following: commit 83049f87f2268487e6addea5440049a462aa3b04 Author: Cameron Sykes Date: Tue Apr 28 10:05:01 2026 -0400 Fix #131, Switch padding to array commit b3735b44c5906a7f2865dfc5179d3d6b324fb61f Merge: 9b53f17 79bb349 Author: Cameron Sykes Date: Tue Apr 28 10:04:40 2026 -0400 Merge branch 'fix-131-undo-mm-cmd-def-overwrite' of developer.nasa.gov:cFS/cfs-cosmos-plugin into fix-131-undo-mm-cmd-def-overwrite commit 9b53f176bed6fc773fb2bcd96ebc9faaf4dace34 Merge: 1cd731c 241bd99 Author: Cameron Sykes Date: Tue Apr 28 10:03:58 2026 -0400 Merge branch 'dev' of developer.nasa.gov:cFS/cfs-cosmos-plugin into fix-131-undo-mm-cmd-def-overwrite commit 79bb3490d7803e51a28809da4b1c5450f73ec74d Author: Molock, Dwaine S 550328410 Date: Mon Apr 27 16:22:25 2026 -0400 Fix #131, Update MM Command and Screen definitions commit 1cd731c29176dea4edc344f97baef942b36e5345 Author: Cameron Sykes Date: Mon Apr 20 16:39:22 2026 -0400 Fix #131, add correct size for MM_MemType_Enum_t --- targets/CFS/cmd_tlm/mm_cmd_def.txt | 84 ++++++++++++++++-------- targets/CFS/screens/mm_hk_tlm_screen.txt | 12 ++-- 2 files changed, 63 insertions(+), 33 deletions(-) diff --git a/targets/CFS/cmd_tlm/mm_cmd_def.txt b/targets/CFS/cmd_tlm/mm_cmd_def.txt index f3c6050..1208b87 100644 --- a/targets/CFS/cmd_tlm/mm_cmd_def.txt +++ b/targets/CFS/cmd_tlm/mm_cmd_def.txt @@ -5,76 +5,106 @@ <%= cfs_cmd_hdr(target_name, 'MM_CMD_RESET_COUNTERS', 1, "Telecommand Message") %> <%= cfs_cmd_hdr(target_name, 'MM_CMD_PEEK', 2, "Telecommand Message") %> - APPEND_PARAMETER DATA_SIZE 32 UINT MIN MAX 0 "Size of the data to be read" - APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory type to peek data from" + APPEND_PARAMETER DATA_SIZE 32 UINT MIN MAX 0 "Size of the data to be read" + APPEND_PARAMETER MEM_TYPE 8 UINT MIN MAX 0 "Memory type to peek data from" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 - APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic source peek address" - APPEND_PARAMETER SRC_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic source peek address" + + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Padding for alignment" +<% if $cfs_globals_mem_addr_size == 64 %> + APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic source peek address" +<% else %> + APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 32 UINT MIN MAX 0 "Symbolic source peek address" +<% end %> + APPEND_PARAMETER SRC_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic source peek address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_POKE', 3, "Telecommand Message") %> - APPEND_PARAMETER DATA_SIZE 32 UINT MIN MAX 0 "Size of the data to be written" - APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory type to poke data to" + APPEND_PARAMETER DATA_SIZE 32 UINT MIN MAX 0 "Size of the data to be written" + APPEND_PARAMETER MEM_TYPE 8 UINT MIN MAX 0 "Memory type to poke data to" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 - APPEND_PARAMETER DATA 32 UINT MIN MAX 0 "Data to be written" - APPEND_ARRAY_PARAMETER PADDING 8 UINT 32 "Structure padding" - APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic destination poke address" - APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic destination poke address" + APPEND_ARRAY_PARAMETER PADDING1 8 UINT 24 "Padding for alignment" + APPEND_PARAMETER DATA 32 UINT MIN MAX 0 "Data to be written" + APPEND_ARRAY_PARAMETER PADDING2 8 UINT 32 "Padding for alignment" +<% if $cfs_globals_mem_addr_size == 64 %> + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic destination poke address" +<% else %> + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 32 UINT MIN MAX 0 "Symbolic destination poke address" +<% end %> + APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic destination poke address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_LOAD_MEM_WID', 4, "Telecommand Message") %> - APPEND_PARAMETER NUM_OF_BYTES 8 UINT MIN MAX 0 "Number of bytes to be loaded" - APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Structure padding" - APPEND_PARAMETER CRC 32 UINT MIN MAX 0 "Data check value" - APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic destination load address" - APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic destination load address" - APPEND_ARRAY_PARAMETER DATA_ARRAY 8 UINT 1600 "Data to be loaded" + APPEND_PARAMETER NUM_OF_BYTES 8 UINT MIN MAX 0 "Number of bytes to be loaded" + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Padding for alignment" + APPEND_PARAMETER CRC 32 UINT MIN MAX 0 "Data check value" +<% if $cfs_globals_mem_addr_size == 64 %> + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic destination load address" +<% else %> + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 32 UINT MIN MAX 0 "Symbolic destination load address" +<% end %> + APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic destination load address" + APPEND_ARRAY_PARAMETER DATA_ARRAY 8 UINT 1600 "Data to be loaded" <%= cfs_cmd_hdr(target_name, 'MM_CMD_LOAD_MEM_FROM_FILE', 5, "Telecommand Message") %> - APPEND_PARAMETER FILENAME 512 STRING "" "Name of memory load file" + APPEND_PARAMETER FILENAME 512 STRING "" "Name of memory load file" <%= cfs_cmd_hdr(target_name, 'MM_CMD_DUMP_MEM_TO_FILE', 6, "Telecommand Message") %> - APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory dump type" + APPEND_PARAMETER MEM_TYPE 8 UINT MIN MAX 0 "Memory dump type" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 + APPEND_ARRAY_PARAMETER PADDING1 8 UINT 24 "Padding for alignment" APPEND_PARAMETER NUM_OF_BYTES 32 UINT MIN MAX 0 "Number of bytes to be dumped" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbol plus optional offset" +<% else %> + APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 32 UINT MIN MAX 0 "Symbol plus optional offset" +<% end %> APPEND_PARAMETER SRC_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbol plus optional offset" APPEND_PARAMETER FILENAME 512 STRING "" "Name of memory dump file" <%= cfs_cmd_hdr(target_name, 'MM_CMD_DUMP_IN_EVENT', 7, "Telecommand Message") %> - APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory dump type" + APPEND_PARAMETER MEM_TYPE 8 UINT MIN MAX 0 "Memory dump type" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 + APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Padding for alignment" APPEND_PARAMETER NUM_OF_BYTES 8 UINT MIN MAX 0 "Number of bytes to be dumped" - APPEND_ARRAY_PARAMETER PADDING 8 UINT 24 "Structure padding" + APPEND_ARRAY_PARAMETER PADDING1 8 UINT 24 "Padding for alignment" +<% if $cfs_globals_mem_addr_size == 64 %> APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbolic source address" +<% else %> + APPEND_PARAMETER SRC_SYM_ADDRESS_OFFSET 32 UINT MIN MAX 0 "Symbolic source address" +<% end %> APPEND_PARAMETER SRC_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbolic source address" <%= cfs_cmd_hdr(target_name, 'MM_CMD_FILL_MEM', 8, "Telecommand Message") %> - APPEND_PARAMETER MEM_TYPE 32 UINT MIN MAX 0 "Memory type" + APPEND_PARAMETER MEM_TYPE 8 UINT MIN MAX 0 "Memory type" STATE RAM 1 STATE EEPROM 2 STATE MEM8 3 STATE MEM16 4 STATE MEM32 5 - APPEND_PARAMETER NUM_OF_BYTES 32 UINT MIN MAX 0 "Number of bytes to fill" - APPEND_PARAMETER FILL_PATTERN 32 UINT MIN MAX 0 "Fill pattern to use" - APPEND_ARRAY_PARAMETER PADDING 8 UINT 32 "Structure padding" - APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbol plus optional offset" - APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbol plus optional offset" + APPEND_ARRAY_PARAMETER PADDING1 8 UINT 24 "Padding for alignment" + APPEND_PARAMETER NUM_OF_BYTES 32 UINT MIN MAX 0 "Number of bytes to fill" + APPEND_PARAMETER FILL_PATTERN 32 UINT MIN MAX 0 "Fill pattern to use" + APPEND_PARAMETER PADDING 32 UINT MIN MAX 0 "Padding for alignment" +<% if $cfs_globals_mem_addr_size == 64 %> + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 64 UINT MIN MAX 0 "Symbol plus optional offset" +<% else %> + APPEND_PARAMETER DEST_SYM_ADDRESS_OFFSET 32 UINT MIN MAX 0 "Symbol plus optional offset" +<% end %> + APPEND_PARAMETER DEST_SYM_ADDRESS_SYMNAME 512 STRING "" "Symbol plus optional offset" <%= cfs_cmd_hdr(target_name, 'MM_CMD_LOOKUP_SYM', 9, "Telecommand Message") %> APPEND_PARAMETER SYMNAME 512 STRING "" "Symbol name string" @@ -86,4 +116,4 @@ APPEND_PARAMETER BANK 32 UINT MIN MAX 0 "EEPROM bank number to write-enable" <%= cfs_cmd_hdr(target_name, 'MM_CMD_EEPROM_WRITE_DIS', 12, "Telecommand Message") %> - APPEND_PARAMETER BANK 32 UINT MIN MAX 0 "EEPROM bank number to write-disable" \ No newline at end of file + APPEND_PARAMETER BANK 32 UINT MIN MAX 0 "EEPROM bank number to write-disable" diff --git a/targets/CFS/screens/mm_hk_tlm_screen.txt b/targets/CFS/screens/mm_hk_tlm_screen.txt index 445854e..ec8cea8 100644 --- a/targets/CFS/screens/mm_hk_tlm_screen.txt +++ b/targets/CFS/screens/mm_hk_tlm_screen.txt @@ -7,12 +7,12 @@ VERTICAL LABELVALUEDESC <%= target_name %> MM_HK COMMAND_COUNTER "Command Count:" LABELVALUEDESC <%= target_name %> MM_HK COMMAND_ERROR_COUNTER "Command Error Count:" - LABELVALUEDESC <%= target_name %> MM_HK Lastaction "Last Command Action:" - LABELVALUEDESC <%= target_name %> MM_HK Memtype "Last Command Memory Type:" - LABELVALUEDESC <%= target_name %> MM_HK Address "Last Command Address:" - LABELVALUEDESC <%= target_name %> MM_HK Datavalue "Last Command Data:" - LABELVALUEDESC <%= target_name %> MM_HK Bytesprocessed "Last Command Bytes Processed:" - LABELVALUEDESC <%= target_name %> MM_HK Filename "Last Command File Name:" + LABELVALUEDESC <%= target_name %> MM_HK LAST_ACTION "Last Command Action:" + LABELVALUEDESC <%= target_name %> MM_HK MEM_TYPE "Last Command Memory Type:" + LABELVALUEDESC <%= target_name %> MM_HK ADDRESS "Last Command Address:" + LABELVALUEDESC <%= target_name %> MM_HK DATA_VALUE "Last Command Data:" + LABELVALUEDESC <%= target_name %> MM_HK BYTES_PROCESSED "Last Command Bytes Processed:" + LABELVALUEDESC <%= target_name %> MM_HK FILE_NAME "Last Command File Name:" END HORIZONTAL From bb686986c23274f87831b6fe3b34952582874a9f Mon Sep 17 00:00:00 2001 From: czogby Date: Wed, 29 Apr 2026 18:32:59 -0400 Subject: [PATCH 38/39] Fix #154: Added target identifiers to filenames. --- .../cfs_fm.py | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index 951b8aa..1e8690a 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -40,7 +40,7 @@ def test_01_NoOp(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_NOOP") + cmd(f"<%= target_name %> FM_CMD_NOOP") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -56,7 +56,7 @@ def test_02_CopyFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -65,7 +65,7 @@ def test_02_CopyFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/file_rt.dat', TARGET_PATH '/ram/fm_test/file_rt-cp.dat'") + cmd(f"<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt-cp_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -73,10 +73,10 @@ def test_02_CopyFile(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt-cp.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt-cp_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -90,7 +90,7 @@ def test_03_MoveFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -99,7 +99,7 @@ def test_03_MoveFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/file_rt.dat', TARGET_PATH '/ram/fm_test/file_rt-mv.dat'") + cmd(f"<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt-mv_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -107,7 +107,7 @@ def test_03_MoveFile(self): # Cleanup: Delete the file that was created/moved # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt-mv.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt-mv_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -120,7 +120,7 @@ def test_04_RenameFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -129,7 +129,7 @@ def test_04_RenameFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_RENAME_FILE with SOURCE_PATH '/ram/fm_test/file_rt.dat', TARGET_PATH '/ram/fm_test/file_rt-rnm.dat'") + cmd(f"<%= target_name %> FM_CMD_RENAME_FILE with SOURCE_PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt-rnm_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -137,7 +137,7 @@ def test_04_RenameFile(self): # Cleanup: Delete the file that was created/renamed # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt-rnm.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt-rnm_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -150,7 +150,7 @@ def test_05_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -159,7 +159,7 @@ def test_05_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -174,7 +174,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt1.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -182,7 +182,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt2.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -191,7 +191,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/fm_test/'") + cmd(f"<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/fm_test/'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -207,7 +207,7 @@ def test_07_DecompressFile(self): # cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # # Send the command under test - # cmd("<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE_PATH 'source.txt', TARGET_PATH 'target.txt'") + # cmd(f"<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE_PATH 'source.txt', TARGET_PATH 'target.txt'") # # Verify command count incremented # wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -223,7 +223,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt1.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -231,7 +231,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt2.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -240,7 +240,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE_PATH1 '/ram/fm_test/file_rt1.dat', SOURCE_PATH2 '/ram/fm_test/file_rt2.dat', TARGET_PATH '/ram/fm_test/file_rt3.dat'") + cmd(f"<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE_PATH1 '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat', SOURCE_PATH2 '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt3_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -248,13 +248,13 @@ def test_08_ConcatFiles(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt1.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt2.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt3.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt3_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -268,7 +268,7 @@ def test_09_GetFileInfo(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -277,7 +277,7 @@ def test_09_GetFileInfo(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '/ram/fm_test/file_rt.dat', CRC_METHOD CRC_NONE") + cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', CRC_METHOD CRC_NONE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -285,7 +285,7 @@ def test_09_GetFileInfo(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -297,7 +297,7 @@ def test_10_GetOpenFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_OPEN_FILES") + cmd(f"<%= target_name %> FM_CMD_GET_OPEN_FILES") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -311,7 +311,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the CreateDirectory command - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -319,7 +319,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the DeleteDirectory command - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -333,7 +333,7 @@ def test_12_GetDirListFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY_PATH '/cf/', OUTPUT_FILE_PATH 'dirlist.txt', GET_SIZE_TIME_MODE FALSE") + cmd(f"<%= target_name %> FM_CMD_GET_DIR_LIST_FILE with DIRECTORY_PATH '/cf/', OUTPUT_FILE_PATH 'dirlist.txt', GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -347,7 +347,7 @@ def test_13_GetDirListPkt(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with PATH '/cf/', OFFSET 0, GET_SIZE_TIME_MODE FALSE") + cmd(f"<%= target_name %> FM_CMD_GET_DIR_LIST_PKT with PATH '/cf/', OFFSET 0, GET_SIZE_TIME_MODE FALSE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -361,7 +361,7 @@ def test_14_MonitorFilesystemSpace(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_MONITOR_FILESYSTEM_SPACE") + cmd(f"<%= target_name %> FM_CMD_MONITOR_FILESYSTEM_SPACE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -375,7 +375,7 @@ def test_15_SetTableState(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_SET_TABLE_STATE with INDEX 0, STATE DISABLED") + cmd(f"<%= target_name %> FM_CMD_SET_TABLE_STATE with INDEX 0, STATE DISABLED") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -391,7 +391,7 @@ def test_16_SetPermissions(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -400,7 +400,7 @@ def test_16_SetPermissions(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd("<%= target_name %> FM_CMD_SET_PERMISSIONS with PATH '/ram/fm_test/file_rt.dat', PERMISSIONS 777") + cmd(f"<%= target_name %> FM_CMD_SET_PERMISSIONS with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', PERMISSIONS 777") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -408,7 +408,7 @@ def test_16_SetPermissions(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/file_rt.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -418,30 +418,30 @@ def test_17_ResetCounters(self): """ # Increment COMMAND_COUNTER and CHILD_COMMAND_COUNTER by sending CreateDirectory command - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_COUNTER > 0", 100) # Cause COMMAND_ERROR_COUNTER and CHILD_COMMAND_ERROR_COUNTER to increment, # by sending a DeleteDirectory command with a non-existant directory. - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/non-existant'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/non-existant'") wait_check(f"<%= target_name %> FM_HK COMMAND_ERROR_COUNTER > 0", 100) wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_ERROR_COUNTER > 0", 100) # Cause CHILD_COMMAND_WARNING_COUNTER to increment, # by creating a directory within a directory, and then sending a DeleteAllFiles command # on the outer directory (DeleteAllFiles skips subdirectory, increments count) - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory/subdir'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory/subdir'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) - cmd("<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/new-directory'") wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_WARNING_COUNTER > 0", 100) # Delete the created directories, for cleanup cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory/subdir'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory/subdir'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Send ResetCounters command @@ -462,18 +462,18 @@ def setup(self): - Runs before all scripts when Group Start is pressed """ # Create test directory to work in - cmd("<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/fm_test'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/fm_test'") # Wait for a new housekeeping packet, to ensure we're using its latest status info wait_check_packet(f"<%= target_name %>", "FM_HK", 1, 100) # Ensure that FM events are enabled - cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_APP_EVENTS with APP_NAME 'FM'") + cmd(f"<%= target_name %> CFE_EVS_CMD_ENABLE_APP_EVENTS with APP_NAME 'FM'") wait(1) # Ensure that DEBUG and INFO events are enabled - cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK DEBUG") - cmd("<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK INFO") + cmd(f"<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK DEBUG") + cmd(f"<%= target_name %> CFE_EVS_CMD_ENABLE_EVENT_TYPE with BIT_MASK INFO") wait(1) pass @@ -485,5 +485,5 @@ def teardown(self): - Runs after all scripts when Group Start is pressed """ # Cleanup: Delete test directory - cmd("<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/fm_test'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/fm_test'") pass From 36b36dcd68a2c464d6155499bc1d680ab12a45cf Mon Sep 17 00:00:00 2001 From: czogby Date: Thu, 30 Apr 2026 14:55:58 -0400 Subject: [PATCH 39/39] Fix #154: Fixes based on review comments. --- .../cfs_fm.py | 77 ++++++++++--------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py index 1e8690a..9add610 100644 --- a/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py +++ b/targets/CFS/procedures/cfs_test_groups_for_cfs_open_src/cfs_fm.py @@ -6,6 +6,9 @@ class cfs_test_group_cfs_fm(Group): """ - Methods beginning with script_ or test_ are added to Script dropdown """ + + test_dir = f"/ram/fm_test_{"<%= target_name %>".replace(" ", "_")}" + test_file = f"{test_dir}/rt" def test_00_Aliveness(self): """ @@ -56,7 +59,7 @@ def test_02_CopyFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -65,7 +68,7 @@ def test_02_CopyFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt-cp_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_COPY_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '{self.test_file}.dat', TARGET_PATH '{self.test_file}-cp.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -73,10 +76,10 @@ def test_02_CopyFile(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt-cp_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}-cp.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -90,7 +93,7 @@ def test_03_MoveFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -99,7 +102,7 @@ def test_03_MoveFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt-mv_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_MOVE_FILE with OVERWRITE OVERWRITE, SOURCE_PATH '{self.test_file}.dat', TARGET_PATH '{self.test_file}-mv.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -107,7 +110,7 @@ def test_03_MoveFile(self): # Cleanup: Delete the file that was created/moved # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt-mv_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}-mv.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -120,7 +123,7 @@ def test_04_RenameFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -129,7 +132,7 @@ def test_04_RenameFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_RENAME_FILE with SOURCE_PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt-rnm_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_RENAME_FILE with SOURCE_PATH '{self.test_file}.dat', TARGET_PATH '{self.test_file}-rnm.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -137,7 +140,7 @@ def test_04_RenameFile(self): # Cleanup: Delete the file that was created/renamed # ############################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt-rnm_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}-rnm.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -150,7 +153,7 @@ def test_05_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -159,7 +162,7 @@ def test_05_DeleteFile(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -174,7 +177,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}1.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -182,7 +185,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}2.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -191,7 +194,7 @@ def test_06_DeleteAllFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/fm_test/'") + cmd(f"<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '{self.test_dir}'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -207,7 +210,7 @@ def test_07_DecompressFile(self): # cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # # Send the command under test - # cmd(f"<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE_PATH 'source.txt', TARGET_PATH 'target.txt'") + # cmd(f"<%= target_name %> FM_CMD_DECOMPRESS_FILE with SOURCE_PATH 'FIXME', TARGET_PATH 'FIXME'") # # Verify command count incremented # wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -223,7 +226,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}1.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -231,7 +234,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}2.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -240,7 +243,7 @@ def test_08_ConcatFiles(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE_PATH1 '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat', SOURCE_PATH2 '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat', TARGET_PATH '/ram/fm_test/rt3_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_CONCAT_FILES with SOURCE_PATH1 '{self.test_file}1.dat', SOURCE_PATH2 '{self.test_file}2.dat', TARGET_PATH '{self.test_file}3.dat'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -248,13 +251,13 @@ def test_08_ConcatFiles(self): # Cleanup: Delete the files that were created # ############################################ cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt1_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}1.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt2_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}2.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt3_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}3.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -268,7 +271,7 @@ def test_09_GetFileInfo(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -277,7 +280,7 @@ def test_09_GetFileInfo(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', CRC_METHOD CRC_NONE") + cmd(f"<%= target_name %> FM_CMD_GET_FILE_INFO with PATH '{self.test_file}.dat', CRC_METHOD CRC_NONE") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -285,7 +288,7 @@ def test_09_GetFileInfo(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -311,7 +314,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the CreateDirectory command - cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '{self.test_dir}-new'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -319,7 +322,7 @@ def test_11_CreateAndDeleteDirectory(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the DeleteDirectory command - cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '{self.test_dir}-new'") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -391,7 +394,7 @@ def test_16_SetPermissions(self): cmd_count = tlm(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER") # Send CFE_SB_CMD_WRITE_ROUTING_INFO command - cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> CFE_SB_CMD_WRITE_ROUTING_INFO with FILENAME '{self.test_file}.dat'") # Verify the command was successful wait_check(f"<%= target_name %> CFE_SB_HK COMMAND_COUNTER == {cmd_count + 1}", 100) @@ -400,7 +403,7 @@ def test_16_SetPermissions(self): cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") # Send the command under test - cmd(f"<%= target_name %> FM_CMD_SET_PERMISSIONS with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat', PERMISSIONS 777") + cmd(f"<%= target_name %> FM_CMD_SET_PERMISSIONS with PATH '{self.test_file}.dat', PERMISSIONS 777") # Verify command count incremented wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -408,7 +411,7 @@ def test_16_SetPermissions(self): # Cleanup: Delete the file that was created # ######################################### cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '/ram/fm_test/rt_{"<%= target_name %>".replace(" ", "_")}.dat'") + cmd(f"<%= target_name %> FM_CMD_DELETE_FILE with PATH '{self.test_file}.dat'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) @@ -418,7 +421,7 @@ def test_17_ResetCounters(self): """ # Increment COMMAND_COUNTER and CHILD_COMMAND_COUNTER by sending CreateDirectory command - cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '{self.test_dir}-new'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_COUNTER > 0", 100) @@ -431,17 +434,17 @@ def test_17_ResetCounters(self): # Cause CHILD_COMMAND_WARNING_COUNTER to increment, # by creating a directory within a directory, and then sending a DeleteAllFiles command # on the outer directory (DeleteAllFiles skips subdirectory, increments count) - cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/new-directory/subdir'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '{self.test_dir}-new/subdir'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER > 0", 100) - cmd(f"<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_DELETE_ALL_FILES with PATH '{self.test_dir}-new'") wait_check(f"<%= target_name %> FM_HK CHILD_COMMAND_WARNING_COUNTER > 0", 100) # Delete the created directories, for cleanup cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory/subdir'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '{self.test_dir}-new/subdir'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") - cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/new-directory'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '{self.test_dir}-new'") wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) # Send ResetCounters command @@ -462,7 +465,7 @@ def setup(self): - Runs before all scripts when Group Start is pressed """ # Create test directory to work in - cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '/ram/fm_test'") + cmd(f"<%= target_name %> FM_CMD_CREATE_DIRECTORY with PATH '{self.test_dir}'") # Wait for a new housekeeping packet, to ensure we're using its latest status info wait_check_packet(f"<%= target_name %>", "FM_HK", 1, 100) @@ -485,5 +488,5 @@ def teardown(self): - Runs after all scripts when Group Start is pressed """ # Cleanup: Delete test directory - cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '/ram/fm_test'") + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '{self.test_dir}'") pass