# HG changeset patch # User paul # Date 2015-04-16 11:07:31 # Node ID dabba9bc155e52751597b4fad9e425f7033c73f5 # Parent f249a97cc08492bc69e65b49265cb367607ac32d # Parent 66b92cfa53b5be9f8f61d83de8e13397d0198b56 Merge diff --git a/TC_types.h b/TC_types.h --- a/TC_types.h +++ b/TC_types.h @@ -19,6 +19,7 @@ #define PACKET_LENGTH_TC_LFR_UPDATE_INFO (46 - CCSDS_TC_TM_PACKET_OFFSET) #define PACKET_LENGTH_TC_LFR_ENABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET) #define PACKET_LENGTH_TC_LFR_DISABLE_CALIBRATION (12 - CCSDS_TC_TM_PACKET_OFFSET) +#define PACKET_LENGTH_TC_LFR_DUMP_KCOEFFICIENTS (12 - CCSDS_TC_TM_PACKET_OFFSET) #define PACKET_LENGTH_TC_LFR_UPDATE_TIME (18 - CCSDS_TC_TM_PACKET_OFFSET) // TC TYPES @@ -106,7 +107,6 @@ typedef struct unsigned char serviceSubType; unsigned char sourceID; unsigned char crc[2]; - } Packet_TC_LFR_DUMP_PAR_t; typedef struct @@ -122,7 +122,6 @@ typedef struct unsigned char spare; unsigned char bw_sp0_sp1_r0_r1; unsigned char crc[2]; - } Packet_TC_LFR_LOAD_COMMON_PAR_t; typedef struct @@ -183,10 +182,9 @@ typedef struct unsigned char serviceType; unsigned char serviceSubType; unsigned char sourceID; - unsigned char spare; - unsigned char bw_sp0_sp1_r0_r1; + unsigned char cp_rpw_time[6]; unsigned char crc[2]; -} Packet_TC_LFR_LOAD_KCOEFFICIENT_t; +} Packet_TC_LFR_UPDATE_TIME_t; typedef struct { // the CCSDS header is added by LPPMON @@ -198,8 +196,8 @@ typedef struct unsigned char serviceType; unsigned char serviceSubType; unsigned char sourceID; - unsigned char cp_rpw_time[6]; unsigned char crc[2]; -} Packet_TC_LFR_UPDATE_TIME_t; + +} Packet_TC_LFR_DUMP_KCOEFFICIENTS_t; #endif // TC_TYPES_H diff --git a/ccsds_types.h b/ccsds_types.h --- a/ccsds_types.h +++ b/ccsds_types.h @@ -18,12 +18,19 @@ #define DEFAULT_HKBIA 0x1e // 0001 1110 // PACKET ID +#define TM_PACKET_PID_DEFAULT 76 +#define TM_PACKET_PID_BURST_SBM1_SBM2 79 #define APID_TM_TC_EXE 0x0cc1 // PID 76 CAT 1 #define APID_TM_HK 0x0cc4 // PID 76 CAT 4 #define APID_TM_SCIENCE_NORMAL_BURST 0x0ccc // PID 76 CAT 12 #define APID_TM_SCIENCE_SBM1_SBM2 0x0cfc // PID 79 CAT 12 #define APID_TM_PARAMETER_DUMP 0x0cc6 // PID 76 CAT 6 #define APID_TM_KCOEFFICIENTS_DUMP 0x0cc6 // PID 76 CAT 6 +// PACKET CAT +#define TM_PACKET_CAT_TC_EXE 1 +#define TM_PACKET_CAT_HK 4 +#define TM_PACKET_CAT_SCIENCE 12 +#define TM_PACKET_CAT_DUMP 6 // PACKET SEQUENCE CONTROL #define TM_PACKET_SEQ_CTRL_CONTINUATION 0x00 // [0000 0000] @@ -99,15 +106,12 @@ #define TC_LEN_LOAD_FBINS 60 #define TC_LEN_UPDT_TIME 18 -// PACKET CODES -#define TM_CODE_K_DUMP 0xb5600b00 // 181 (0xb5) ** 96 (0x60) ** 11 (0x0b) ** 0 (0x00) - // TM TYPES #define TM_TYPE_TC_EXE 1 #define TM_TYPE_HK 3 #define TM_TYPE_LFR_SCIENCE 21 #define TM_TYPE_PARAMETER_DUMP 181 -#define TM_TYPE_K_DUMP 181 +#define TM_TYPE_KCOEFFICIENT_DUMP 181 // TM SUBTYPES #define TM_SUBTYPE_EXE_OK 7 @@ -687,51 +691,25 @@ typedef struct { unsigned char sy_lfr_s2_bp_p0; unsigned char sy_lfr_s2_bp_p1; - //************ - // FBINS MASKS // mask F0 - unsigned char sy_lfr_fbins_f0_word1[4]; - unsigned char sy_lfr_fbins_f0_word2[4]; - unsigned char sy_lfr_fbins_f0_word3[4]; - unsigned char sy_lfr_fbins_f0_word4[4]; + unsigned int sy_lfr_fbins_f0_word1; + unsigned int sy_lfr_fbins_f0_word2; + unsigned int sy_lfr_fbins_f0_word3; + unsigned int sy_lfr_fbins_f0_word4; // mask F1 - unsigned char sy_lfr_fbins_f1_word1[4]; - unsigned char sy_lfr_fbins_f1_word2[4]; - unsigned char sy_lfr_fbins_f1_word3[4]; - unsigned char sy_lfr_fbins_f1_word4[4]; + unsigned int sy_lfr_fbins_f1_word1; + unsigned int sy_lfr_fbins_f1_word2; + unsigned int sy_lfr_fbins_f1_word3; + unsigned int sy_lfr_fbins_f1_word4; // mask F2 - unsigned char sy_lfr_fbins_f2_word1[4]; - unsigned char sy_lfr_fbins_f2_word2[4]; - unsigned char sy_lfr_fbins_f2_word3[4]; - unsigned char sy_lfr_fbins_f2_word4[4]; + unsigned int sy_lfr_fbins_f2_word1; + unsigned int sy_lfr_fbins_f2_word2; + unsigned int sy_lfr_fbins_f2_word3; + unsigned int sy_lfr_fbins_f2_word4; // SPARE unsigned char source_data_spare; } Packet_TM_LFR_PARAMETER_DUMP_t; -typedef struct { - unsigned char targetLogicalAddress; - unsigned char protocolIdentifier; - unsigned char reserved; - unsigned char userApplication; - unsigned char packetID[2]; - unsigned char packetSequenceControl[2]; - unsigned char packetLength[2]; - // DATA FIELD HEADER - unsigned char spare1_pusVersion_spare2; - unsigned char serviceType; - unsigned char serviceSubType; - unsigned char destinationID; - unsigned char time[6]; - unsigned char sid; - unsigned char pkt_cnt; - unsigned char pkt_nr; - unsigned char blk_nr; - - //****************** - // SOURCE DATA repeated N times with N in [0 .. PA_LFR_KCOEFF_BLK_NR] - unsigned char kcoeff_blks[3900]; // one blk is 2 + 4 * 32 = 130 bytes, 30 blks max in one packet (30 * 130 = 3900) - -} Packet_TM_LFR_KCOEFFICIENTS_DUMP_t; #endif // CCSDS_TYPES_H_INCLUDED