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 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 6082f71..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,10 +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" -<% 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 %> + 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 757fc02..d7d14d9 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 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" @@ -42,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_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/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 5529074..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,6 +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 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" @@ -53,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 @@ -73,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_1 8 UINT "Spare byte to maintain byte alignment" - APPEND_ITEM BYTE_ALIGN_2 16 UINT "Spare bytes to maintain 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/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/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 e2ee8ec..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" @@ -32,6 +31,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" @@ -41,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 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" - 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_CLOSE_ALL', 17, "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_REMOVE_MID', 18, "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/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 f9ad32c..15570ed 100644 --- a/targets/CFS/cmd_tlm/lc_cmd_def.txt +++ b/targets/CFS/cmd_tlm/lc_cmd_def.txt @@ -1,11 +1,11 @@ -<%= 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") %> <%= 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..8ebb8f9 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_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 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/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 a18bb6a..1208b87 100644 --- a/targets/CFS/cmd_tlm/mm_cmd_def.txt +++ b/targets/CFS/cmd_tlm/mm_cmd_def.txt @@ -1,90 +1,119 @@ -<%= 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 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" - 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_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbolic source peek address" - 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 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 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 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" - 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_PARAMETER Padding 64 UINT 0 0 0 "Structure padding" - APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbolic destination poke address" - 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 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 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 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" - APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbolic destination load address" - 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 "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 Memtype 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 Numofbytes 32 UINT MIN MAX 0 "Number of bytes to be dumped" - APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbol plus optional offset" - APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbol plus optional offset" - APPEND_PARAMETER Filename 512 STRING "" "Name of memory dump file" + 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 Memtype 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 Numofbytes 8 UINT MIN MAX 0 "Number of bytes to be dumped" - APPEND_ARRAY_PARAMETER Padding 8 UINT 24 "Structure padding" - APPEND_PARAMETER SrcsymaddressOffset 64 UINT MIN MAX 0 "Symbolic source address" - APPEND_PARAMETER SrcsymaddressSymname 512 STRING "" "Symbolic source address" + 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 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 Memtype 32 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_PARAMETER Fillpattern 32 UINT MIN MAX 0 "Fill pattern to use" - APPEND_PARAMETER Padding 32 UINT MIN MAX 0 "Structure padding" - APPEND_PARAMETER DestsymaddressOffset 64 UINT MIN MAX 0 "Symbol plus optional offset" - APPEND_PARAMETER DestsymaddressSymname 512 STRING "" "Symbol plus optional offset" + 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_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_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" diff --git a/targets/CFS/cmd_tlm/mm_tlm_def.txt b/targets/CFS/cmd_tlm/mm_tlm_def.txt index d14ff9f..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,10 +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" + 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" + 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 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 DATA_VALUE 32 UINT "Last command data (fill pattern or peek/poke value)" + FORMAT_STRING "0x%08X" + 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..ed47b61 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 @@ -15,12 +15,12 @@ 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 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" @@ -42,10 +42,11 @@ 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 %> + APPEND_ARRAY_ITEM PADDING2 8 UINT 16 \ No newline at end of file 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 5dfd31a..29103c3 100644 --- a/targets/CFS/cmd_tlm/to_lab_tlm_def.txt +++ b/targets/CFS/cmd_tlm/to_lab_tlm_def.txt @@ -1,6 +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" -<% if $cfs_globals_eds_enabled == false %> - APPEND_ITEM SPARE_TO_ALIGN 16 UINT "Spare padding for alignment" -<% end %> + +<%= 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 3e0e9d4..8560517 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", ] @@ -391,7 +393,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", @@ -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,11 +485,27 @@ 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", ] ), + "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 @@ -503,6 +522,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 +606,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 +690,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 +738,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( @@ -772,6 +803,12 @@ def initialize(params) packet_names: [ "DS_COMP", ] + ), + "TA_HK" => FswMsgInfo.new( + base_stream_id: 0x080F, + packet_names: [ + "TA_HK", + ] ), } @@ -835,8 +872,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' #------------------------------------------------------------------------------ @@ -852,8 +889,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 @@ -863,9 +900,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() 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 diff --git a/targets/CFS/lib/cfs_packet_headers.rb b/targets/CFS/lib/cfs_packet_headers.rb index 7dbda88..ab72a4c 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 @@ -62,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/procedures/cfs_lc_test_suite.py b/targets/CFS/procedures/cfs_lc_test_suite.py new file mode 100644 index 0000000..7b23f55 --- /dev/null +++ b/targets/CFS/procedures/cfs_lc_test_suite.py @@ -0,0 +1,36 @@ +from openc3.script.suite import Suite, Group + +load_utility("<%= target_name %>/procedures/cfs_test_groups_for_cfs_open_src/cfs_lc.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) + + + 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 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_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_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_lab_apps/cfs_to_lab.py b/targets/CFS/procedures/cfs_test_groups_for_cfs_lab_apps/cfs_to_lab.py index 60a1c31..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 @@ -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.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): 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 1b3ccf0..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 @@ -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,681 @@ 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(f"Testing {app_name} aliveness on <%= target_name %>") + + 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 %>", f"{app_name}_HK", 1, 100) + 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(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER") + cmd_count = tlm(f"<%= target_name %> CS_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 %> 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 %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> CS_CMD_RESET_COUNTERS") + wait_check(f"<%= 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) + + + def test_02_OneShot(self): + """ + Test the OneShot command. + """ + + 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") + + # 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 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): + """ + Test the CancelOneShot command. + """ + + 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 + 2}", 100) + + + 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 CHECKSUM_STATE == '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 CHECKSUM_STATE == '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 CFE_CORE_CS_STATE == '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 CFE_CORE_CS_STATE == '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 + # RECOMPUTE_IN_PROGRESS does not stay TRUE long enough to show in 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 OS_CS_STATE == '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 OS_CS_STATE == '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 + # RECOMPUTE_IN_PROGRESS does not stay TRUE long enough to show in 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 EEPROM_CS_STATE == '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 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. + # 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("<%= target_name %> CS_CMD_REPORT_BASELINE_EEPROM with ENTRY_ID 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) + + + # 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 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 RECOMPUTE_IN_PROGRESS == '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 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) + + + # 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 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) + + + # 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 MEMORY_CS_STATE == '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 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. + # 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("<%= target_name %> CS_CMD_REPORT_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) + + + # 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 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 RECOMPUTE_IN_PROGRESS == '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 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) + + + # 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 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) + + + # 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) + + + 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 TABLES_CS_STATE == '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_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 TABLES_CS_STATE == 'DISABLED'", 100) + + + def test_28_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 '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 + # 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): + """ + 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_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 'SAMPLE_APP.ExampleTable'") + + # 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 'SAMPLE_APP.ExampleTable'") + + # 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 'SAMPLE_APP.ExampleTable'") + + # 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") + + # 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 APP_CS_STATE == '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") + + # 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 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. + # + # 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 'SAMPLE_APP'") + + # # 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 '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 RECOMPUTE_IN_PROGRESS == '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 '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 APP_CS_STATE == '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 '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 APP_CS_STATE == 'ENABLED'", 100) + + + def test_39_ResetCounters(self): + """ + Test the Reset Counters command. + """ + + # 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 No-Op 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 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 + 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 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 3c233f2..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 @@ -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,314 @@ 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(f"Testing {app_name} aliveness on <%= target_name %>") - + + Group.print("Testing DS 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 %>", "DS_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 %> DS_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 %> 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 %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> DS_CMD_RESET_COUNTERS") + wait_check(f"<%= 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) + + + 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 ENABLED") + + # 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_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_04_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_05_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_06_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_07_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 BY_COUNT") + + # Verify command count incremented + wait_check(f"<%= target_name %> DS_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_08_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_09_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_10_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_11_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_12_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) + + + def test_13_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) + + + def test_14_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_15_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_16_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_17_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_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) + + + def test_19_ResetCounters(self): + """ + Test the ResetCounters command. + """ + + # 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) + + # 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) + + # 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 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 < 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_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) + wait_check(f"<%= target_name %> DS_HK FILTER_TBL_ERR_COUNTER == 0", 100) def setup(self): @@ -39,12 +331,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 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..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 @@ -1,4 +1,5 @@ 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): @@ -6,7 +7,10 @@ class cfs_test_group_cfs_fm(Group): - Methods beginning with script_ or test_ are added to Script dropdown """ - def test_aliveness(self): + test_dir = f"/ram/fm_test_{"<%= target_name %>".replace(" ", "_")}" + test_file = f"{test_dir}/rt" + + def test_00_Aliveness(self): """ FSW Aliveness Test - Send a no-op command @@ -14,23 +18,444 @@ 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(f"Testing {app_name} aliveness on <%= target_name %>") - + + Group.print("Testing FM 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 %>", "FM_HK", 1, 20) # 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 %> FM_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 %> 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 %> {app_name}_CMD_RESET_COUNTERS") - wait_check(f"<%= target_name %> {app_name}_HK COMMAND_COUNTER == 0", 100) + cmd(f"<%= target_name %> FM_CMD_RESET_COUNTERS") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER == 0", 20) + + + def test_01_NoOp(self): + """ + Test the no-op command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + cmd(f"<%= target_name %> FM_CMD_NOOP") + + # Verify command count incremented + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_02_CopyFile(self): + """ + Test the CopyFile command. + """ + + # 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 '{self.test_file}.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(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) + + # 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 '{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 '{self.test_file}-cp.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_03_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 '{self.test_file}.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(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) + + # 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 '{self.test_file}-mv.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_04_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 '{self.test_file}.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(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) + + # 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 '{self.test_file}-rnm.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_05_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 '{self.test_file}.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(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) + + + def test_06_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 '{self.test_file}1.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 '{self.test_file}2.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(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) + + + def test_07_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") + + # # Send the command under test + # 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) + + + def test_08_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 '{self.test_file}1.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 '{self.test_file}2.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(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) + + # 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 '{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 '{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 '{self.test_file}3.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_09_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 '{self.test_file}.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(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) + + # 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 '{self.test_file}.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_10_GetOpenFiles(self): + """ + Test the GetOpenFiles command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + # Send the command under test + 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) + + + def test_11_CreateAndDeleteDirectory(self): + """ + Test the CreateDirectory command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + # Send the CreateDirectory command + 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) + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + # Send the DeleteDirectory command + 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) + + + 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(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) + + + def test_13_GetDirListPkt(self): + """ + Test the GetDirListPkt command. + """ + + cmd_count = tlm(f"<%= target_name %> FM_HK COMMAND_COUNTER") + + # Send the command under test + 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) + + + 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(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) + + + 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(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) + + + def test_16_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 '{self.test_file}.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(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) + + # 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 '{self.test_file}.dat'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + + def test_17_ResetCounters(self): + """ + Test the ResetCounters command. + """ + + # Increment COMMAND_COUNTER and CHILD_COMMAND_COUNTER by sending CreateDirectory command + 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) + + # Cause COMMAND_ERROR_COUNTER and CHILD_COMMAND_ERROR_COUNTER to increment, + # by sending a DeleteDirectory command with a non-existant directory. + 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(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 '{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 '{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 '{self.test_dir}-new'") + wait_check(f"<%= target_name %> FM_HK COMMAND_COUNTER >= {cmd_count + 1}", 100) + + # Send ResetCounters command + cmd(f"<%= target_name %> FM_CMD_RESET_COUNTERS") + + # 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_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): @@ -39,12 +464,29 @@ 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(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) + + # Ensure that FM events are enabled + 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(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 + def teardown(self): """ Test Group Setup - Runs when Group Teardown button is pressed - Runs after all scripts when Group Start is pressed """ + # Cleanup: Delete test directory + cmd(f"<%= target_name %> FM_CMD_DELETE_DIRECTORY with PATH '{self.test_dir}'") pass 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 8fe0690..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,22 +24,22 @@ 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_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) @@ -50,40 +50,56 @@ def test_01_set_app_state(self): # 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") - # 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") + # 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_ERROR_COUNTER == {cmd_err_count + 1}", 100) - - def disabled_test_02_set_ap_state(self): + # 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) @@ -95,33 +111,33 @@ def disabled_test_02_set_ap_state(self): 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_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") + # 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_ERROR_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 +145,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) @@ -142,13 +169,15 @@ def disabled_test_03_set_ap_perm_off(self): 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_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) """ @@ -165,13 +194,15 @@ def test_04_reset_ap_stats(self): 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_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) """ @@ -188,8 +219,10 @@ def test_05_reset_wp_stats(self): 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_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 +232,7 @@ def setup(self): """ pass + def teardown(self): """ Test Group Setup 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!") 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 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