from cosmos_soft_packets import *
from noncosmos_packets import *
from packets_cf_cmd import *
from packets_cf_tlm import *
from packets_cs_cmd import *
from packets_cs_tlm import *
from packets_ds_cmd import *
from packets_ds_tlm import *
from packets_ephem_cmd import *
from packets_ephem_tlm import *
from packets_es_cmd import *
from packets_es_tlm import *
from packets_evs_cmd import *
from packets_evs_tlm import *
from packets_eyassat_if_cmd import *
from packets_eyassat_if_tlm import *
from packets_fm_cmd import *
from packets_fm_tlm import *
from packets_hk_cmd import *
from packets_hk_tlm import *
from packets_hs_cmd import *
from packets_hs_tlm import *
from packets_kit_sch_cmd import *
from packets_kit_sch_tlm import *
from packets_lc_cmd import *
from packets_lc_tlm import *
from packets_md_cmd import *
from packets_md_tlm import *
from packets_mm_cmd import *
from packets_mm_tlm import *
from packets_pl_if_cmd import *
from packets_pl_if_tlm import *
from packets_sb_cmd import *
from packets_sb_tlm import *
from packets_sc_cmd import *
from packets_sc_tlm import *
from packets_tbl_cmd import *
from packets_tbl_tlm import *
from packets_time_cmd import *
from packets_time_tlm import *
from packets_uart_to_ci_cmd import *
from packets_uart_to_ci_tlm import *
from packets_implant_cmd import *
from ats import *


COSMOS_TARGET_PACKETS = {
    'ADCS': {
        'GYRO_CAL': ADCS_GYRO_CAL_CmdPkt,
        'MAG_CAL': ADCS_MAG_CAL_CmdPkt,
    },
    'CF': {
        'CONFIG_PKT': CF_CONFIG_PKT_TlmPkt,
        'DIS_DEQUEUE': CF_DIS_DEQUEUE_CmdPkt,
        'DIS_DIR_POLLING': CF_DIS_DIR_POLLING_CmdPkt,
        'ENA_DEQUEUE': CF_ENA_DEQUEUE_CmdPkt,
        'ENA_DIR_POLLING': CF_ENA_DIR_POLLING_CmdPkt,
        'GET_MIB': CF_GET_MIB_CmdPkt,
        'HK_TLM_PKT': CF_HK_TLM_PKT_TlmPkt,
        'KICK_START': CF_KICK_START_CmdPkt,
        'NOOP': CF_NOOP_CmdPkt,
        'PLAYBACK_DIR': CF_PLAYBACK_DIR_CmdPkt,
        'PLAYBACK_FILE': CF_PLAYBACK_FILE_CmdPkt,
        'PURGE_QUEUE': CF_PURGE_QUEUE_CmdPkt,
        'QUICK_STAT': CF_QUICK_STAT_CmdPkt,
        'RESET_CTRS': CF_RESET_CTRS_CmdPkt,
        'SEND_CFG_PARAMS': CF_SEND_CFG_PARAMS_CmdPkt,
        'SEND_TRANS_DIAG_DATA': CF_SEND_TRANS_DIAG_DATA_CmdPkt,
        'SET_MIB': CF_SET_MIB_CmdPkt,
        'TRANS_DIAG_PKT': CF_TRANS_DIAG_PKT_TlmPkt,
        'WRITE_ACTIVE_TRANS': CF_WRITE_ACTIVE_TRANS_CmdPkt,
        'WRITE_QUEUE_INFO': CF_WRITE_QUEUE_INFO_CmdPkt,
    },
    'CFE_ES': {
        'APP_INFO_TLM_PKT': CFE_ES_APP_INFO_TLM_PKT_TlmPkt,
        'CLEAR_ERLOG': CFE_ES_CLEAR_ERLOG_CmdPkt,
        'CLEAR_SYSLOG': CFE_ES_CLEAR_SYSLOG_CmdPkt,
        'DELETE_CDS': CFE_ES_DELETE_CDS_CmdPkt,
        'HK_TLM_PKT': CFE_ES_HK_TLM_PKT_TlmPkt,
        'MEM_POOL_STATS_TLM_PKT': CFE_ES_MEM_POOL_STATS_TLM_PKT_TlmPkt,
        'NOOP': CFE_ES_NOOP_CmdPkt,
        'OVERWRITE_SYSLOG_MODE': CFE_ES_OVERWRITE_SYSLOG_MODE_CmdPkt,
        'RELOAD_APP': CFE_ES_RELOAD_APP_CmdPkt,
        'RESET': CFE_ES_RESET_CmdPkt,
        'RESET_CTRS': CFE_ES_RESET_CTRS_CmdPkt,
        'RESET_PR_CNT': CFE_ES_RESET_PR_CNT_CmdPkt,
        'RESTART_APP': CFE_ES_RESTART_APP_CmdPkt,
        'SEND_APP_INFO': CFE_ES_SEND_APP_INFO_CmdPkt,
        'SEND_MEM_POOL_STATS': CFE_ES_SEND_MEM_POOL_STATS_CmdPkt,
        'SET_LA_FILTER_MASK': CFE_ES_SET_LA_FILTER_MASK_CmdPkt,
        'SET_LA_TRIG_MASK': CFE_ES_SET_LA_TRIG_MASK_CmdPkt,
        'SET_MAX_PR_CNT': CFE_ES_SET_MAX_PR_CNT_CmdPkt,
        'SHELL': CFE_ES_SHELL_CmdPkt,
        'SHELL_TLM_PKT': CFE_ES_SHELL_TLM_PKT_TlmPkt,
        'START_APP': CFE_ES_START_APP_CmdPkt,
        'START_LA_DATA': CFE_ES_START_LA_DATA_CmdPkt,
        'STOP_APP': CFE_ES_STOP_APP_CmdPkt,
        'STOP_LA_DATA': CFE_ES_STOP_LA_DATA_CmdPkt,
        'WRITE_APP_INFO_TO_FILE': CFE_ES_WRITE_APP_INFO_TO_FILE_CmdPkt,
        'WRITE_CDS_REG_TO_FILE': CFE_ES_WRITE_CDS_REG_TO_FILE_CmdPkt,
        'WRITE_ERLOG_TO_FILE': CFE_ES_WRITE_ERLOG_TO_FILE_CmdPkt,
        'WRITE_SYSLOG_TO_FILE': CFE_ES_WRITE_SYSLOG_TO_FILE_CmdPkt,
        'WRITE_TASK_INFO_TO_FILE': CFE_ES_WRITE_TASK_INFO_TO_FILE_CmdPkt,
    },
    'CFE_EVS': {
        'ADD_EVENT_FILTER': CFE_EVS_ADD_EVENT_FILTER_CmdPkt,
        'CLEAR_LOG': CFE_EVS_CLEAR_LOG_CmdPkt,
        'DEL_EVENT_FILTER': CFE_EVS_DEL_EVENT_FILTER_CmdPkt,
        'DIS_APP_EVENT_GEN': CFE_EVS_DIS_APP_EVENT_GEN_CmdPkt,
        'DIS_APP_EVENT_TYPE': CFE_EVS_DIS_APP_EVENT_TYPE_CmdPkt,
        'DIS_EVENT_TYPE': CFE_EVS_DIS_EVENT_TYPE_CmdPkt,
        'DIS_PORT': CFE_EVS_DIS_PORT_CmdPkt,
        'ENA_APP_EVENT_GEN': CFE_EVS_ENA_APP_EVENT_GEN_CmdPkt,
        'ENA_APP_EVENT_TYPE': CFE_EVS_ENA_APP_EVENT_TYPE_CmdPkt,
        'ENA_EVENT_TYPE': CFE_EVS_ENA_EVENT_TYPE_CmdPkt,
        'ENA_PORT': CFE_EVS_ENA_PORT_CmdPkt,
        'EVENT_MSG_PKT': CFE_EVS_EVENT_MSG_PKT_TlmPkt,
        'HK_TLM_PKT': CFE_EVS_HK_TLM_PKT_TlmPkt,
        'NOOP': CFE_EVS_NOOP_CmdPkt,
        'RESET_ALL_FILTERS': CFE_EVS_RESET_ALL_FILTERS_CmdPkt,
        'RESET_APP_CTRS': CFE_EVS_RESET_APP_CTRS_CmdPkt,
        'RESET_CTRS': CFE_EVS_RESET_CTRS_CmdPkt,
        'RESET_FILTER_CTR': CFE_EVS_RESET_FILTER_CTR_CmdPkt,
        'SET_EVENT_FMT': CFE_EVS_SET_EVENT_FMT_CmdPkt,
        'SET_FILTER_MASK': CFE_EVS_SET_FILTER_MASK_CmdPkt,
        'SET_LOG_MODE': CFE_EVS_SET_LOG_MODE_CmdPkt,
        'WRITE_APP_INFO_TO_FILE': CFE_EVS_WRITE_APP_INFO_TO_FILE_CmdPkt,
        'WRITE_LOG_TO_FILE': CFE_EVS_WRITE_LOG_TO_FILE_CmdPkt,
    },
    'CFE_SB': {
        'DIS_ROUTE': CFE_SB_DIS_ROUTE_CmdPkt,
        'DIS_SUB_REPORTING': CFE_SB_DIS_SUB_REPORTING_CmdPkt,
        'ENA_ROUTE': CFE_SB_ENA_ROUTE_CmdPkt,
        'ENA_SUB_REPORTING': CFE_SB_ENA_SUB_REPORTING_CmdPkt,
        'HK_TLM_PKT': CFE_SB_HK_TLM_PKT_TlmPkt,
        'NOOP': CFE_SB_NOOP_CmdPkt,
        'PREV_SUBSCRIBE_TLM_PKT': CFE_SB_PREV_SUBSCRIBE_TLM_PKT_TlmPkt,
        'RESET_CTRS': CFE_SB_RESET_CTRS_CmdPkt,
        'SEND_PREV_SUBS': CFE_SB_SEND_PREV_SUBS_CmdPkt,
        'SEND_STATS': CFE_SB_SEND_STATS_CmdPkt,
        'SUBSCRIBE_REPORT_TLM_PKT': CFE_SB_SUBSCRIBE_REPORT_TLM_PKT_TlmPkt,
        'WRITE_MAP_TO_FILE': CFE_SB_WRITE_MAP_TO_FILE_CmdPkt,
        'WRITE_PIPE_TO_FILE': CFE_SB_WRITE_PIPE_TO_FILE_CmdPkt,
    },
    'CFE_TBL': {
        'ABORT_LOAD': CFE_TBL_ABORT_LOAD_CmdPkt,
        'ACTIVATE_TBL': CFE_TBL_ACTIVATE_TBL_CmdPkt,
        'DELETE_CDS': CFE_TBL_DELETE_CDS_CmdPkt,
        'DUMP_TBL': CFE_TBL_DUMP_TBL_CmdPkt,
        'HK_TLM_PKT': CFE_TBL_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': CFE_TBL_LOAD_TBL_CmdPkt,
        'NOOP': CFE_TBL_NOOP_CmdPkt,
        'RESET_CTRS': CFE_TBL_RESET_CTRS_CmdPkt,
        'SEND_REGISTRY': CFE_TBL_SEND_REGISTRY_CmdPkt,
        'TBL_REGISTRY_PKT': CFE_TBL_TBL_REGISTRY_PKT_TlmPkt,
        'VALIDATE_TBL': CFE_TBL_VALIDATE_TBL_CmdPkt,
        'WRITE_REG_TO_FILE': CFE_TBL_WRITE_REG_TO_FILE_CmdPkt,
    },
    'CFE_TIME': {
        'ADD_1HZ_STCF_ADJ': CFE_TIME_ADD_1HZ_STCF_ADJ_CmdPkt,
        'ADD_CLOCK_LAT': CFE_TIME_ADD_CLOCK_LAT_CmdPkt,
        'ADD_STCF_ADJ': CFE_TIME_ADD_STCF_ADJ_CmdPkt,
        'DIAG_TLM_PKT': CFE_TIME_DIAG_TLM_PKT_TlmPkt,
        'HK_TLM_PKT': CFE_TIME_HK_TLM_PKT_TlmPkt,
        'NOOP': CFE_TIME_NOOP_CmdPkt,
        'RESET_CTRS': CFE_TIME_RESET_CTRS_CmdPkt,
        'SEND_DIAG': CFE_TIME_SEND_DIAG_CmdPkt,
        'SET_CLOCK': CFE_TIME_SET_CLOCK_CmdPkt,
        'SET_CLOCK_LEAP': CFE_TIME_SET_CLOCK_LEAP_CmdPkt,
        'SET_CLOCK_MET': CFE_TIME_SET_CLOCK_MET_CmdPkt,
        'SET_CLOCK_STCF': CFE_TIME_SET_CLOCK_STCF_CmdPkt,
        'SET_SIGNAL': CFE_TIME_SET_SIGNAL_CmdPkt,
        'SET_SOURCE': CFE_TIME_SET_SOURCE_CmdPkt,
        'SET_STATE': CFE_TIME_SET_STATE_CmdPkt,
        'SUB_1HZ_STCF_ADJ': CFE_TIME_SUB_1HZ_STCF_ADJ_CmdPkt,
        'SUB_CLOCK_LAT': CFE_TIME_SUB_CLOCK_LAT_CmdPkt,
        'SUB_STCF_ADJ': CFE_TIME_SUB_STCF_ADJ_CmdPkt,
    },
    'CS': {
        'CANCEL_ONESHOT': CS_CANCEL_ONESHOT_CmdPkt,
        'DISABLE_ALL_CS': CS_DISABLE_ALL_CS_CmdPkt,
        'DISABLE_APPS': CS_DISABLE_APPS_CmdPkt,
        'DISABLE_CFECORE': CS_DISABLE_CFECORE_CmdPkt,
        'DISABLE_EEPROM': CS_DISABLE_EEPROM_CmdPkt,
        'DISABLE_ENTRY_EEPROM': CS_DISABLE_ENTRY_EEPROM_CmdPkt,
        'DISABLE_ENTRY_MEMORY': CS_DISABLE_ENTRY_MEMORY_CmdPkt,
        'DISABLE_MEMORY': CS_DISABLE_MEMORY_CmdPkt,
        'DISABLE_NAME_APP': CS_DISABLE_NAME_APP_CmdPkt,
        'DISABLE_NAME_TABLE': CS_DISABLE_NAME_TABLE_CmdPkt,
        'DISABLE_OS': CS_DISABLE_OS_CmdPkt,
        'DISABLE_TABLES': CS_DISABLE_TABLES_CmdPkt,
        'ENABLE_ALL_CS': CS_ENABLE_ALL_CS_CmdPkt,
        'ENABLE_APPS': CS_ENABLE_APPS_CmdPkt,
        'ENABLE_CFECORE': CS_ENABLE_CFECORE_CmdPkt,
        'ENABLE_EEPROM': CS_ENABLE_EEPROM_CmdPkt,
        'ENABLE_ENTRY_EEPROM': CS_ENABLE_ENTRY_EEPROM_CmdPkt,
        'ENABLE_ENTRY_MEMORY': CS_ENABLE_ENTRY_MEMORY_CmdPkt,
        'ENABLE_MEMORY': CS_ENABLE_MEMORY_CmdPkt,
        'ENABLE_NAME_APP': CS_ENABLE_NAME_APP_CmdPkt,
        'ENABLE_NAME_TABLE': CS_ENABLE_NAME_TABLE_CmdPkt,
        'ENABLE_OS': CS_ENABLE_OS_CmdPkt,
        'ENABLE_TABLES': CS_ENABLE_TABLES_CmdPkt,
        'GET_ENTRY_ID_EEPROM': CS_GET_ENTRY_ID_EEPROM_CmdPkt,
        'GET_ENTRY_ID_MEMORY': CS_GET_ENTRY_ID_MEMORY_CmdPkt,
        'HK_TLM_PKT': CS_HK_TLM_PKT_TlmPkt,
        'NOOP': CS_NOOP_CmdPkt,
        'ONESHOT': CS_ONESHOT_CmdPkt,
        'RECOMPUTE_BASELINE_APP': CS_RECOMPUTE_BASELINE_APP_CmdPkt,
        'RECOMPUTE_BASELINE_CFECORE': CS_RECOMPUTE_BASELINE_CFECORE_CmdPkt,
        'RECOMPUTE_BASELINE_EEPROM': CS_RECOMPUTE_BASELINE_EEPROM_CmdPkt,
        'RECOMPUTE_BASELINE_MEMORY': CS_RECOMPUTE_BASELINE_MEMORY_CmdPkt,
        'RECOMPUTE_BASELINE_OS': CS_RECOMPUTE_BASELINE_OS_CmdPkt,
        'RECOMPUTE_BASELINE_TABLE': CS_RECOMPUTE_BASELINE_TABLE_CmdPkt,
        'REPORT_BASELINE_APP': CS_REPORT_BASELINE_APP_CmdPkt,
        'REPORT_BASELINE_CFECORE': CS_REPORT_BASELINE_CFECORE_CmdPkt,
        'REPORT_BASELINE_EEPROM': CS_REPORT_BASELINE_EEPROM_CmdPkt,
        'REPORT_BASELINE_MEMORY': CS_REPORT_BASELINE_MEMORY_CmdPkt,
        'REPORT_BASELINE_OS': CS_REPORT_BASELINE_OS_CmdPkt,
        'REPORT_BASELINE_TABLE': CS_REPORT_BASELINE_TABLE_CmdPkt,
        'RESET_CTRS': CS_RESET_CTRS_CmdPkt,
    },
    'DS': {
        'ADD_FILTER_MID': DS_ADD_FILTER_MID_CmdPkt,
        'CLOSE_ALL': DS_CLOSE_ALL_CmdPkt,
        'CLOSE_FILE': DS_CLOSE_FILE_CmdPkt,
        'HK_TLM_PKT': DS_HK_TLM_PKT_TlmPkt,
        'NOOP': DS_NOOP_CmdPkt,
        'RESET_CTRS': DS_RESET_CTRS_CmdPkt,
        'SEND_FILE_INFO': DS_SEND_FILE_INFO_CmdPkt,
        'SET_APP_STATE': DS_SET_APP_STATE_CmdPkt,
        'SET_FILE_BASE_NAME': DS_SET_FILE_BASE_NAME_CmdPkt,
        'SET_FILE_COUNT': DS_SET_FILE_COUNT_CmdPkt,
        'SET_FILE_EXT': DS_SET_FILE_EXT_CmdPkt,
        'SET_FILE_MAX_AGE': DS_SET_FILE_MAX_AGE_CmdPkt,
        'SET_FILE_MAX_SIZE': DS_SET_FILE_MAX_SIZE_CmdPkt,
        'SET_FILE_PATH_NAME': DS_SET_FILE_PATH_NAME_CmdPkt,
        'SET_FILE_STATE': DS_SET_FILE_STATE_CmdPkt,
        'SET_FILE_TYPE': DS_SET_FILE_TYPE_CmdPkt,
        'SET_FILTER_FILE': DS_SET_FILTER_FILE_CmdPkt,
        'SET_FILTER_PARAM': DS_SET_FILTER_PARAM_CmdPkt,
        'SET_FILTER_TYPE': DS_SET_FILTER_TYPE_CmdPkt,
    },
    'EPHEM': {
        'DUMP_TBL': EPHEM_DUMP_TBL_CmdPkt,
        'EPHEM_PKT': EPHEM_EPHEM_PKT_TlmPkt,
        'EXOBJ_STUB': EPHEM_EXOBJ_STUB_CmdPkt,
        'HK_TLM_PKT': EPHEM_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': EPHEM_LOAD_TBL_CmdPkt,
        'NOOP': EPHEM_NOOP_CmdPkt,
        'RESET_CTRS': EPHEM_RESET_CTRS_CmdPkt,
    },
    'EYASSAT_IF': {
        'ADCS': EYASSAT_IF_ADCS_TlmPkt,
        'ADCS_CTRL_ALG': EYASSAT_IF_ADCS_CTRL_ALG_CmdPkt,
        'ADCS_DEADBAND': EYASSAT_IF_ADCS_DEADBAND_CmdPkt,
        'ADCS_DEADBAND_SCALE_FACTOR': EYASSAT_IF_ADCS_DEADBAND_SCALE_FACTOR_CmdPkt,
        'ADCS_DELTA_T': EYASSAT_IF_ADCS_DELTA_T_CmdPkt,
        'ADCS_D_CONST': EYASSAT_IF_ADCS_D_CONST_CmdPkt,
        'ADCS_ENABLE_IMU': EYASSAT_IF_ADCS_ENABLE_IMU_CmdPkt,
        'ADCS_EXTRA': EYASSAT_IF_ADCS_EXTRA_CmdPkt,
        'ADCS_I_CONST': EYASSAT_IF_ADCS_I_CONST_CmdPkt,
        'ADCS_PWM_BASELINE': EYASSAT_IF_ADCS_PWM_BASELINE_CmdPkt,
        'ADCS_P_CONST': EYASSAT_IF_ADCS_P_CONST_CmdPkt,
        'ADCS_RESET': EYASSAT_IF_ADCS_RESET_CmdPkt,
        'ADCS_RQST': EYASSAT_IF_ADCS_RQST_CmdPkt,
        'ADCS_TLM': EYASSAT_IF_ADCS_TLM_CmdPkt,
        'ADCS_WHEEL_SPD': EYASSAT_IF_ADCS_WHEEL_SPD_CmdPkt,
        'ADCS_X_ROD': EYASSAT_IF_ADCS_X_ROD_CmdPkt,
        'ADCS_YAW_CMD': EYASSAT_IF_ADCS_YAW_CMD_CmdPkt,
        'ADCS_Y_ROD': EYASSAT_IF_ADCS_Y_ROD_CmdPkt,
        'CALL_SIGN': EYASSAT_IF_CALL_SIGN_CmdPkt,
        'CAL_TBL': EYASSAT_IF_CAL_TBL_TlmPkt,
        'CMD_TIMEOUT': EYASSAT_IF_CMD_TIMEOUT_CmdPkt,
        'CONNECT': EYASSAT_IF_CONNECT_CmdPkt,
        'DISCONNECT': EYASSAT_IF_DISCONNECT_CmdPkt,
        'DUMP_TBL': EYASSAT_IF_DUMP_TBL_CmdPkt,
        'HK_TLM_PKT': EYASSAT_IF_HK_TLM_PKT_TlmPkt,
        'HOUR': EYASSAT_IF_HOUR_CmdPkt,
        'INTERNAL': EYASSAT_IF_INTERNAL_TlmPkt,
        'LOAD_TBL': EYASSAT_IF_LOAD_TBL_CmdPkt,
        'MINUTE': EYASSAT_IF_MINUTE_CmdPkt,
        'NOOP': EYASSAT_IF_NOOP_CmdPkt,
        'POWER': EYASSAT_IF_POWER_TlmPkt,
        'PWR_3V': EYASSAT_IF_PWR_3V_CmdPkt,
        'PWR_ADCS': EYASSAT_IF_PWR_ADCS_CmdPkt,
        'PWR_EXP': EYASSAT_IF_PWR_EXP_CmdPkt,
        'PWR_HTR1': EYASSAT_IF_PWR_HTR1_CmdPkt,
        'PWR_HTR2': EYASSAT_IF_PWR_HTR2_CmdPkt,
        'PWR_RESET': EYASSAT_IF_PWR_RESET_CmdPkt,
        'PWR_RQST': EYASSAT_IF_PWR_RQST_CmdPkt,
        'PWR_SCALE': EYASSAT_IF_PWR_SCALE_CmdPkt,
        'PWR_TLM': EYASSAT_IF_PWR_TLM_CmdPkt,
        'RESET_CTRS': EYASSAT_IF_RESET_CTRS_CmdPkt,
        'SECOND': EYASSAT_IF_SECOND_CmdPkt,
        'TEMPS': EYASSAT_IF_TEMPS_TlmPkt,
        'TLM_DELAY': EYASSAT_IF_TLM_DELAY_CmdPkt,
        'UART0': EYASSAT_IF_UART0_CmdPkt,
    },
    'FM': {
        'CONCAT_FILES': FM_CONCAT_FILES_CmdPkt,
        'COPY_FILE': FM_COPY_FILE_CmdPkt,
        'CREATE_DIR': FM_CREATE_DIR_CmdPkt,
        'DECOMPRESS_FILE': FM_DECOMPRESS_FILE_CmdPkt,
        'DELETE_ALL_FILES': FM_DELETE_ALL_FILES_CmdPkt,
        'DELETE_DIR': FM_DELETE_DIR_CmdPkt,
        'DELETE_FILE': FM_DELETE_FILE_CmdPkt,
        'DIR_LIST_PKT': FM_DIR_LIST_PKT_TlmPkt,
        'FILE_INFO_PKT': FM_FILE_INFO_PKT_TlmPkt,
        'GET_OPEN_FILES': FM_GET_OPEN_FILES_CmdPkt,
        'HK_TLM_PKT': FM_HK_TLM_PKT_TlmPkt,
        'MOVE_FILE': FM_MOVE_FILE_CmdPkt,
        'NOOP': FM_NOOP_CmdPkt,
        'RENAME_FILE': FM_RENAME_FILE_CmdPkt,
        'RESET_CTRS': FM_RESET_CTRS_CmdPkt,
        'SEND_DIR_PKT': FM_SEND_DIR_PKT_CmdPkt,
        'SEND_FILE_INFO': FM_SEND_FILE_INFO_CmdPkt,
        'SEND_FREE_SPACE_PKT': FM_SEND_FREE_SPACE_PKT_CmdPkt,
        'SET_FILE_PERMISSIONS': FM_SET_FILE_PERMISSIONS_CmdPkt,
        'SET_TABLE_STATE': FM_SET_TABLE_STATE_CmdPkt,
        'WRITE_DIR_TO_FILE': FM_WRITE_DIR_TO_FILE_CmdPkt,
    },
    'HK': {
        'COMBO_PKT_1': HK_COMBO_PKT_1_TlmPkt,
        'COMBO_PKT_2': HK_COMBO_PKT_2_TlmPkt,
        'HK_TLM_PKT': HK_HK_TLM_PKT_TlmPkt,
        'NOOP': HK_NOOP_CmdPkt,
        'RESET_CTRS': HK_RESET_CTRS_CmdPkt,
    },
    'HS': {
        'DISABLE_ALIVENESS': HS_DISABLE_ALIVENESS_CmdPkt,
        'DISABLE_APP_MON': HS_DISABLE_APP_MON_CmdPkt,
        'DISABLE_CPU_HOG': HS_DISABLE_CPU_HOG_CmdPkt,
        'DISABLE_EVENT_MON': HS_DISABLE_EVENT_MON_CmdPkt,
        'ENABLE_ALIVENESS': HS_ENABLE_ALIVENESS_CmdPkt,
        'ENABLE_APP_MON': HS_ENABLE_APP_MON_CmdPkt,
        'ENABLE_CPU_HOG': HS_ENABLE_CPU_HOG_CmdPkt,
        'ENABLE_EVENT_MON': HS_ENABLE_EVENT_MON_CmdPkt,
        'HK_TLM_PKT': HS_HK_TLM_PKT_TlmPkt,
        'NOOP': HS_NOOP_CmdPkt,
        'RESET_CTRS': HS_RESET_CTRS_CmdPkt,
        'RESET_RESETS_PERFORMED': HS_RESET_RESETS_PERFORMED_CmdPkt,
        'SET_MAX_RESETS': HS_SET_MAX_RESETS_CmdPkt,
    },
    'KIT_SCH': {
        'CFG_SCH_ENTRY': KIT_SCH_CFG_SCH_ENTRY_CmdPkt,
        'DUMP_TBL': KIT_SCH_DUMP_TBL_CmdPkt,
        'HK_TLM_PKT': KIT_SCH_HK_TLM_PKT_TlmPkt,
        'LOAD_MSG_ENTRY': KIT_SCH_LOAD_MSG_ENTRY_CmdPkt,
        'LOAD_SCH_ENTRY': KIT_SCH_LOAD_SCH_ENTRY_CmdPkt,
        'LOAD_TBL': KIT_SCH_LOAD_TBL_CmdPkt,
        'NOOP': KIT_SCH_NOOP_CmdPkt,
        'RESET_CTRS': KIT_SCH_RESET_CTRS_CmdPkt,
    },
    'LC': {
        'HK_TLM_PKT': LC_HK_TLM_PKT_TlmPkt,
        'NOOP': LC_NOOP_CmdPkt,
        'RESET_AP_STATS': LC_RESET_AP_STATS_CmdPkt,
        'RESET_CTRS': LC_RESET_CTRS_CmdPkt,
        'RESET_WP_STATS': LC_RESET_WP_STATS_CmdPkt,
        'SET_APP_STATE': LC_SET_APP_STATE_CmdPkt,
        'SET_AP_PERM_OFF': LC_SET_AP_PERM_OFF_CmdPkt,
        'SET_AP_STATE': LC_SET_AP_STATE_CmdPkt,
    },
    'MD': {
        'DWELL_PKT': MD_DWELL_PKT_TlmPkt,
        'HK_TLM_PKT': MD_HK_TLM_PKT_TlmPkt,
        'JAM_DWELL': MD_JAM_DWELL_CmdPkt,
        'NOOP': MD_NOOP_CmdPkt,
        'RESET_CTRS': MD_RESET_CTRS_CmdPkt,
        'SET_SIGNATURE': MD_SET_SIGNATURE_CmdPkt,
        'START_DWELL': MD_START_DWELL_CmdPkt,
        'STOP_DWELL': MD_STOP_DWELL_CmdPkt,
    },
    'MM': {
        'DIS_EEPROM_WRITE': MM_DIS_EEPROM_WRITE_CmdPkt,
        'DUMP_IN_EVENT': MM_DUMP_IN_EVENT_CmdPkt,
        'DUMP_MEM_TO_FILE': MM_DUMP_MEM_TO_FILE_CmdPkt,
        'ENA_EEPROM_WRITE': MM_ENA_EEPROM_WRITE_CmdPkt,
        'FILL_MEM': MM_FILL_MEM_CmdPkt,
        'HK_TLM_PKT': MM_HK_TLM_PKT_TlmPkt,
        'LOAD_MEM_FROM_FILE': MM_LOAD_MEM_FROM_FILE_CmdPkt,
        'LOAD_MEM_WID': MM_LOAD_MEM_WID_CmdPkt,
        'LOOKUP_SYMBOL': MM_LOOKUP_SYMBOL_CmdPkt,
        'NOOP': MM_NOOP_CmdPkt,
        'PEEK_MEM': MM_PEEK_MEM_CmdPkt,
        'POKE_MEM': MM_POKE_MEM_CmdPkt,
        'RESET_CTRS': MM_RESET_CTRS_CmdPkt,
        'SYMBOLTBL_TO_FILE': MM_SYMBOLTBL_TO_FILE_CmdPkt,
    },
    'PDU': {
        'CF_SPACE_TO_GND_PDU': CFDP_TlmPkt,
    },
    'PL_IF': {
        'DLINK_IMG': PL_IF_DLINK_IMG_CmdPkt,
        'DUMP_TBL': PL_IF_DUMP_TBL_CmdPkt,
        'GET_IMAGE_SIZE': PL_IF_GET_IMAGE_SIZE_CmdPkt,
        'HK_TLM_PKT': PL_IF_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': PL_IF_LOAD_TBL_CmdPkt,
        'NOOP': PL_IF_NOOP_CmdPkt,
        'PL_STATUS_PKT': PL_IF_PL_STATUS_PKT_TlmPkt,
        'POWER': PL_IF_POWER_CmdPkt,
        'REBOOT': PL_IF_REBOOT_CmdPkt,
        'RESET_CTRS': PL_IF_RESET_CTRS_CmdPkt,
        'STOP': PL_IF_STOP_CmdPkt,
        'TAKE_IMG': PL_IF_TAKE_IMG_CmdPkt,
    },
    'SB': {
        'WRITE_ROUTING_TO_FILE': SB_WRITE_ROUTING_TO_FILE_CmdPkt,
    },
    'SC': {
        'APPEND_ATS': SC_APPEND_ATS_CmdPkt,
        'CONT_ATS': SC_CONT_ATS_CmdPkt,
        'DISABLE_RTS': SC_DISABLE_RTS_CmdPkt,
        'DISABLE_RTS_GROUP': SC_DISABLE_RTS_GROUP_CmdPkt,
        'ENABLE_RTS': SC_ENABLE_RTS_CmdPkt,
        'ENABLE_RTS_GROUP': SC_ENABLE_RTS_GROUP_CmdPkt,
        'HK_TLM_PKT': SC_HK_TLM_PKT_TlmPkt,
        'JUMP_ATS': SC_JUMP_ATS_CmdPkt,
        'NOOP': SC_NOOP_CmdPkt,
        'RESET_CTRS': SC_RESET_CTRS_CmdPkt,
        'START_ATS': SC_START_ATS_CmdPkt,
        'START_RTS': SC_START_RTS_CmdPkt,
        'START_RTS_GROUP': SC_START_RTS_GROUP_CmdPkt,
        'STOP_ATS': SC_STOP_ATS_CmdPkt,
        'STOP_RTS': SC_STOP_RTS_CmdPkt,
        'STOP_RTS_GROUP': SC_STOP_RTS_GROUP_CmdPkt,
        'SWITCH_ATS': SC_SWITCH_ATS_CmdPkt,
    },
    'UART_TO_CI': {
        'ADD_PKT': UART_TO_CI_ADD_PKT_CmdPkt,
        'DISABLE_TELEMETRY': UART_TO_CI_DISABLE_TELEMETRY_CmdPkt,
        'DUMP_TBL': UART_TO_CI_DUMP_TBL_CmdPkt,
        'ENABLE_TELEMETRY': UART_TO_CI_ENABLE_TELEMETRY_CmdPkt,
        'HK_TLM_PKT': UART_TO_CI_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': UART_TO_CI_LOAD_TBL_CmdPkt,
        'NOOP': UART_TO_CI_NOOP_CmdPkt,
        'REMOVE_ALL_PKTS': UART_TO_CI_REMOVE_ALL_PKTS_CmdPkt,
        'REMOVE_PKT': UART_TO_CI_REMOVE_PKT_CmdPkt,
        'RESET_CTRS': UART_TO_CI_RESET_CTRS_CmdPkt,
    },
}

COSMOS_TARGET_PACKETS_REV = {}
for target, cmds in COSMOS_TARGET_PACKETS.items():
    for cmd, pktclass in cmds.items():
        COSMOS_TARGET_PACKETS_REV[pktclass] = (target, cmd)

from cosmos_soft_packets import *
from noncosmos_packets import *
from packets_cf_cmd import *
from packets_cf_tlm import *
from packets_cs_cmd import *
from packets_cs_tlm import *
from packets_ds_cmd import *
from packets_ds_tlm import *
from packets_ephem_cmd import *
from packets_ephem_tlm import *
from packets_es_cmd import *
from packets_es_tlm import *
from packets_evs_cmd import *
from packets_evs_tlm import *
from packets_eyassat_if_cmd import *
from packets_eyassat_if_tlm import *
from packets_fm_cmd import *
from packets_fm_tlm import *
from packets_hk_cmd import *
from packets_hk_tlm import *
from packets_hs_cmd import *
from packets_hs_tlm import *
from packets_kit_sch_cmd import *
from packets_kit_sch_tlm import *
from packets_lc_cmd import *
from packets_lc_tlm import *
from packets_md_cmd import *
from packets_md_tlm import *
from packets_mm_cmd import *
from packets_mm_tlm import *
from packets_pl_if_cmd import *
from packets_pl_if_tlm import *
from packets_sb_cmd import *
from packets_sb_tlm import *
from packets_sc_cmd import *
from packets_sc_tlm import *
from packets_tbl_cmd import *
from packets_tbl_tlm import *
from packets_time_cmd import *
from packets_time_tlm import *
from packets_uart_to_ci_cmd import *
from packets_uart_to_ci_tlm import *
from packets_implant_cmd import *
from ats import *


COSMOS_TARGET_PACKETS = {
    'ADCS': {
        'GYRO_CAL': ADCS_GYRO_CAL_CmdPkt,
        'MAG_CAL': ADCS_MAG_CAL_CmdPkt,
    },
    'CF': {
        'CONFIG_PKT': CF_CONFIG_PKT_TlmPkt,
        'DIS_DEQUEUE': CF_DIS_DEQUEUE_CmdPkt,
        'DIS_DIR_POLLING': CF_DIS_DIR_POLLING_CmdPkt,
        'ENA_DEQUEUE': CF_ENA_DEQUEUE_CmdPkt,
        'ENA_DIR_POLLING': CF_ENA_DIR_POLLING_CmdPkt,
        'GET_MIB': CF_GET_MIB_CmdPkt,
        'HK_TLM_PKT': CF_HK_TLM_PKT_TlmPkt,
        'KICK_START': CF_KICK_START_CmdPkt,
        'NOOP': CF_NOOP_CmdPkt,
        'PLAYBACK_DIR': CF_PLAYBACK_DIR_CmdPkt,
        'PLAYBACK_FILE': CF_PLAYBACK_FILE_CmdPkt,
        'PURGE_QUEUE': CF_PURGE_QUEUE_CmdPkt,
        'QUICK_STAT': CF_QUICK_STAT_CmdPkt,
        'RESET_CTRS': CF_RESET_CTRS_CmdPkt,
        'SEND_CFG_PARAMS': CF_SEND_CFG_PARAMS_CmdPkt,
        'SEND_TRANS_DIAG_DATA': CF_SEND_TRANS_DIAG_DATA_CmdPkt,
        'SET_MIB': CF_SET_MIB_CmdPkt,
        'TRANS_DIAG_PKT': CF_TRANS_DIAG_PKT_TlmPkt,
        'WRITE_ACTIVE_TRANS': CF_WRITE_ACTIVE_TRANS_CmdPkt,
        'WRITE_QUEUE_INFO': CF_WRITE_QUEUE_INFO_CmdPkt,
    },
    'CFE_ES': {
        'APP_INFO_TLM_PKT': CFE_ES_APP_INFO_TLM_PKT_TlmPkt,
        'CLEAR_ERLOG': CFE_ES_CLEAR_ERLOG_CmdPkt,
        'CLEAR_SYSLOG': CFE_ES_CLEAR_SYSLOG_CmdPkt,
        'DELETE_CDS': CFE_ES_DELETE_CDS_CmdPkt,
        'HK_TLM_PKT': CFE_ES_HK_TLM_PKT_TlmPkt,
        'MEM_POOL_STATS_TLM_PKT': CFE_ES_MEM_POOL_STATS_TLM_PKT_TlmPkt,
        'NOOP': CFE_ES_NOOP_CmdPkt,
        'OVERWRITE_SYSLOG_MODE': CFE_ES_OVERWRITE_SYSLOG_MODE_CmdPkt,
        'RELOAD_APP': CFE_ES_RELOAD_APP_CmdPkt,
        'RESET': CFE_ES_RESET_CmdPkt,
        'RESET_CTRS': CFE_ES_RESET_CTRS_CmdPkt,
        'RESET_PR_CNT': CFE_ES_RESET_PR_CNT_CmdPkt,
        'RESTART_APP': CFE_ES_RESTART_APP_CmdPkt,
        'SEND_APP_INFO': CFE_ES_SEND_APP_INFO_CmdPkt,
        'SEND_MEM_POOL_STATS': CFE_ES_SEND_MEM_POOL_STATS_CmdPkt,
        'SET_LA_FILTER_MASK': CFE_ES_SET_LA_FILTER_MASK_CmdPkt,
        'SET_LA_TRIG_MASK': CFE_ES_SET_LA_TRIG_MASK_CmdPkt,
        'SET_MAX_PR_CNT': CFE_ES_SET_MAX_PR_CNT_CmdPkt,
        'SHELL': CFE_ES_SHELL_CmdPkt,
        'SHELL_TLM_PKT': CFE_ES_SHELL_TLM_PKT_TlmPkt,
        'START_APP': CFE_ES_START_APP_CmdPkt,
        'START_LA_DATA': CFE_ES_START_LA_DATA_CmdPkt,
        'STOP_APP': CFE_ES_STOP_APP_CmdPkt,
        'STOP_LA_DATA': CFE_ES_STOP_LA_DATA_CmdPkt,
        'WRITE_APP_INFO_TO_FILE': CFE_ES_WRITE_APP_INFO_TO_FILE_CmdPkt,
        'WRITE_CDS_REG_TO_FILE': CFE_ES_WRITE_CDS_REG_TO_FILE_CmdPkt,
        'WRITE_ERLOG_TO_FILE': CFE_ES_WRITE_ERLOG_TO_FILE_CmdPkt,
        'WRITE_SYSLOG_TO_FILE': CFE_ES_WRITE_SYSLOG_TO_FILE_CmdPkt,
        'WRITE_TASK_INFO_TO_FILE': CFE_ES_WRITE_TASK_INFO_TO_FILE_CmdPkt,
    },
    'CFE_EVS': {
        'ADD_EVENT_FILTER': CFE_EVS_ADD_EVENT_FILTER_CmdPkt,
        'CLEAR_LOG': CFE_EVS_CLEAR_LOG_CmdPkt,
        'DEL_EVENT_FILTER': CFE_EVS_DEL_EVENT_FILTER_CmdPkt,
        'DIS_APP_EVENT_GEN': CFE_EVS_DIS_APP_EVENT_GEN_CmdPkt,
        'DIS_APP_EVENT_TYPE': CFE_EVS_DIS_APP_EVENT_TYPE_CmdPkt,
        'DIS_EVENT_TYPE': CFE_EVS_DIS_EVENT_TYPE_CmdPkt,
        'DIS_PORT': CFE_EVS_DIS_PORT_CmdPkt,
        'ENA_APP_EVENT_GEN': CFE_EVS_ENA_APP_EVENT_GEN_CmdPkt,
        'ENA_APP_EVENT_TYPE': CFE_EVS_ENA_APP_EVENT_TYPE_CmdPkt,
        'ENA_EVENT_TYPE': CFE_EVS_ENA_EVENT_TYPE_CmdPkt,
        'ENA_PORT': CFE_EVS_ENA_PORT_CmdPkt,
        'EVENT_MSG_PKT': CFE_EVS_EVENT_MSG_PKT_TlmPkt,
        'HK_TLM_PKT': CFE_EVS_HK_TLM_PKT_TlmPkt,
        'NOOP': CFE_EVS_NOOP_CmdPkt,
        'RESET_ALL_FILTERS': CFE_EVS_RESET_ALL_FILTERS_CmdPkt,
        'RESET_APP_CTRS': CFE_EVS_RESET_APP_CTRS_CmdPkt,
        'RESET_CTRS': CFE_EVS_RESET_CTRS_CmdPkt,
        'RESET_FILTER_CTR': CFE_EVS_RESET_FILTER_CTR_CmdPkt,
        'SET_EVENT_FMT': CFE_EVS_SET_EVENT_FMT_CmdPkt,
        'SET_FILTER_MASK': CFE_EVS_SET_FILTER_MASK_CmdPkt,
        'SET_LOG_MODE': CFE_EVS_SET_LOG_MODE_CmdPkt,
        'WRITE_APP_INFO_TO_FILE': CFE_EVS_WRITE_APP_INFO_TO_FILE_CmdPkt,
        'WRITE_LOG_TO_FILE': CFE_EVS_WRITE_LOG_TO_FILE_CmdPkt,
    },
    'CFE_SB': {
        'DIS_ROUTE': CFE_SB_DIS_ROUTE_CmdPkt,
        'DIS_SUB_REPORTING': CFE_SB_DIS_SUB_REPORTING_CmdPkt,
        'ENA_ROUTE': CFE_SB_ENA_ROUTE_CmdPkt,
        'ENA_SUB_REPORTING': CFE_SB_ENA_SUB_REPORTING_CmdPkt,
        'HK_TLM_PKT': CFE_SB_HK_TLM_PKT_TlmPkt,
        'NOOP': CFE_SB_NOOP_CmdPkt,
        'PREV_SUBSCRIBE_TLM_PKT': CFE_SB_PREV_SUBSCRIBE_TLM_PKT_TlmPkt,
        'RESET_CTRS': CFE_SB_RESET_CTRS_CmdPkt,
        'SEND_PREV_SUBS': CFE_SB_SEND_PREV_SUBS_CmdPkt,
        'SEND_STATS': CFE_SB_SEND_STATS_CmdPkt,
        'SUBSCRIBE_REPORT_TLM_PKT': CFE_SB_SUBSCRIBE_REPORT_TLM_PKT_TlmPkt,
        'WRITE_MAP_TO_FILE': CFE_SB_WRITE_MAP_TO_FILE_CmdPkt,
        'WRITE_PIPE_TO_FILE': CFE_SB_WRITE_PIPE_TO_FILE_CmdPkt,
    },
    'CFE_TBL': {
        'ABORT_LOAD': CFE_TBL_ABORT_LOAD_CmdPkt,
        'ACTIVATE_TBL': CFE_TBL_ACTIVATE_TBL_CmdPkt,
        'DELETE_CDS': CFE_TBL_DELETE_CDS_CmdPkt,
        'DUMP_TBL': CFE_TBL_DUMP_TBL_CmdPkt,
        'HK_TLM_PKT': CFE_TBL_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': CFE_TBL_LOAD_TBL_CmdPkt,
        'NOOP': CFE_TBL_NOOP_CmdPkt,
        'RESET_CTRS': CFE_TBL_RESET_CTRS_CmdPkt,
        'SEND_REGISTRY': CFE_TBL_SEND_REGISTRY_CmdPkt,
        'TBL_REGISTRY_PKT': CFE_TBL_TBL_REGISTRY_PKT_TlmPkt,
        'VALIDATE_TBL': CFE_TBL_VALIDATE_TBL_CmdPkt,
        'WRITE_REG_TO_FILE': CFE_TBL_WRITE_REG_TO_FILE_CmdPkt,
    },
    'CFE_TIME': {
        'ADD_1HZ_STCF_ADJ': CFE_TIME_ADD_1HZ_STCF_ADJ_CmdPkt,
        'ADD_CLOCK_LAT': CFE_TIME_ADD_CLOCK_LAT_CmdPkt,
        'ADD_STCF_ADJ': CFE_TIME_ADD_STCF_ADJ_CmdPkt,
        'DIAG_TLM_PKT': CFE_TIME_DIAG_TLM_PKT_TlmPkt,
        'HK_TLM_PKT': CFE_TIME_HK_TLM_PKT_TlmPkt,
        'NOOP': CFE_TIME_NOOP_CmdPkt,
        'RESET_CTRS': CFE_TIME_RESET_CTRS_CmdPkt,
        'SEND_DIAG': CFE_TIME_SEND_DIAG_CmdPkt,
        'SET_CLOCK': CFE_TIME_SET_CLOCK_CmdPkt,
        'SET_CLOCK_LEAP': CFE_TIME_SET_CLOCK_LEAP_CmdPkt,
        'SET_CLOCK_MET': CFE_TIME_SET_CLOCK_MET_CmdPkt,
        'SET_CLOCK_STCF': CFE_TIME_SET_CLOCK_STCF_CmdPkt,
        'SET_SIGNAL': CFE_TIME_SET_SIGNAL_CmdPkt,
        'SET_SOURCE': CFE_TIME_SET_SOURCE_CmdPkt,
        'SET_STATE': CFE_TIME_SET_STATE_CmdPkt,
        'SUB_1HZ_STCF_ADJ': CFE_TIME_SUB_1HZ_STCF_ADJ_CmdPkt,
        'SUB_CLOCK_LAT': CFE_TIME_SUB_CLOCK_LAT_CmdPkt,
        'SUB_STCF_ADJ': CFE_TIME_SUB_STCF_ADJ_CmdPkt,
    },
    'CS': {
        'CANCEL_ONESHOT': CS_CANCEL_ONESHOT_CmdPkt,
        'DISABLE_ALL_CS': CS_DISABLE_ALL_CS_CmdPkt,
        'DISABLE_APPS': CS_DISABLE_APPS_CmdPkt,
        'DISABLE_CFECORE': CS_DISABLE_CFECORE_CmdPkt,
        'DISABLE_EEPROM': CS_DISABLE_EEPROM_CmdPkt,
        'DISABLE_ENTRY_EEPROM': CS_DISABLE_ENTRY_EEPROM_CmdPkt,
        'DISABLE_ENTRY_MEMORY': CS_DISABLE_ENTRY_MEMORY_CmdPkt,
        'DISABLE_MEMORY': CS_DISABLE_MEMORY_CmdPkt,
        'DISABLE_NAME_APP': CS_DISABLE_NAME_APP_CmdPkt,
        'DISABLE_NAME_TABLE': CS_DISABLE_NAME_TABLE_CmdPkt,
        'DISABLE_OS': CS_DISABLE_OS_CmdPkt,
        'DISABLE_TABLES': CS_DISABLE_TABLES_CmdPkt,
        'ENABLE_ALL_CS': CS_ENABLE_ALL_CS_CmdPkt,
        'ENABLE_APPS': CS_ENABLE_APPS_CmdPkt,
        'ENABLE_CFECORE': CS_ENABLE_CFECORE_CmdPkt,
        'ENABLE_EEPROM': CS_ENABLE_EEPROM_CmdPkt,
        'ENABLE_ENTRY_EEPROM': CS_ENABLE_ENTRY_EEPROM_CmdPkt,
        'ENABLE_ENTRY_MEMORY': CS_ENABLE_ENTRY_MEMORY_CmdPkt,
        'ENABLE_MEMORY': CS_ENABLE_MEMORY_CmdPkt,
        'ENABLE_NAME_APP': CS_ENABLE_NAME_APP_CmdPkt,
        'ENABLE_NAME_TABLE': CS_ENABLE_NAME_TABLE_CmdPkt,
        'ENABLE_OS': CS_ENABLE_OS_CmdPkt,
        'ENABLE_TABLES': CS_ENABLE_TABLES_CmdPkt,
        'GET_ENTRY_ID_EEPROM': CS_GET_ENTRY_ID_EEPROM_CmdPkt,
        'GET_ENTRY_ID_MEMORY': CS_GET_ENTRY_ID_MEMORY_CmdPkt,
        'HK_TLM_PKT': CS_HK_TLM_PKT_TlmPkt,
        'NOOP': CS_NOOP_CmdPkt,
        'ONESHOT': CS_ONESHOT_CmdPkt,
        'RECOMPUTE_BASELINE_APP': CS_RECOMPUTE_BASELINE_APP_CmdPkt,
        'RECOMPUTE_BASELINE_CFECORE': CS_RECOMPUTE_BASELINE_CFECORE_CmdPkt,
        'RECOMPUTE_BASELINE_EEPROM': CS_RECOMPUTE_BASELINE_EEPROM_CmdPkt,
        'RECOMPUTE_BASELINE_MEMORY': CS_RECOMPUTE_BASELINE_MEMORY_CmdPkt,
        'RECOMPUTE_BASELINE_OS': CS_RECOMPUTE_BASELINE_OS_CmdPkt,
        'RECOMPUTE_BASELINE_TABLE': CS_RECOMPUTE_BASELINE_TABLE_CmdPkt,
        'REPORT_BASELINE_APP': CS_REPORT_BASELINE_APP_CmdPkt,
        'REPORT_BASELINE_CFECORE': CS_REPORT_BASELINE_CFECORE_CmdPkt,
        'REPORT_BASELINE_EEPROM': CS_REPORT_BASELINE_EEPROM_CmdPkt,
        'REPORT_BASELINE_MEMORY': CS_REPORT_BASELINE_MEMORY_CmdPkt,
        'REPORT_BASELINE_OS': CS_REPORT_BASELINE_OS_CmdPkt,
        'REPORT_BASELINE_TABLE': CS_REPORT_BASELINE_TABLE_CmdPkt,
        'RESET_CTRS': CS_RESET_CTRS_CmdPkt,
    },
    'DS': {
        'ADD_FILTER_MID': DS_ADD_FILTER_MID_CmdPkt,
        'CLOSE_ALL': DS_CLOSE_ALL_CmdPkt,
        'CLOSE_FILE': DS_CLOSE_FILE_CmdPkt,
        'HK_TLM_PKT': DS_HK_TLM_PKT_TlmPkt,
        'NOOP': DS_NOOP_CmdPkt,
        'RESET_CTRS': DS_RESET_CTRS_CmdPkt,
        'SEND_FILE_INFO': DS_SEND_FILE_INFO_CmdPkt,
        'SET_APP_STATE': DS_SET_APP_STATE_CmdPkt,
        'SET_FILE_BASE_NAME': DS_SET_FILE_BASE_NAME_CmdPkt,
        'SET_FILE_COUNT': DS_SET_FILE_COUNT_CmdPkt,
        'SET_FILE_EXT': DS_SET_FILE_EXT_CmdPkt,
        'SET_FILE_MAX_AGE': DS_SET_FILE_MAX_AGE_CmdPkt,
        'SET_FILE_MAX_SIZE': DS_SET_FILE_MAX_SIZE_CmdPkt,
        'SET_FILE_PATH_NAME': DS_SET_FILE_PATH_NAME_CmdPkt,
        'SET_FILE_STATE': DS_SET_FILE_STATE_CmdPkt,
        'SET_FILE_TYPE': DS_SET_FILE_TYPE_CmdPkt,
        'SET_FILTER_FILE': DS_SET_FILTER_FILE_CmdPkt,
        'SET_FILTER_PARAM': DS_SET_FILTER_PARAM_CmdPkt,
        'SET_FILTER_TYPE': DS_SET_FILTER_TYPE_CmdPkt,
    },
    'EPHEM': {
        'DUMP_TBL': EPHEM_DUMP_TBL_CmdPkt,
        'EPHEM_PKT': EPHEM_EPHEM_PKT_TlmPkt,
        'EXOBJ_STUB': EPHEM_EXOBJ_STUB_CmdPkt,
        'HK_TLM_PKT': EPHEM_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': EPHEM_LOAD_TBL_CmdPkt,
        'NOOP': EPHEM_NOOP_CmdPkt,
        'RESET_CTRS': EPHEM_RESET_CTRS_CmdPkt,
    },
    'EYASSAT_IF': {
        'ADCS': EYASSAT_IF_ADCS_TlmPkt,
        'ADCS_CTRL_ALG': EYASSAT_IF_ADCS_CTRL_ALG_CmdPkt,
        'ADCS_DEADBAND': EYASSAT_IF_ADCS_DEADBAND_CmdPkt,
        'ADCS_DEADBAND_SCALE_FACTOR': EYASSAT_IF_ADCS_DEADBAND_SCALE_FACTOR_CmdPkt,
        'ADCS_DELTA_T': EYASSAT_IF_ADCS_DELTA_T_CmdPkt,
        'ADCS_D_CONST': EYASSAT_IF_ADCS_D_CONST_CmdPkt,
        'ADCS_ENABLE_IMU': EYASSAT_IF_ADCS_ENABLE_IMU_CmdPkt,
        'ADCS_EXTRA': EYASSAT_IF_ADCS_EXTRA_CmdPkt,
        'ADCS_I_CONST': EYASSAT_IF_ADCS_I_CONST_CmdPkt,
        'ADCS_PWM_BASELINE': EYASSAT_IF_ADCS_PWM_BASELINE_CmdPkt,
        'ADCS_P_CONST': EYASSAT_IF_ADCS_P_CONST_CmdPkt,
        'ADCS_RESET': EYASSAT_IF_ADCS_RESET_CmdPkt,
        'ADCS_RQST': EYASSAT_IF_ADCS_RQST_CmdPkt,
        'ADCS_TLM': EYASSAT_IF_ADCS_TLM_CmdPkt,
        'ADCS_WHEEL_SPD': EYASSAT_IF_ADCS_WHEEL_SPD_CmdPkt,
        'ADCS_X_ROD': EYASSAT_IF_ADCS_X_ROD_CmdPkt,
        'ADCS_YAW_CMD': EYASSAT_IF_ADCS_YAW_CMD_CmdPkt,
        'ADCS_Y_ROD': EYASSAT_IF_ADCS_Y_ROD_CmdPkt,
        'CALL_SIGN': EYASSAT_IF_CALL_SIGN_CmdPkt,
        'CAL_TBL': EYASSAT_IF_CAL_TBL_TlmPkt,
        'CMD_TIMEOUT': EYASSAT_IF_CMD_TIMEOUT_CmdPkt,
        'CONNECT': EYASSAT_IF_CONNECT_CmdPkt,
        'DISCONNECT': EYASSAT_IF_DISCONNECT_CmdPkt,
        'DUMP_TBL': EYASSAT_IF_DUMP_TBL_CmdPkt,
        'HK_TLM_PKT': EYASSAT_IF_HK_TLM_PKT_TlmPkt,
        'HOUR': EYASSAT_IF_HOUR_CmdPkt,
        'INTERNAL': EYASSAT_IF_INTERNAL_TlmPkt,
        'LOAD_TBL': EYASSAT_IF_LOAD_TBL_CmdPkt,
        'MINUTE': EYASSAT_IF_MINUTE_CmdPkt,
        'NOOP': EYASSAT_IF_NOOP_CmdPkt,
        'POWER': EYASSAT_IF_POWER_TlmPkt,
        'PWR_3V': EYASSAT_IF_PWR_3V_CmdPkt,
        'PWR_ADCS': EYASSAT_IF_PWR_ADCS_CmdPkt,
        'PWR_EXP': EYASSAT_IF_PWR_EXP_CmdPkt,
        'PWR_HTR1': EYASSAT_IF_PWR_HTR1_CmdPkt,
        'PWR_HTR2': EYASSAT_IF_PWR_HTR2_CmdPkt,
        'PWR_RESET': EYASSAT_IF_PWR_RESET_CmdPkt,
        'PWR_RQST': EYASSAT_IF_PWR_RQST_CmdPkt,
        'PWR_SCALE': EYASSAT_IF_PWR_SCALE_CmdPkt,
        'PWR_TLM': EYASSAT_IF_PWR_TLM_CmdPkt,
        'RESET_CTRS': EYASSAT_IF_RESET_CTRS_CmdPkt,
        'SECOND': EYASSAT_IF_SECOND_CmdPkt,
        'TEMPS': EYASSAT_IF_TEMPS_TlmPkt,
        'TLM_DELAY': EYASSAT_IF_TLM_DELAY_CmdPkt,
        'UART0': EYASSAT_IF_UART0_CmdPkt,
    },
    'FM': {
        'CONCAT_FILES': FM_CONCAT_FILES_CmdPkt,
        'COPY_FILE': FM_COPY_FILE_CmdPkt,
        'CREATE_DIR': FM_CREATE_DIR_CmdPkt,
        'DECOMPRESS_FILE': FM_DECOMPRESS_FILE_CmdPkt,
        'DELETE_ALL_FILES': FM_DELETE_ALL_FILES_CmdPkt,
        'DELETE_DIR': FM_DELETE_DIR_CmdPkt,
        'DELETE_FILE': FM_DELETE_FILE_CmdPkt,
        'DIR_LIST_PKT': FM_DIR_LIST_PKT_TlmPkt,
        'FILE_INFO_PKT': FM_FILE_INFO_PKT_TlmPkt,
        'GET_OPEN_FILES': FM_GET_OPEN_FILES_CmdPkt,
        'HK_TLM_PKT': FM_HK_TLM_PKT_TlmPkt,
        'MOVE_FILE': FM_MOVE_FILE_CmdPkt,
        'NOOP': FM_NOOP_CmdPkt,
        'RENAME_FILE': FM_RENAME_FILE_CmdPkt,
        'RESET_CTRS': FM_RESET_CTRS_CmdPkt,
        'SEND_DIR_PKT': FM_SEND_DIR_PKT_CmdPkt,
        'SEND_FILE_INFO': FM_SEND_FILE_INFO_CmdPkt,
        'SEND_FREE_SPACE_PKT': FM_SEND_FREE_SPACE_PKT_CmdPkt,
        'SET_FILE_PERMISSIONS': FM_SET_FILE_PERMISSIONS_CmdPkt,
        'SET_TABLE_STATE': FM_SET_TABLE_STATE_CmdPkt,
        'WRITE_DIR_TO_FILE': FM_WRITE_DIR_TO_FILE_CmdPkt,
    },
    'HK': {
        'COMBO_PKT_1': HK_COMBO_PKT_1_TlmPkt,
        'COMBO_PKT_2': HK_COMBO_PKT_2_TlmPkt,
        'HK_TLM_PKT': HK_HK_TLM_PKT_TlmPkt,
        'NOOP': HK_NOOP_CmdPkt,
        'RESET_CTRS': HK_RESET_CTRS_CmdPkt,
    },
    'HS': {
        'DISABLE_ALIVENESS': HS_DISABLE_ALIVENESS_CmdPkt,
        'DISABLE_APP_MON': HS_DISABLE_APP_MON_CmdPkt,
        'DISABLE_CPU_HOG': HS_DISABLE_CPU_HOG_CmdPkt,
        'DISABLE_EVENT_MON': HS_DISABLE_EVENT_MON_CmdPkt,
        'ENABLE_ALIVENESS': HS_ENABLE_ALIVENESS_CmdPkt,
        'ENABLE_APP_MON': HS_ENABLE_APP_MON_CmdPkt,
        'ENABLE_CPU_HOG': HS_ENABLE_CPU_HOG_CmdPkt,
        'ENABLE_EVENT_MON': HS_ENABLE_EVENT_MON_CmdPkt,
        'HK_TLM_PKT': HS_HK_TLM_PKT_TlmPkt,
        'NOOP': HS_NOOP_CmdPkt,
        'RESET_CTRS': HS_RESET_CTRS_CmdPkt,
        'RESET_RESETS_PERFORMED': HS_RESET_RESETS_PERFORMED_CmdPkt,
        'SET_MAX_RESETS': HS_SET_MAX_RESETS_CmdPkt,
    },
    'KIT_SCH': {
        'CFG_SCH_ENTRY': KIT_SCH_CFG_SCH_ENTRY_CmdPkt,
        'DUMP_TBL': KIT_SCH_DUMP_TBL_CmdPkt,
        'HK_TLM_PKT': KIT_SCH_HK_TLM_PKT_TlmPkt,
        'LOAD_MSG_ENTRY': KIT_SCH_LOAD_MSG_ENTRY_CmdPkt,
        'LOAD_SCH_ENTRY': KIT_SCH_LOAD_SCH_ENTRY_CmdPkt,
        'LOAD_TBL': KIT_SCH_LOAD_TBL_CmdPkt,
        'NOOP': KIT_SCH_NOOP_CmdPkt,
        'RESET_CTRS': KIT_SCH_RESET_CTRS_CmdPkt,
    },
    'LC': {
        'HK_TLM_PKT': LC_HK_TLM_PKT_TlmPkt,
        'NOOP': LC_NOOP_CmdPkt,
        'RESET_AP_STATS': LC_RESET_AP_STATS_CmdPkt,
        'RESET_CTRS': LC_RESET_CTRS_CmdPkt,
        'RESET_WP_STATS': LC_RESET_WP_STATS_CmdPkt,
        'SET_APP_STATE': LC_SET_APP_STATE_CmdPkt,
        'SET_AP_PERM_OFF': LC_SET_AP_PERM_OFF_CmdPkt,
        'SET_AP_STATE': LC_SET_AP_STATE_CmdPkt,
    },
    'MD': {
        'DWELL_PKT': MD_DWELL_PKT_TlmPkt,
        'HK_TLM_PKT': MD_HK_TLM_PKT_TlmPkt,
        'JAM_DWELL': MD_JAM_DWELL_CmdPkt,
        'NOOP': MD_NOOP_CmdPkt,
        'RESET_CTRS': MD_RESET_CTRS_CmdPkt,
        'SET_SIGNATURE': MD_SET_SIGNATURE_CmdPkt,
        'START_DWELL': MD_START_DWELL_CmdPkt,
        'STOP_DWELL': MD_STOP_DWELL_CmdPkt,
    },
    'MM': {
        'DIS_EEPROM_WRITE': MM_DIS_EEPROM_WRITE_CmdPkt,
        'DUMP_IN_EVENT': MM_DUMP_IN_EVENT_CmdPkt,
        'DUMP_MEM_TO_FILE': MM_DUMP_MEM_TO_FILE_CmdPkt,
        'ENA_EEPROM_WRITE': MM_ENA_EEPROM_WRITE_CmdPkt,
        'FILL_MEM': MM_FILL_MEM_CmdPkt,
        'HK_TLM_PKT': MM_HK_TLM_PKT_TlmPkt,
        'LOAD_MEM_FROM_FILE': MM_LOAD_MEM_FROM_FILE_CmdPkt,
        'LOAD_MEM_WID': MM_LOAD_MEM_WID_CmdPkt,
        'LOOKUP_SYMBOL': MM_LOOKUP_SYMBOL_CmdPkt,
        'NOOP': MM_NOOP_CmdPkt,
        'PEEK_MEM': MM_PEEK_MEM_CmdPkt,
        'POKE_MEM': MM_POKE_MEM_CmdPkt,
        'RESET_CTRS': MM_RESET_CTRS_CmdPkt,
        'SYMBOLTBL_TO_FILE': MM_SYMBOLTBL_TO_FILE_CmdPkt,
    },
    'PDU': {
        'CF_SPACE_TO_GND_PDU': CFDP_TlmPkt,
    },
    'PL_IF': {
        'DLINK_IMG': PL_IF_DLINK_IMG_CmdPkt,
        'DUMP_TBL': PL_IF_DUMP_TBL_CmdPkt,
        'GET_IMAGE_SIZE': PL_IF_GET_IMAGE_SIZE_CmdPkt,
        'HK_TLM_PKT': PL_IF_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': PL_IF_LOAD_TBL_CmdPkt,
        'NOOP': PL_IF_NOOP_CmdPkt,
        'PL_STATUS_PKT': PL_IF_PL_STATUS_PKT_TlmPkt,
        'POWER': PL_IF_POWER_CmdPkt,
        'REBOOT': PL_IF_REBOOT_CmdPkt,
        'RESET_CTRS': PL_IF_RESET_CTRS_CmdPkt,
        'STOP': PL_IF_STOP_CmdPkt,
        'TAKE_IMG': PL_IF_TAKE_IMG_CmdPkt,
    },
    'SB': {
        'WRITE_ROUTING_TO_FILE': SB_WRITE_ROUTING_TO_FILE_CmdPkt,
    },
    'SC': {
        'APPEND_ATS': SC_APPEND_ATS_CmdPkt,
        'CONT_ATS': SC_CONT_ATS_CmdPkt,
        'DISABLE_RTS': SC_DISABLE_RTS_CmdPkt,
        'DISABLE_RTS_GROUP': SC_DISABLE_RTS_GROUP_CmdPkt,
        'ENABLE_RTS': SC_ENABLE_RTS_CmdPkt,
        'ENABLE_RTS_GROUP': SC_ENABLE_RTS_GROUP_CmdPkt,
        'HK_TLM_PKT': SC_HK_TLM_PKT_TlmPkt,
        'JUMP_ATS': SC_JUMP_ATS_CmdPkt,
        'NOOP': SC_NOOP_CmdPkt,
        'RESET_CTRS': SC_RESET_CTRS_CmdPkt,
        'START_ATS': SC_START_ATS_CmdPkt,
        'START_RTS': SC_START_RTS_CmdPkt,
        'START_RTS_GROUP': SC_START_RTS_GROUP_CmdPkt,
        'STOP_ATS': SC_STOP_ATS_CmdPkt,
        'STOP_RTS': SC_STOP_RTS_CmdPkt,
        'STOP_RTS_GROUP': SC_STOP_RTS_GROUP_CmdPkt,
        'SWITCH_ATS': SC_SWITCH_ATS_CmdPkt,
    },
    'UART_TO_CI': {
        'ADD_PKT': UART_TO_CI_ADD_PKT_CmdPkt,
        'DISABLE_TELEMETRY': UART_TO_CI_DISABLE_TELEMETRY_CmdPkt,
        'DUMP_TBL': UART_TO_CI_DUMP_TBL_CmdPkt,
        'ENABLE_TELEMETRY': UART_TO_CI_ENABLE_TELEMETRY_CmdPkt,
        'HK_TLM_PKT': UART_TO_CI_HK_TLM_PKT_TlmPkt,
        'LOAD_TBL': UART_TO_CI_LOAD_TBL_CmdPkt,
        'NOOP': UART_TO_CI_NOOP_CmdPkt,
        'REMOVE_ALL_PKTS': UART_TO_CI_REMOVE_ALL_PKTS_CmdPkt,
        'REMOVE_PKT': UART_TO_CI_REMOVE_PKT_CmdPkt,
        'RESET_CTRS': UART_TO_CI_RESET_CTRS_CmdPkt,
    },
}

COSMOS_TARGET_PACKETS_REV = {}
for target, cmds in COSMOS_TARGET_PACKETS.items():
    for cmd, pktclass in cmds.items():
        COSMOS_TARGET_PACKETS_REV[pktclass] = (target, cmd)
