00001 #ifndef __DECODE_HK_VCDU_H
00002 #define __DECODE_HK_VCDU_H
00003
00004 #include "drms_statuscodes.h"
00005 #include "packets.h"
00006
00007
00008 #define APID_IRIS_SCIENCE 768
00009 #define APID_IRIS_TIME 773
00010 #define APID_IRIS_TEST_DCHRI 775
00011 #define APID_IRIS_ISP 56
00012
00013 #define APID_HMI_SCIENCE_1 400
00014 #define APID_HMI_SCIENCE_2 410
00015 #define APID_HMI_TIME_1 405
00016 #define APID_HMI_TIME_2 415
00017 #define APID_HMI_TEST1768_1 407
00018 #define APID_HMI_TEST1768_2 417
00019 #define APID_HMI_TEST256x256_1 408
00020 #define APID_HMI_TEST256x256_2 418
00021 #define APID_HMI_TEST4096x4096_1 409
00022 #define APID_HMI_TEST4096x4096_2 419
00023 #define APID_HMI_IMSTAT_1 445
00024 #define APID_HMI_IMSTAT_2 475
00025 #define APID_HMI_SEQ_1 451
00026 #define APID_HMI_SEQ_2 481
00027 #define APID_HMI_OBT_1 448
00028 #define APID_HMI_OBT_2 478
00029
00030
00031 #define APID_AIA_SCIENCE_1 500
00032 #define APID_AIA_SCIENCE_2 510
00033 #define APID_AIA_TIME_1 505
00034 #define APID_AIA_TIME_2 515
00035 #define APID_AIA_TEST1768_1 507
00036 #define APID_AIA_TEST1768_2 517
00037 #define APID_AIA_TEST256x256_1 508
00038 #define APID_AIA_TEST256x256_2 518
00039 #define APID_AIA_IMSTAT_1 529
00040 #define APID_AIA_IMSTAT_2 569
00041 #define APID_AIA_SEQ_1 536
00042 #define APID_AIA_SEQ_2 576
00043 #define APID_AIA_OBT_1 540
00044 #define APID_AIA_OBT_2 580
00045
00046
00047
00048
00049
00050 #define SUCCESS_HK_NEED_TO_CTD (0)
00051 #define SUCCESS_HK_NEED_TO_WTD_CTD (1)
00052 #define SUCCESS_HK_SKIP_WTD_REC_EXISTS (2)
00053 #define SUCCESS_HK_SKIP_WTD_REC_TIME_OOR (3)
00054 #define SUCCESS_SKIP_IMAGE (4)
00055 #define SUCCESS_SKIP_PROCESSING_APID (5)
00056 #define ERROR_NODATA (-13)
00057 #define ERROR_HK_NO_CONFIG_DATA (-14)
00058 #define ERROR_HK_CANNOT_FIND_VER_NUM (-15)
00059 #define ERROR_HK_CANNOT_LOAD_HK_VALUES (-16)
00060 #define ERROR_HK_CANNOT_LOAD_ENGR_VALUES (-17)
00061 #define ERROR_HK_INVALID_BITFIELD_LENGTH (-18)
00062 #define ERROR_HK_UNHANDLED_TYPE (-19)
00063 #define ERROR_HK_NOSUCHDIR (-20)
00064 #define ERROR_HK_CANNOT_LOAD_CONFIG (-21)
00065 #define ERROR_HK_FAILED_WRITE_DAYFILE (-22)
00066 #define ERROR_HK_ENVIRONMENT_VARS_NOT_SET (-23)
00067 #define ERROR_HK_FAILED_TO_FIND_TIMECODES (-24)
00068 #define ERROR_HK_FAILED_CLOSE_DRMS_RECORD (-25)
00069 #define ERROR_HK_FAILED_OPEN_DRMS_RECORD (-26)
00070 #define ERROR_HK_FAILED_GETTING_FSN (-27)
00071 #define ERROR_HK_FAILED_OPEN_DAYFILE (-28)
00072 #define ERROR_HK_FAILED_UNKNOWNSERIES (DRMS_ERROR_UNKNOWNSERIES)
00073
00074
00075
00076
00077 #define HK_SUCCESS_HK_ALL (0)
00078 #define HK_SUCCESS_HK_SOME (1)
00079
00080
00081
00082 #define HK_SUCCESS_HKTIME (0)
00083 #define HK_SUCCESS_DECODING (1)
00084 #define HK_SUCCESS_WRITE_DAYFILE (2)
00085 #define HK_SUCCESS_REACHED_END_VCDU (3)
00086 #define HK_SUCCESS_SKIP_IMAGE SUCCESS_SKIP_IMAGE
00087 #define HK_SUCCESS_SKIP_PROCESSING_APID SUCCESS_SKIP_PROCESSING_APID
00088
00089
00090 #define HK_SUCCESS_WROTE_TO_DRMS (0)
00091
00092
00093
00094
00095
00096 #define HK_WRITE_AFTER_VCDU_COUNT 1
00097 #define HK_INIT_WRITE_FLAG 1
00098
00099
00100 void hk_ccsds_free(CCSDS_Packet_t **p);
00101 int decode_next_hk_vcdu( unsigned short vcdu[PACKETWORDS], CCSDS_Packet_t **hk_packets, unsigned int *fsn);
00102
00103 #endif