##// END OF EJS Templates
fsw-0-23...
paul -
r75:1aca4e63f8e6 VHDLib206
parent child
Show More
@@ -1,6 +1,6
1 1 #############################################################################
2 2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 08:56:42 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 12:02:16 2013
4 4 # Project: fsw-qt.pro
5 5 # Template: app
6 6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 2.8.1, 2013-11-14T09:19:44. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-14T11:59:15. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -34,4 +34,6 void init_housekeeping_parameters( void
34 34
35 35 void increment_seq_counter( unsigned char *packet_sequence_control);
36 36
37 void getTime( unsigned char *time);
38
37 39 #endif // FSW_MISC_H_INCLUDED
@@ -32,11 +32,11 rtems_task actn_task( rtems_task_argumen
32 32
33 33 //***********
34 34 // TC ACTIONS
35 int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
36 int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
35 int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
36 int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
37 37 int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
38 int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
39 int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
38 int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
39 int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
40 40 int action_update_time(ccsdsTelecommandPacket_t *TC);
41 41
42 42 // mode transition
@@ -55,7 +55,7 int suspend_science_tasks();
55 55 void updateLFRCurrentMode();
56 56 void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time);
57 57 void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time);
58 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id);
58 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id, unsigned char *time);
59 59
60 60 #endif // TC_HANDLER_H_INCLUDED
61 61
@@ -15,14 +15,14 extern Packet_TM_LFR_PARAMETER_DUMP_t pa
15 15 extern Packet_TM_LFR_HK_t housekeeping_packet;
16 16
17 17 int action_load_common_par( ccsdsTelecommandPacket_t *TC );
18 int action_load_normal_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
19 int action_load_burst_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
20 int action_load_sbm1_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
21 int action_load_sbm2_par( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
18 int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
19 int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
20 int action_load_sbm1_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
21 int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
22 22 int action_dump_par(rtems_id queue_id );
23 23
24 int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
25 int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
24 int set_sy_lfr_n_swf_l(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time);
25 int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time );
26 26 int set_sy_lfr_n_asm_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
27 27 int set_sy_lfr_n_bp_p0( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
28 28 int set_sy_lfr_n_bp_p1( ccsdsTelecommandPacket_t *TC, rtems_id queue_id );
@@ -13,12 +13,12 extern unsigned short sequenceCounters_T
13 13
14 14 int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
15 15 int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
16 unsigned char byte_position, unsigned char rcv_value);
17 int send_tm_lfr_tc_exe_not_executable(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
18 int send_tm_lfr_tc_exe_not_implemented(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
19 int send_tm_lfr_tc_exe_error(ccsdsTelecommandPacket_t *TC, rtems_id queue_id);
16 unsigned char byte_position, unsigned char rcv_value, unsigned char *time);
17 int send_tm_lfr_tc_exe_not_executable(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
18 int send_tm_lfr_tc_exe_not_implemented(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
19 int send_tm_lfr_tc_exe_error(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time);
20 20 int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
21 unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, unsigned char destinationID);
21 unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV, unsigned char destinationID, unsigned char *time);
22 22
23 23 void increment_seq_counter_destination_id( unsigned char *packet_sequence_control, unsigned char destination_id );
24 24
@@ -321,5 +321,13 void increment_seq_counter( unsigned cha
321 321 packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control );
322 322 }
323 323
324 void getTime( unsigned char *time)
325 {
326 time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
327 time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
328 time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
329 time[3] = (unsigned char) (time_management_regs->coarse_time);
330 time[4] = (unsigned char) (time_management_regs->fine_time>>8);
331 time[5] = (unsigned char) (time_management_regs->fine_time);
332 }
324 333
325
@@ -120,6 +120,7 rtems_task recv_task( rtems_task_argumen
120 120 unsigned char destinationID;
121 121 unsigned int currentTC_LEN_RCV_AsUnsignedInt;
122 122 unsigned int parserCode;
123 unsigned char time[6];
123 124 rtems_status_code status;
124 125 rtems_id queue_recv_id;
125 126 rtems_id queue_send_id;
@@ -174,7 +175,11 rtems_task recv_task( rtems_task_argumen
174 175 {
175 176 destinationID = currentTC.sourceID;
176 177 }
177 send_tm_lfr_tc_exe_corrupted( &currentTC, queue_send_id, computed_CRC, currentTC_LEN_RCV, destinationID );
178 getTime( time );
179 close_action( &currentTC, LFR_DEFAULT, queue_send_id, time);
180 send_tm_lfr_tc_exe_corrupted( &currentTC, queue_send_id,
181 computed_CRC, currentTC_LEN_RCV,
182 destinationID, time );
178 183 }
179 184 }
180 185 else
@@ -31,6 +31,7 rtems_task actn_task( rtems_task_argumen
31 31 ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task
32 32 size_t size; // size of the incoming TC packet
33 33 unsigned char subtype; // subtype of the current TC packet
34 unsigned char time[6];
34 35 rtems_id queue_rcv_id;
35 36 rtems_id queue_snd_id;
36 37
@@ -55,6 +56,7 rtems_task actn_task( rtems_task_argumen
55 56 {
56 57 status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size,
57 58 RTEMS_WAIT, RTEMS_NO_TIMEOUT);
59 getTime( time ); // set time to the current time
58 60 if (status!=RTEMS_SUCCESSFUL) PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status)
59 61 else
60 62 {
@@ -62,63 +64,63 rtems_task actn_task( rtems_task_argumen
62 64 switch(subtype)
63 65 {
64 66 case TC_SUBTYPE_RESET:
65 result = action_reset( &TC, queue_snd_id );
66 close_action( &TC, result, queue_snd_id );
67 result = action_reset( &TC, queue_snd_id, time );
68 close_action( &TC, result, queue_snd_id, time );
67 69 break;
68 70 //
69 71 case TC_SUBTYPE_LOAD_COMM:
70 72 result = action_load_common_par( &TC );
71 close_action( &TC, result, queue_snd_id );
73 close_action( &TC, result, queue_snd_id, time );
72 74 break;
73 75 //
74 76 case TC_SUBTYPE_LOAD_NORM:
75 result = action_load_normal_par( &TC, queue_snd_id );
76 close_action( &TC, result, queue_snd_id );
77 result = action_load_normal_par( &TC, queue_snd_id, time );
78 close_action( &TC, result, queue_snd_id, time );
77 79 break;
78 80 //
79 81 case TC_SUBTYPE_LOAD_BURST:
80 result = action_load_burst_par( &TC, queue_snd_id );
81 close_action( &TC, result, queue_snd_id );
82 result = action_load_burst_par( &TC, queue_snd_id, time );
83 close_action( &TC, result, queue_snd_id, time );
82 84 break;
83 85 //
84 86 case TC_SUBTYPE_LOAD_SBM1:
85 result = action_load_sbm1_par( &TC, queue_snd_id );
86 close_action( &TC, result, queue_snd_id );
87 result = action_load_sbm1_par( &TC, queue_snd_id, time );
88 close_action( &TC, result, queue_snd_id, time );
87 89 break;
88 90 //
89 91 case TC_SUBTYPE_LOAD_SBM2:
90 result = action_load_sbm2_par( &TC, queue_snd_id );
91 close_action( &TC, result, queue_snd_id );
92 result = action_load_sbm2_par( &TC, queue_snd_id, time );
93 close_action( &TC, result, queue_snd_id, time );
92 94 break;
93 95 //
94 96 case TC_SUBTYPE_DUMP:
95 97 result = action_dump_par( queue_snd_id );
96 close_action( &TC, result, queue_snd_id );
98 close_action( &TC, result, queue_snd_id, time );
97 99 break;
98 100 //
99 101 case TC_SUBTYPE_ENTER:
100 result = action_enter_mode( &TC, queue_snd_id );
101 close_action( &TC, result, queue_snd_id );
102 result = action_enter_mode( &TC, queue_snd_id, time );
103 close_action( &TC, result, queue_snd_id, time );
102 104 break;
103 105 //
104 106 case TC_SUBTYPE_UPDT_INFO:
105 107 result = action_update_info( &TC, queue_snd_id );
106 close_action( &TC, result, queue_snd_id );
108 close_action( &TC, result, queue_snd_id, time );
107 109 break;
108 110 //
109 111 case TC_SUBTYPE_EN_CAL:
110 result = action_enable_calibration( &TC, queue_snd_id );
111 close_action( &TC, result, queue_snd_id );
112 result = action_enable_calibration( &TC, queue_snd_id, time );
113 close_action( &TC, result, queue_snd_id, time );
112 114 break;
113 115 //
114 116 case TC_SUBTYPE_DIS_CAL:
115 result = action_disable_calibration( &TC, queue_snd_id );
116 close_action( &TC, result, queue_snd_id );
117 result = action_disable_calibration( &TC, queue_snd_id, time );
118 close_action( &TC, result, queue_snd_id, time );
117 119 break;
118 120 //
119 121 case TC_SUBTYPE_UPDT_TIME:
120 122 result = action_update_time( &TC );
121 close_action( &TC, result, queue_snd_id );
123 close_action( &TC, result, queue_snd_id, time );
122 124 break;
123 125 //
124 126 default:
@@ -131,7 +133,7 rtems_task actn_task( rtems_task_argumen
131 133 //***********
132 134 // TC ACTIONS
133 135
134 int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
136 int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
135 137 {
136 138 /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received.
137 139 *
@@ -140,11 +142,11 int action_reset(ccsdsTelecommandPacket_
140 142 *
141 143 */
142 144
143 send_tm_lfr_tc_exe_not_implemented( TC, queue_id );
145 send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time );
144 146 return LFR_DEFAULT;
145 147 }
146 148
147 int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
149 int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
148 150 {
149 151 /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received.
150 152 *
@@ -163,7 +165,7 int action_enter_mode(ccsdsTelecommandPa
163 165 && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) )
164 166 {
165 167 status = RTEMS_UNSATISFIED;
166 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode );
168 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode, time );
167 169 }
168 170 else
169 171 {
@@ -193,7 +195,7 int action_enter_mode(ccsdsTelecommandPa
193 195 else
194 196 {
195 197 PRINTF("ERR *** in action_enter *** transition rejected\n")
196 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
198 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
197 199 }
198 200 }
199 201
@@ -227,7 +229,7 int action_update_info(ccsdsTelecommandP
227 229 return result;
228 230 }
229 231
230 int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
232 int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
231 233 {
232 234 /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received.
233 235 *
@@ -243,17 +245,17 int action_enable_calibration(ccsdsTelec
243 245 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
244 246
245 247 if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) {
246 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
248 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
247 249 result = LFR_DEFAULT;
248 250 }
249 251 else {
250 send_tm_lfr_tc_exe_not_implemented( TC, queue_id );
252 send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time );
251 253 result = LFR_DEFAULT;
252 254 }
253 255 return result;
254 256 }
255 257
256 int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
258 int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
257 259 {
258 260 /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received.
259 261 *
@@ -269,11 +271,11 int action_disable_calibration(ccsdsTele
269 271 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
270 272
271 273 if ( (lfrMode == LFR_MODE_STANDBY) || (lfrMode == LFR_MODE_BURST) || (lfrMode == LFR_MODE_SBM2) ) {
272 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
274 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
273 275 result = LFR_DEFAULT;
274 276 }
275 277 else {
276 send_tm_lfr_tc_exe_not_implemented( TC, queue_id );
278 send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time );
277 279 result = LFR_DEFAULT;
278 280 }
279 281 return result;
@@ -709,17 +711,9 void update_last_TC_rej(ccsdsTelecommand
709 711 housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5];
710 712 }
711 713
712 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id)
714 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id, unsigned char *time)
713 715 {
714 716 unsigned int val = 0;
715 unsigned char time[6];
716
717 time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
718 time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
719 time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
720 time[3] = (unsigned char) (time_management_regs->coarse_time);
721 time[4] = (unsigned char) (time_management_regs->fine_time>>8);
722 time[5] = (unsigned char) (time_management_regs->fine_time);
723 717
724 718 if (result == LFR_SUCCESSFUL)
725 719 {
@@ -29,7 +29,7 int action_load_common_par(ccsdsTelecomm
29 29 return LFR_SUCCESSFUL;
30 30 }
31 31
32 int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
32 int action_load_normal_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
33 33 {
34 34 /** This function updates the LFR registers with the incoming normal parameters.
35 35 *
@@ -45,7 +45,7 int action_load_normal_par(ccsdsTelecomm
45 45
46 46 if ( (lfrCurrentMode == LFR_MODE_NORMAL) ||
47 47 (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) {
48 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
48 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
49 49 flag = LFR_DEFAULT;
50 50 }
51 51
@@ -53,7 +53,7 int action_load_normal_par(ccsdsTelecomm
53 53 // sy_lfr_n_swf_l
54 54 if (flag == LFR_SUCCESSFUL)
55 55 {
56 result = set_sy_lfr_n_swf_l( TC, queue_id );
56 result = set_sy_lfr_n_swf_l( TC, queue_id, time );
57 57 if (result != LFR_SUCCESSFUL)
58 58 {
59 59 flag = LFR_DEFAULT;
@@ -64,7 +64,7 int action_load_normal_par(ccsdsTelecomm
64 64 // sy_lfr_n_swf_p
65 65 if (flag == LFR_SUCCESSFUL)
66 66 {
67 result = set_sy_lfr_n_swf_p( TC, queue_id );
67 result = set_sy_lfr_n_swf_p( TC, queue_id, time );
68 68 if (result != LFR_SUCCESSFUL)
69 69 {
70 70 flag = LFR_DEFAULT;
@@ -107,7 +107,7 int action_load_normal_par(ccsdsTelecomm
107 107 return flag;
108 108 }
109 109
110 int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
110 int action_load_burst_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
111 111 {
112 112 /** This function updates the LFR registers with the incoming burst parameters.
113 113 *
@@ -123,7 +123,7 int action_load_burst_par(ccsdsTelecomma
123 123 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
124 124
125 125 if ( lfrMode == LFR_MODE_BURST ) {
126 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
126 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
127 127 result = LFR_DEFAULT;
128 128 }
129 129 else {
@@ -136,7 +136,7 int action_load_burst_par(ccsdsTelecomma
136 136 return result;
137 137 }
138 138
139 int action_load_sbm1_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
139 int action_load_sbm1_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
140 140 {
141 141 /** This function updates the LFR registers with the incoming sbm1 parameters.
142 142 *
@@ -151,7 +151,7 int action_load_sbm1_par(ccsdsTelecomman
151 151 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
152 152
153 153 if ( (lfrMode == LFR_MODE_SBM1) || (lfrMode == LFR_MODE_SBM2) ) {
154 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
154 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
155 155 result = LFR_DEFAULT;
156 156 }
157 157 else {
@@ -164,7 +164,7 int action_load_sbm1_par(ccsdsTelecomman
164 164 return result;
165 165 }
166 166
167 int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id)
167 int action_load_sbm2_par(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time)
168 168 {
169 169 /** This function updates the LFR registers with the incoming sbm2 parameters.
170 170 *
@@ -180,7 +180,7 int action_load_sbm2_par(ccsdsTelecomman
180 180 lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4;
181 181
182 182 if ( (lfrMode == LFR_MODE_SBM2) || (lfrMode == LFR_MODE_SBM2) ) {
183 send_tm_lfr_tc_exe_not_executable( TC, queue_id );
183 send_tm_lfr_tc_exe_not_executable( TC, queue_id, time );
184 184 result = LFR_DEFAULT;
185 185 }
186 186 else {
@@ -232,7 +232,7 int action_dump_par( rtems_id queue_id )
232 232 //***********************
233 233 // NORMAL MODE PARAMETERS
234 234
235 int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
235 int set_sy_lfr_n_swf_l( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
236 236 {
237 237 /** This function sets the number of points of a snapshot (sy_lfr_n_swf_l).
238 238 *
@@ -255,12 +255,12 int set_sy_lfr_n_swf_l( ccsdsTelecommand
255 255
256 256 if ( (tmp < 16) || (tmp > 2048) ) // the snapshot period is a multiple of 16
257 257 { // 2048 is the maximum limit due to the size of the buffers
258 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_L+10, lsb );
258 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_L+10, lsb, time );
259 259 result = WRONG_APP_DATA;
260 260 }
261 261 else if (tmp != 2048)
262 262 {
263 send_tm_lfr_tc_exe_not_implemented( TC, queue_id );
263 send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time );
264 264 result = FUNCT_NOT_IMPL;
265 265 }
266 266 else
@@ -273,7 +273,7 int set_sy_lfr_n_swf_l( ccsdsTelecommand
273 273 return result;
274 274 }
275 275
276 int set_sy_lfr_n_swf_p( ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
276 int set_sy_lfr_n_swf_p(ccsdsTelecommandPacket_t *TC, rtems_id queue_id , unsigned char *time)
277 277 {
278 278 /** This function sets the time between two snapshots, in s (sy_lfr_n_swf_p).
279 279 *
@@ -296,7 +296,7 int set_sy_lfr_n_swf_p( ccsdsTelecommand
296 296
297 297 if ( (tmp < 16) || (tmp > 65528) )
298 298 {
299 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_P+10, lsb );
299 send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_SY_LFR_N_SWF_P+10, lsb, time );
300 300 result = WRONG_APP_DATA;
301 301 }
302 302 else
@@ -75,7 +75,8 int send_tm_lfr_tc_exe_success( ccsdsTel
75 75 }
76 76
77 77 int send_tm_lfr_tc_exe_inconsistent( ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
78 unsigned char byte_position, unsigned char rcv_value )
78 unsigned char byte_position, unsigned char rcv_value,
79 unsigned char *time)
79 80 {
80 81 /** This function sends a TM_LFR_TC_EXE_INCONSISTENT packet in the dedicated RTEMS message queue.
81 82 *
@@ -142,7 +143,7 int send_tm_lfr_tc_exe_inconsistent( ccs
142 143 return status;
143 144 }
144 145
145 int send_tm_lfr_tc_exe_not_executable( ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
146 int send_tm_lfr_tc_exe_not_executable( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
146 147 {
147 148 /** This function sends a TM_LFR_TC_EXE_NOT_EXECUTABLE packet in the dedicated RTEMS message queue.
148 149 *
@@ -207,7 +208,7 int send_tm_lfr_tc_exe_not_executable( c
207 208 return status;
208 209 }
209 210
210 int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
211 int send_tm_lfr_tc_exe_not_implemented( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
211 212 {
212 213 /** This function sends a TM_LFR_TC_EXE_NOT_IMPLEMENTED packet in the dedicated RTEMS message queue.
213 214 *
@@ -270,7 +271,7 int send_tm_lfr_tc_exe_not_implemented(
270 271 return status;
271 272 }
272 273
273 int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id )
274 int send_tm_lfr_tc_exe_error( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time )
274 275 {
275 276 /** This function sends a TM_LFR_TC_EXE_ERROR packet in the dedicated RTEMS message queue.
276 277 *
@@ -335,7 +336,7 int send_tm_lfr_tc_exe_error( ccsdsTelec
335 336
336 337 int send_tm_lfr_tc_exe_corrupted(ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
337 338 unsigned char *computed_CRC, unsigned char *currentTC_LEN_RCV,
338 unsigned char destinationID)
339 unsigned char destinationID, unsigned char *time)
339 340 {
340 341 /** This function sends a TM_LFR_TC_EXE_CORRUPTED packet in the dedicated RTEMS message queue.
341 342 *
General Comments 0
You need to be logged in to leave comments. Login now