@@ -1,2 +1,2 | |||||
1 | 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters |
|
1 | 3081d1f9bb20b2b64a192585337a292a9804e0c5 LFR_basic-parameters | |
2 | a0ca246cc2057880086d028aab3cf35be244efbc header/lfr_common_headers |
|
2 | 6a30b7a924d9c3824f432332ed79bcee25954455 header/lfr_common_headers |
@@ -2,7 +2,7 TEMPLATE = app | |||||
2 | # CONFIG += console v8 sim |
|
2 | # CONFIG += console v8 sim | |
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch | |
4 | # lpp_dpu_destid |
|
4 | # lpp_dpu_destid | |
5 |
CONFIG += console verbose lpp_dpu_destid |
|
5 | CONFIG += console verbose lpp_dpu_destid cpu_usage_report | |
6 | CONFIG -= qt |
|
6 | CONFIG -= qt | |
7 |
|
7 | |||
8 | include(./sparc.pri) |
|
8 | include(./sparc.pri) |
@@ -216,11 +216,13 rtems_task send_task( rtems_task_argumen | |||||
216 | size_t size; // size of the incoming TC packet |
|
216 | size_t size; // size of the incoming TC packet | |
217 | rtems_id queue_send_id; |
|
217 | rtems_id queue_send_id; | |
218 | unsigned int sid; |
|
218 | unsigned int sid; | |
|
219 | unsigned char sidAsUnsignedChar; | |||
219 |
|
220 | |||
220 | incomingRingNodePtr = NULL; |
|
221 | incomingRingNodePtr = NULL; | |
221 | ring_node_address = 0; |
|
222 | ring_node_address = 0; | |
222 | charPtr = (char *) &ring_node_address; |
|
223 | charPtr = (char *) &ring_node_address; | |
223 | sid = 0; |
|
224 | sid = 0; | |
|
225 | sidAsUnsignedChar = 0; | |||
224 |
|
226 | |||
225 | init_header_cwf( &headerCWF ); |
|
227 | init_header_cwf( &headerCWF ); | |
226 | init_header_swf( &headerSWF ); |
|
228 | init_header_swf( &headerSWF ); | |
@@ -291,6 +293,20 rtems_task send_task( rtems_task_argumen | |||||
291 | } |
|
293 | } | |
292 | else if ( incomingData[0] == CCSDS_DESTINATION_ID ) // the incoming message is a ccsds packet |
|
294 | else if ( incomingData[0] == CCSDS_DESTINATION_ID ) // the incoming message is a ccsds packet | |
293 | { |
|
295 | { | |
|
296 | sidAsUnsignedChar = (unsigned char) incomingData[ PACKET_POS_PA_LFR_SID_PKT ]; | |||
|
297 | sid = sidAsUnsignedChar; | |||
|
298 | // SET THE SEQUENCE_CNT PARAMETER IN CASE OF BP0 OR BP1 PACKETS | |||
|
299 | if ( (sid == SID_NORM_BP1_F0) || (sid == SID_NORM_BP1_F1) || (sid == SID_NORM_BP1_F2) | |||
|
300 | || (sid == SID_NORM_BP2_F0) || (sid == SID_NORM_BP2_F1) || (sid == SID_NORM_BP2_F2) | |||
|
301 | || (sid == SID_BURST_BP1_F0) || (sid == SID_BURST_BP1_F1) | |||
|
302 | || (sid == SID_BURST_BP2_F0) || (sid == SID_BURST_BP2_F1) | |||
|
303 | || (sid == SID_SBM1_BP1_F0) || (sid == SID_SBM1_BP2_F0) | |||
|
304 | || (sid == SID_SBM2_BP1_F0) || (sid == SID_SBM2_BP1_F1) | |||
|
305 | || (sid == SID_SBM2_BP2_F0) || (sid == SID_SBM2_BP2_F1)) | |||
|
306 | { | |||
|
307 | increment_seq_counter_source_id( (unsigned char*) &incomingData[ PACKET_POS_SEQUENCE_CNT ], sid ); | |||
|
308 | } | |||
|
309 | ||||
294 | status = write( fdSPW, incomingData, size ); |
|
310 | status = write( fdSPW, incomingData, size ); | |
295 | if (status == -1){ |
|
311 | if (status == -1){ | |
296 | PRINTF2("in SEND *** (2.a) ERRNO = %d, size = %d\n", errno, size) |
|
312 | PRINTF2("in SEND *** (2.a) ERRNO = %d, size = %d\n", errno, size) |
@@ -427,8 +427,6 void BP_send(char *data, rtems_id queue_ | |||||
427 | { |
|
427 | { | |
428 | rtems_status_code status; |
|
428 | rtems_status_code status; | |
429 |
|
429 | |||
430 | // SET THE SEQUENCE_CNT PARAMETER |
|
|||
431 | increment_seq_counter_source_id( (unsigned char*) &data[ PACKET_POS_SEQUENCE_CNT ], sid ); |
|
|||
432 | // SEND PACKET |
|
430 | // SEND PACKET | |
433 | status = rtems_message_queue_send( queue_id, data, nbBytesToSend); |
|
431 | status = rtems_message_queue_send( queue_id, data, nbBytesToSend); | |
434 | if (status != RTEMS_SUCCESSFUL) |
|
432 | if (status != RTEMS_SUCCESSFUL) |
@@ -1367,7 +1367,7 void increment_seq_counter_source_id( un | |||||
1367 | } |
|
1367 | } | |
1368 | } |
|
1368 | } | |
1369 |
|
1369 | |||
1370 | //*********************************** |
|
1370 | //************************************* | |
1371 |
// RES |
|
1371 | // RESTORE THE MODE OF THE CALLING TASK | |
1372 | status = rtems_task_mode( initial_mode_set, RTEMS_PREEMPT_MASK, ¤t_mode_set ); |
|
1372 | status = rtems_task_mode( initial_mode_set, RTEMS_PREEMPT_MASK, ¤t_mode_set ); | |
1373 | } |
|
1373 | } |
General Comments 0
You need to be logged in to leave comments.
Login now