From 6645d976390589ab4c7943c7b6dd95f5d6e49b66 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 19 Apr 2023 11:19:55 +0900 Subject: [PATCH] generate 2nd obc cmd def --- .../src/src_user/TlmCmd/command_definitions.c | 12 ++ .../src/src_user/TlmCmd/command_definitions.h | 154 +++++++++--------- 2 files changed, 91 insertions(+), 75 deletions(-) diff --git a/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.c b/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.c index 59a1fe34d..9aa4f9e7d 100644 --- a/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.c +++ b/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.c @@ -37,6 +37,10 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_TLCD_SET_ID_FOR_TLM].cmd_func = Cmd_TLCD_SET_ID_FOR_TLM; cmd_table[Cmd_CODE_TLCD_SET_PAGE_FOR_TLM].cmd_func = Cmd_TLCD_SET_PAGE_FOR_TLM; cmd_table[Cmd_CODE_GENERATE_TLM].cmd_func = Cmd_GENERATE_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].cmd_func = Cmd_TG_GENERATE_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_HK_TLM].cmd_func = Cmd_TG_GENERATE_HK_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_MS_TLM].cmd_func = Cmd_TG_GENERATE_MS_TLM; + cmd_table[Cmd_CODE_TG_GENERATE_ST_TLM].cmd_func = Cmd_TG_GENERATE_ST_TLM; cmd_table[Cmd_CODE_BCT_CLEAR_BLOCK].cmd_func = Cmd_BCT_CLEAR_BLOCK; cmd_table[Cmd_CODE_BCT_SET_BLOCK_POSITION].cmd_func = Cmd_BCT_SET_BLOCK_POSITION; cmd_table[Cmd_CODE_BCT_COPY_BCT].cmd_func = Cmd_BCT_COPY_BCT; @@ -152,6 +156,14 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_GENERATE_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_GENERATE_TLM].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_GENERATE_TLM].param_size_infos[1].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[1].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_TLM].param_size_infos[1].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_HK_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_MS_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_ST_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; + cmd_table[Cmd_CODE_TG_GENERATE_ST_TLM].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_BCT_CLEAR_BLOCK].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_2BYTE; cmd_table[Cmd_CODE_BCT_SET_BLOCK_POSITION].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_2BYTE; cmd_table[Cmd_CODE_BCT_SET_BLOCK_POSITION].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; diff --git a/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.h b/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.h index f39b7c97d..0447c433d 100644 --- a/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.h +++ b/Examples/2nd_obc_user/src/src_user/TlmCmd/command_definitions.h @@ -35,81 +35,85 @@ typedef enum Cmd_CODE_TLCD_SET_ID_FOR_TLM = 0x0018, Cmd_CODE_TLCD_SET_PAGE_FOR_TLM = 0x0019, Cmd_CODE_GENERATE_TLM = 0x001A, - Cmd_CODE_BCT_CLEAR_BLOCK = 0x001B, - Cmd_CODE_BCT_SET_BLOCK_POSITION = 0x001C, - Cmd_CODE_BCT_COPY_BCT = 0x001D, - Cmd_CODE_BCT_OVERWRITE_CMD = 0x001E, - Cmd_CODE_BCT_FILL_NOP = 0x001F, - Cmd_CODE_BCE_ACTIVATE_BLOCK = 0x0020, - Cmd_CODE_BCE_ACTIVATE_BLOCK_BY_ID = 0x0021, - Cmd_CODE_BCE_INACTIVATE_BLOCK_BY_ID = 0x0022, - Cmd_CODE_BCE_ROTATE_BLOCK = 0x0023, - Cmd_CODE_BCE_COMBINE_BLOCK = 0x0024, - Cmd_CODE_BCE_TIMELIMIT_COMBINE_BLOCK = 0x0025, - Cmd_CODE_BCE_RESET_ROTATOR_INFO = 0x0026, - Cmd_CODE_BCE_RESET_COMBINER_INFO = 0x0027, - Cmd_CODE_BCE_SET_ROTATE_INTERVAL = 0x0028, - Cmd_CODE_GSCD_CLEAR_ERR_LOG = 0x0029, - Cmd_CODE_RTCD_CLEAR_ALL_REALTIME = 0x002A, - Cmd_CODE_RTCD_CLEAR_ERR_LOG = 0x002B, - Cmd_CODE_EL_INIT = 0x002C, - Cmd_CODE_EL_CLEAR_LOG_ALL = 0x002D, - Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL = 0x002E, - Cmd_CODE_EL_CLEAR_STATISTICS = 0x002F, - Cmd_CODE_EL_CLEAR_TLOG = 0x0030, - Cmd_CODE_EL_CLEAR_CLOG = 0x0031, - Cmd_CODE_EL_RECORD_EVENT = 0x0032, - Cmd_CODE_EL_TLOG_SET_PAGE_FOR_TLM = 0x0033, - Cmd_CODE_EL_CLOG_SET_PAGE_FOR_TLM = 0x0034, - Cmd_CODE_EL_INIT_LOGGING_SETTINGS = 0x0035, - Cmd_CODE_EL_ENABLE_LOGGING = 0x0036, - Cmd_CODE_EL_DISABLE_LOGGING = 0x0037, - Cmd_CODE_EL_ENABLE_LOGGING_ALL = 0x0038, - Cmd_CODE_EL_DISABLE_LOGGING_ALL = 0x0039, - Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE = 0x003A, - Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE = 0x003B, - Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE_ALL = 0x003C, - Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE_ALL = 0x003D, - Cmd_CODE_EH_INIT = 0x003E, - Cmd_CODE_EH_CLEAR_ALL_RULE = 0x003F, - Cmd_CODE_EH_LOAD_DEFAULT_RULE = 0x0040, - Cmd_CODE_EH_SET_REGISTER_RULE_EVENT_PARAM = 0x0041, - Cmd_CODE_EH_SET_REGISTER_RULE_CONDITION_PARAM = 0x0042, - Cmd_CODE_EH_REGISTER_RULE = 0x0043, - Cmd_CODE_EH_DELETE_RULE = 0x0044, - Cmd_CODE_EH_INIT_RULE = 0x0045, - Cmd_CODE_EH_INIT_RULE_FOR_MULTI_LEVEL = 0x0046, - Cmd_CODE_EH_ACTIVATE_RULE = 0x0047, - Cmd_CODE_EH_INACTIVATE_RULE = 0x0048, - Cmd_CODE_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL = 0x0049, - Cmd_CODE_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL = 0x004A, - Cmd_CODE_EH_SET_RULE_COUNTER = 0x004B, - Cmd_CODE_EH_CLEAR_RULE_COUNTER = 0x004C, - Cmd_CODE_EH_CLEAR_RULE_COUNTER_BY_EVENT = 0x004D, - Cmd_CODE_EH_CLEAR_LOG = 0x004E, - Cmd_CODE_EH_SET_MAX_RESPONSE_NUM = 0x004F, - Cmd_CODE_EH_SET_MAX_CHECK_EVENT_NUM = 0x0050, - Cmd_CODE_EH_SET_MAX_MULTI_LEVEL_NUM = 0x0051, - Cmd_CODE_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM = 0x0052, - Cmd_CODE_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM = 0x0053, - Cmd_CODE_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM = 0x0054, - Cmd_CODE_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM = 0x0055, - Cmd_CODE_EH_MATCH_EVENT_COUNTER_TO_EL = 0x0056, - Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP = 0x0057, - Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x0058, - Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP = 0x0059, - Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP = 0x005A, - Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x005B, - Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x005C, - Cmd_CODE_EVENT_UTIL_ENABLE_EH_EXEC = 0x005D, - Cmd_CODE_EVENT_UTIL_DISABLE_EH_EXEC = 0x005E, - Cmd_CODE_EVENT_UTIL_EXEC_EH = 0x005F, - Cmd_CODE_TF_INIT = 0x0060, - Cmd_CODE_CA_INIT = 0x0061, - Cmd_CODE_TF_REGISTER_TLM = 0x0062, - Cmd_CODE_CA_REGISTER_CMD = 0x0063, - Cmd_CODE_TF_SET_PAGE_FOR_TLM = 0x0064, - Cmd_CODE_CA_SET_PAGE_FOR_TLM = 0x0065, + Cmd_CODE_TG_GENERATE_TLM = 0x001B, + Cmd_CODE_TG_GENERATE_HK_TLM = 0x001C, + Cmd_CODE_TG_GENERATE_MS_TLM = 0x001D, + Cmd_CODE_TG_GENERATE_ST_TLM = 0x001E, + Cmd_CODE_BCT_CLEAR_BLOCK = 0x001F, + Cmd_CODE_BCT_SET_BLOCK_POSITION = 0x0020, + Cmd_CODE_BCT_COPY_BCT = 0x0021, + Cmd_CODE_BCT_OVERWRITE_CMD = 0x0022, + Cmd_CODE_BCT_FILL_NOP = 0x0023, + Cmd_CODE_BCE_ACTIVATE_BLOCK = 0x0024, + Cmd_CODE_BCE_ACTIVATE_BLOCK_BY_ID = 0x0025, + Cmd_CODE_BCE_INACTIVATE_BLOCK_BY_ID = 0x0026, + Cmd_CODE_BCE_ROTATE_BLOCK = 0x0027, + Cmd_CODE_BCE_COMBINE_BLOCK = 0x0028, + Cmd_CODE_BCE_TIMELIMIT_COMBINE_BLOCK = 0x0029, + Cmd_CODE_BCE_RESET_ROTATOR_INFO = 0x002A, + Cmd_CODE_BCE_RESET_COMBINER_INFO = 0x002B, + Cmd_CODE_BCE_SET_ROTATE_INTERVAL = 0x002C, + Cmd_CODE_GSCD_CLEAR_ERR_LOG = 0x002D, + Cmd_CODE_RTCD_CLEAR_ALL_REALTIME = 0x002E, + Cmd_CODE_RTCD_CLEAR_ERR_LOG = 0x002F, + Cmd_CODE_EL_INIT = 0x0030, + Cmd_CODE_EL_CLEAR_LOG_ALL = 0x0031, + Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL = 0x0032, + Cmd_CODE_EL_CLEAR_STATISTICS = 0x0033, + Cmd_CODE_EL_CLEAR_TLOG = 0x0034, + Cmd_CODE_EL_CLEAR_CLOG = 0x0035, + Cmd_CODE_EL_RECORD_EVENT = 0x0036, + Cmd_CODE_EL_TLOG_SET_PAGE_FOR_TLM = 0x0037, + Cmd_CODE_EL_CLOG_SET_PAGE_FOR_TLM = 0x0038, + Cmd_CODE_EL_INIT_LOGGING_SETTINGS = 0x0039, + Cmd_CODE_EL_ENABLE_LOGGING = 0x003A, + Cmd_CODE_EL_DISABLE_LOGGING = 0x003B, + Cmd_CODE_EL_ENABLE_LOGGING_ALL = 0x003C, + Cmd_CODE_EL_DISABLE_LOGGING_ALL = 0x003D, + Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE = 0x003E, + Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE = 0x003F, + Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE_ALL = 0x0040, + Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE_ALL = 0x0041, + Cmd_CODE_EH_INIT = 0x0042, + Cmd_CODE_EH_CLEAR_ALL_RULE = 0x0043, + Cmd_CODE_EH_LOAD_DEFAULT_RULE = 0x0044, + Cmd_CODE_EH_SET_REGISTER_RULE_EVENT_PARAM = 0x0045, + Cmd_CODE_EH_SET_REGISTER_RULE_CONDITION_PARAM = 0x0046, + Cmd_CODE_EH_REGISTER_RULE = 0x0047, + Cmd_CODE_EH_DELETE_RULE = 0x0048, + Cmd_CODE_EH_INIT_RULE = 0x0049, + Cmd_CODE_EH_INIT_RULE_FOR_MULTI_LEVEL = 0x004A, + Cmd_CODE_EH_ACTIVATE_RULE = 0x004B, + Cmd_CODE_EH_INACTIVATE_RULE = 0x004C, + Cmd_CODE_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL = 0x004D, + Cmd_CODE_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL = 0x004E, + Cmd_CODE_EH_SET_RULE_COUNTER = 0x004F, + Cmd_CODE_EH_CLEAR_RULE_COUNTER = 0x0050, + Cmd_CODE_EH_CLEAR_RULE_COUNTER_BY_EVENT = 0x0051, + Cmd_CODE_EH_CLEAR_LOG = 0x0052, + Cmd_CODE_EH_SET_MAX_RESPONSE_NUM = 0x0053, + Cmd_CODE_EH_SET_MAX_CHECK_EVENT_NUM = 0x0054, + Cmd_CODE_EH_SET_MAX_MULTI_LEVEL_NUM = 0x0055, + Cmd_CODE_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM = 0x0056, + Cmd_CODE_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM = 0x0057, + Cmd_CODE_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM = 0x0058, + Cmd_CODE_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM = 0x0059, + Cmd_CODE_EH_MATCH_EVENT_COUNTER_TO_EL = 0x005A, + Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP = 0x005B, + Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x005C, + Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP = 0x005D, + Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP = 0x005E, + Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x005F, + Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x0060, + Cmd_CODE_EVENT_UTIL_ENABLE_EH_EXEC = 0x0061, + Cmd_CODE_EVENT_UTIL_DISABLE_EH_EXEC = 0x0062, + Cmd_CODE_EVENT_UTIL_EXEC_EH = 0x0063, + Cmd_CODE_TF_INIT = 0x0064, + Cmd_CODE_CA_INIT = 0x0065, + Cmd_CODE_TF_REGISTER_TLM = 0x0066, + Cmd_CODE_CA_REGISTER_CMD = 0x0067, + Cmd_CODE_TF_SET_PAGE_FOR_TLM = 0x0068, + Cmd_CODE_CA_SET_PAGE_FOR_TLM = 0x0069, Cmd_CODE_WDT_INIT = 0x0100, Cmd_CODE_WDT_ENABLE = 0x0101, Cmd_CODE_WDT_DISABLE = 0x0102,