// $ $RCSfile: err_hdl.h,v $ $Revision: 1.82 $ $Date: 2005/03/11 15:08:57 #ifndef __ERR_HDL_H__ #define __ERR_HDL_H__ //---------- Global functions defined in this module --------------------------- extern int authorise_event( void ); extern int generate_event (int, int, int, int, int *); extern int generate_peak_up_event (int, int); extern int generate_report (unsigned int, int, int, int, unsigned int *); extern int enqueue_nok (TC_packet *, unsigned int, unsigned int, int, unsigned int *); extern int enqueue_ok (TC_packet *, unsigned int); extern int enqueue_exec_compl (void); extern int enqueue_exec_fail (unsigned int, int, unsigned int *); extern void completion_update (TC_packet *); extern void init_event_counters( unsigned int * counters); //---------- Defines ----------------------------------------------------------- // ==================== Event subtypes #define EXCEP_SUBTYPE 2 #define EVENT_SUBTYPE 1 #define ALARM_SUBTYPE 4 // ==================== Debug events Event ids for cmd_seq #define NOK_CMDSEQ_ILLEGAL_APID 0x0000 #define NOK_CMDSEQ_INVALID_LENGTH 0x0001 #define NOK_CMDSEQ_INVALID_CRC 0x0002 #define NOK_CMDSEQ_ILLEGAL_PACKET_TYPE 0x0003 #define NOK_CMDSEQ_ILLEGAL_PACKET_SUBTYPE 0x0004 #define NOK_CMDSEQ_ILLEGAL_APPLICATION_DATA 0x0005 #define NOK_CMDSEQ_LENGTH_SECOND_CK 0x0010 #define NOK_CMDSEQ_OBSOLETE_AID 0x0011 #define EXF_CMDSEQ_UNKNOWN_ERROR 0x0012 // ==================== Debug events Event ids for pubfuncs. #define ERR_PF_GET_BLOCK_FAIL 0x5001 #define ERR_PF_GET_BLOCK_UNKNOWN_POOLID 0x5002 #define ERR_PF_REL_BLOCK_UNKNOWN_POOLID 0x5003 #define ERR_PF_LCU_CRC 0x5008 // ==================== Debug events Event ids for hs0. #define ERR_HS0_HSFLUSH_FOUND_NOBLOCK 0x0101 #define ERR_HS0_FIFOPUT_FRAME_QUEUE 0x0102 #define ERR_HS0_FRAME_POOL_ID 0x0103 #define ERR_HS0_FIFO_HALF_FULL 0x0104 #define ERR_HS0_FIFO_NOT_EMPTY 0x0105 #define ERR_HS0_FIFO_OVFL 0x0106 #define ERR_HS0_TS_FIFO_VOID 0x0107 #define ERR_HS0_TS_FIFO_FULL 0x0108 #define ERR_HS0_TS_POOL_FULL 0x0109 #define ERR_HS0_TS_POOL_ERR 0x010A #define ERR_HS0_LS_HP_QUEUE 0x010B // ==================== Debug events Event ids for hifi_pools. #define ERR_HIFI_POOL_FULL 0x0200 #define ERR_HIFI_POOL_ID 0x0201 #define ERR_HIFI_POOL_BLOCK_NUMBER 0x0202 // ==================== Debug events Event ids for hs1. #define ERR_HS1_SPECT_AID 0x0300 #define ERR_HS1_FIFOPUT_SD_PKT 0x0302 #define ERR_HS1_FRAME_COMPLETE_FAIL 0x0303 #define ERR_HS1_SCAN_COUNT 0x0304 #define ERR_HS1_SD_GET_BLOCK 0x0305 #define EXF_HS1_DELIVER_SD_PKT 0x0306 // ==================== Debug events Event ids for hk_ask. #define ERR_HK_ASK_HTRH_LIMIT 0xb001 #define ERR_HK_ASK_HTRV_LIMIT 0xb002 #define ERR_HK_ASK_WBSH_LIMIT 0xb003 #define ERR_HK_ASK_WBSV_LIMIT 0xb004 #define ERR_HK_ASK_ERR_8C 0xb005 #define ERR_HK_ASK_ERR_8D 0xb006 #define ERR_HK_ASK_ERR_8F 0xb007 #define ERR_HK_ASK_LOUT_LIMIT 0xb008 #define ERR_LS_LCU_NONRESP 0xb009 #define ERR_HK_ASK_LCU_MODE 0xb00A #define ERR_HK_ASK_LCU_CRC 0xb00B #define ERR_HK_ASK_LCU_CRIT_CRC 0xb00C #define ERR_HK_ASK_LCU_SAFE_CRC 0xb00D #define ERR_HK_ASK_LCU_TABLE_CRC 0xb00E #define ERR_HK_ASK_FIFOPUT_HK_TM_QUEUE 0x0400 #define EXF_HK_ASK_FIFOPUT_HK_TM_QUEUE 0x0401 #define ERR_HK_ASK_GET_BLOCK_HKPOOL_FULL 0x0402 #define ERR_HK_ASK_SWERR 0x0403 #define EXF_HK_ASK_HK_RATE_INDEX_OOL 0x0404 #define ERR_HK_ASK_PKT_NO 0x0405 #define EXF_HK_ASK_SINGLE_HK_LCU_INVALID_DATA 0x0406 #define EXF_HK_ASK_ERROR_LS_HP_QUEUE 0x0407 #define EXF_HK_ASK_LCU_OFF 0x0408 #define EXF_HK_ASK_FCU_OFF 0x0409 #define ERR_HK_ASK_INTERNAL_ERROR 0x040A #define EXF_HK_ASK_MEM_HK_LCU_INVALID_DATA 0x040B #define ERR_HK_ASK_LS_HRS_REQUEST 0x040c #define EXF_HK_ASK_SINGLE_HK_LCU_DBG_MSG 0x040d #define ERR_HK_ASK_FIFOPUT_LS_HP_QUEUE 0x040e // ==================== Debug events Event ids for ls. #define ERR_LS_QUEUES_EMPTY 0x0500 #define ERR_LS_FIFOPUT_HP_QUEUE 0x0502 #define ERR_LS_FIFOPUT_LP_QUEUE 0x0503 #define ERR_LS_TRX_REG_BUSY 0x0504 #define ERR_LS_INCORRECT_WORD 0x0505 #define ERR_LS_FIFOPUT_LS_HDL_QUEUE 0x0506 #define ERR_LS_FIFOPUT_HS_HDL_QUEUE 0x0507 #define ERR_LS_TRX_REG_BUSY_ABORT 0x0508 // ==================== Debug events Event ids for cmd_exec. #define NOK_CMDEX_TRX_CTRL_LENGTH_CHECK 0x0600 #define ERR_CMDEX_TRX_CTRL_INVALID_TYPE 0x0601 #define ERR_CMDEX_TRX_CTRL_INVALID_SUBTYPE 0x0602 #define ERR_CMDEX_TRX_CTRL_INVALID_PID 0x0603 #define NOK_CMDEX_TRX_CTRL_TC_WRONG_DATA 0x0604 #define EXF_CMDEX_PAR_SCAN_WRONG_STEP_NUMBER 0x0605 // WRONG_PS_STEPS_NUMBER #define EXF_CMDEX_PAR_SCAN_WRONG_NVOLTAGE 0x0606 // WRONG_PS_NVOL #define ERR_CMDSEQ_TC_ACCEP 0x0610 #define NOK_CMDEX_ILLEGAL_WBS_ACC_TIME 0x0626 #define NOK_CMDEX_ERROR_LS_HP_QUEUE 0x0627 #define NOK_CMDEX_NYI_TC_ERR 0x0628 #define NOK_CMDEX_GET_EV_POOL 0x0629 #define NOK_CMDEX_PUT_EV_TM_QUEUE 0x062a #define NOK_CMDEX_PUT_HK_TM_QUEUE 0x062b #define EXF_CMDEX_PUT_LS_HDL_QUEUE 0x062c #define ERR_CMDEX_PUT_HS_HDL_QUEUE 0x062d #define EXF_CMDEX_PUT_HS_HDL_QUEUE 0x062e #define EXF_CMDEX_GET_BLOCK_TC_POOL 0x062f #define EXF_CMDEX_GET_BLOCK_HK_POOL 0x0630 #define ERR_CMDEX_FIFOPUT_LS_HP_QUEUE 0x0631 // ==================== Debug events Event ids for tmtc_if #define ERR_TMTC_TRX_CTRL_PKT_NOT_FOUND 0x4000 #define ERR_TMTC_INVALID_PACKING_FIELD 0x4001 #define ERR_TMTC_APID_IN_GET_COUNTER 0x4002 // ==================== Debug events Event ids for data_hdl. #define EXF_DATA_HDL_INVALID_SUBSYS_ID 0x0700 #define ERR_DATA_HDL_ZERO_DIV 0x0701 #define ERR_DATA_HDL_FIFOPUT_HK_TM_QUEUE 0x0702 #define ERR_DATA_HDL_FIFOPUT_SD_TM_QUEUE 0x0703 #define ERR_DATA_HDL_FIFO_ID 0x0704 #define ERR_DATA_HDL_GET_STF_POOL_BLOCK 0x0705 #define ERR_DATA_HDL_GET_HK_POOL_BLOCK 0x0706 #define ERR_DATA_HDL_INVALID_MEAS_ID 0x0707 #define EXF_DATA_HDL_FIFOPUT_HS_HDL_QUEUE 0x0708 #define ERR_DATA_HDL_HRS_DURATION_NULL 0x0709 #define ERR_DATA_HDL_IFP_OVFL 0x070B #define ERR_DATA_HDL_IDX_OVFL 0x070C // ==================== Debug events Event ids for hs_hdl. #define ERR_HS_HDL_WRONG_SPECT_AID 0x0800 #define ERR_HS_HDL_MIXMAG_STEPS 0x0802 #define ERR_HS_HDL_OPERATION_ID 0x0803 #define ERR_HS_HDL_FIFO_0_OOL 0x0805 #define ERR_HS_HDL_FIFO_1_OOL 0x0806 #define ERR_HS_HDL_FIFO_2_OOL 0x0807 #define ERR_HS_HDL_FIFO_3_OOL 0x0808 #define EXF_HS_HDL_ERROR_LS_HP_QUEUE 0x0809 #define EXF_HS_HDL_HRS_SUB_OFF 0x0810 #define EXF_HS_HDL_FCU_SUB_OFF 0x0811 #define EXF_HS_HDL_WRONG_SPECT_AID 0x0812 // ==================== Debug events Event ids for hs_lib #define ERR_HS_LIB_INVALID_SPECTR_ID 0x0900 #define ERR_HS_LIB_FIFOPUT_HK_TM_QUEUE 0x0901 #define ERR_HS_LIB_BRING_SAFE_TIMEOUT 0x0902 #define ERR_HS_LIB_ZERO_DIV 0x0904 #define EXF_HS_LIB_ERROR_LS_HP_QUEUE 0x0905 #define EXF_HS_LIB_HRS_SUB_OFF 0x0906 #define EXF_HS_LIB_UPLOAD_VM_PARAM_TYPE 0x0907 #define EXF_HS_LIB_UPLOAD_VM_CODE_AREA 0x0908 #define EXF_HS_LIB_UPLOAD_VM_INCONSISTENT_TC 0x0909 #define EXF_HS_LIB_START_VM_INVALID_INDEX 0x0910 #define EXF_HS_LIB_WBS_SUB_OFF 0x0911 #define EXF_HS_LIB_QUEUE 0x0912 #define EXF_HS_LIB_FCU_SUB_OFF 0x0913 #define EXF_HS_LIB_DIPSCAN_NUM_STEP 0x0914 #define EXF_HS_LIB_MIXMAG_DATA 0x0915 #define NOK_HS_LIB_WRONG_INPUT_PARAM 0x0916 #define EXF_HS_LIB_NO_INSTRU_INVOLVED 0x0917 #define ERR_HS_LIB_WRONG_SPECT_AID 0x0918 #define ERR_HS_LIB_QUEUE_FAIL 0x0919 #define EXF_HS_LIB_PEAKUP_POLAR_TYPE_PAR 0x0922 #define EXF_HS_LIB_PEAKUP_SEQ_NUMBER_PAR 0x0923 #define EXF_HS_LIB_PEAKUP_INCOMPLETE 0x0925 #define ERR_HS_LIB_ERROR_LS_HP_QUEUE 0x0927 #define ERR_HS_LIB_GET_HK_POOL_BLOCK 0x0928 #define ERR_HS_LIB_AID_SPECTR_CHANGED 0x0929 #define ERR_HS_LIB_NUMERICAL_OVFL 0x0930 #define ERR_HS_LIB_AID_STOPPING_VM 0x0931 #define EXF_HS_LIB_ENGSCAN_INVALID_INTERVAL 0x0933 #define EXF_HS_LIB_ENGSCAN_INVALID_NSAMP_1 0x0934 #define EXF_HS_LIB_ENGSCAN_INVALID_NSAMP_2 0x0935 #define EXF_HS_LIB_ENGSCAN_NO_VALID_ADDR 0x0936 #define EXF_HS_LIB_ERROR_LS_LP_QUEUE 0x0937 #define EXF_HS_LIB_ENGSCAN_WRONG_ADDR 0x0938 #define EXF_HS_LIB_ENGSCAN_WRONG_CMD 0x0939 #define EXF_HS_LIB_WRONG_WBS_ACCTIME 0x0940 #define ERR_HS_LIB_HRS_DURATION_NULL 0x0941 #define EXF_HS_LIB_INVALID_DATA 0x0943 #define ERR_HS_LIB_SUBSYSID 0x0944 #define ERR_HS_LIB_FAILED_TO_RESTORE 0x0945 #define EXF_HS_LIB_LCU_NON_INTERACTION 0x0946 #define ERR_HS_LIB_DARK_OVFL 0x0947 //#define ERR_HS_LIB_ATTEN_LOW 0x0948 #define EXF_HS_LIB_PEAKUP_NEGATIVE_POWER 0x0949 #define EXF_HS_LIB_PEAKUP_FOUND_MINIMUM 0x0950 #define EXF_HS_LIB_PEAKUP_OUT_OF_GRID 0x0951 #define EXF_HS_LIB_PEAKUP_FOUND_NEGATIVE_PEAK 0x0952 #define EXF_HS_LIB_PEAKUP_Z_OVERFLOW 0x0953 #define EXF_HS_LIB_PEAKUP_Y_OVERFLOW 0x0954 #define ERR_HS_LIB_NEW_CAL_STEP 0x0955 // ==================== Debug events Event ids for ls_hdl #define EXF_LS_HDL_FCU_OFF 0x2001 #define EXF_LS_HDL_LCU_OFF 0x2002 #define ERR_LS_HDL_WRONG_CMD 0x2003 #define EXF_LS_HDL_VEC_SCAN_TABLE 0x2004 #define EXF_LS_HDL_GEN_REP_FAIL 0x2005 #define EXF_LS_HDL_ERROR_LS_HP_QUEUE 0x2006 //#define EXF_LS_HDL_FCU_SUB_OFF 0x2007 #define EXF_LS_HDL_VSCAN_REP_GET_HK_BLOCK 0x2008 #define EXF_LS_HDL_VSCAN_REP_PUT_HK_QUEUE 0x2009 #define EXF_LS_HDL_VSCAN_OVFL 0x200A #define EXF_LS_HDL_VSCAN_SYSOFF 0x200b #define EXF_LS_HDL_DIPSCAN_NUM_STEP 0x200c #define EXF_LS_HDL_PUT_LS_HDL_QUEUE 0x2014 #define EXF_LS_HDL_VEC_SCAN_CONF_EXPIRED 0x2016 #define EXF_LS_HDL_VEC_SCAN_INTERNAL 0x2018 #define EXF_LS_HDL_VSCAN_REPORT_PROBLEMS 0x2019 #define ERR_LS_HDL_LO_TUNE_FOUND_NO_BRACKET 0x2020 #define EXF_LS_HDL_LCU_NOT_NORM 0x2021 #define EXF_LS_HDL_LAST_INVALID 0x2022 #define ERR_LS_HDL_LCU_CRC_MISMATCH 0x2023 #define EXF_LS_HDL_LCU_CRC_MAX_CHUNK 0x2024 #define ERR_LS_HDL_LCU_CRC_NOCHECK 0x2025 // ==================== Debug events Event ids for mem_serv #define EXF_MEM_INVALID_MEMLENGTH 0x1000 #define EXF_MEM_INVALID_ADDRESS 0x1001 #define EXF_MEM_INVALID_MEMID 0x1002 #define EXF_MEM_INVALID_CRC1 0x1003 #define EXF_MEM_INVALID_CRC2 0x1004 #define ERR_MEM_FIFOPUT_HK_TM_QUEUE 0x1005 #define ERR_MEM_DATA_OVFL 0x1006 #define EXF_MEM_BOOT_OVERWRITE 0x1007 #define EXF_MEM_UNKNOWN_RET_CODE 0x1008 #define ERR_MEM_FIFOPUT_SD_PKT_QUEUE 0x1009 #define EXF_MEM_EEPROM_WRITE_OVERFLOW 0x100a #define EXF_MEM_EEPROM_COPY_FAILED 0x100b #define EXF_MEM_EEPROM_WRONG_PARTITION 0x100c #define EXF_MEM_EEPROM_WRONG_NUM_BAD_PAGES 0x100d #define EXF_MEM_HS_HDL_QUEUE 0x100e #define EXF_MEM_COPY_OBS 0x100f #define EXF_MEM_CHECK_PM_CRC 0x1010 #define EXF_MEM_EEPROM_WRONG_BAD_PAGE_ID 0x1011 #define EXF_MEM_LCU_INVALID_DATA 0x1012 #define EXF_MEM_LCU_OFF 0x1013 #define EXF_MEM_ERROR_LS_HP_QUEUE 0x1014 #define ERR_MEM_INTERNAL 0x1016 // ==================== Debug events Event ids for res_chk #define ERR_RESCK_DM_FAIL 0x1100 #define ERR_RESCK_DM_WRAP 0x1101 #define ERR_RESCK_TC_POOL_OVERFLOW_WARN 0x1102 #define ERR_RESCK_SD_POOL_OVERFLOW_WARN 0x1103 #define ERR_RESCK_HK_POOL_OVERFLOW_WARN 0x1104 #define ERR_RESCK_DM_CK_STOPPED 0X1106 // ==================== Debug events Event ids for err_hdl #define EXF_ERR_HDL_MEASUREMENT_ABORTED 0x1300 #define ERR_ERR_HDL_GET_HK_POOL_BLOCK 0x1301 #define ERR_ERR_HDL_FIFOPUT_HK_TM_QUEUE 0x1302 #define ERR_ERR_HDL_SUPPRESSING_EVENTS 0x1303 #endif // __ERR_HDL_H__