@@ -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 Oct 17 1 |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Oct 17 13:22:13 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 |
@@ -10,7 +10,7 | |||
|
10 | 10 | |
|
11 | 11 | CC = sparc-rtems-gcc |
|
12 | 12 | CXX = sparc-rtems-g++ |
|
13 |
DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=1 |
|
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=16 -DPRINT_MESSAGES_ON_CONSOLE | |
|
14 | 14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | 15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -7,11 +7,11 CONFIG -= qt | |||
|
7 | 7 | include(./sparc.pri) |
|
8 | 8 | |
|
9 | 9 | # flight software version |
|
10 |
SWVERSION=-0-1 |
|
|
10 | SWVERSION=-0-16 | |
|
11 | 11 | DEFINES += SW_VERSION_N1=0 |
|
12 | 12 | DEFINES += SW_VERSION_N2=0 |
|
13 | 13 | DEFINES += SW_VERSION_N3=0 |
|
14 |
DEFINES += SW_VERSION_N4=1 |
|
|
14 | DEFINES += SW_VERSION_N4=16 | |
|
15 | 15 | |
|
16 | 16 | contains( CONFIG, verbose ) { |
|
17 | 17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
@@ -67,5 +67,5 HEADERS += \ | |||
|
67 | 67 | ../header/fsw_spacewire.h \ |
|
68 | 68 | ../header/tm_byte_positions.h \ |
|
69 | 69 | ../header/tc_load_dump_parameters.h \ |
|
70 | ../header/tm_lfr_tc_exe | |
|
70 | ../header/tm_lfr_tc_exe.h | |
|
71 | 71 |
@@ -143,8 +143,8 | |||
|
143 | 143 | #define ACTION_MSG_PKTS_MAX_SIZE (PACKET_LENGTH_PARAMETER_DUMP + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES) |
|
144 | 144 | #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options |
|
145 | 145 | |
|
146 |
#define QUEUE_ |
|
|
147 |
#define QUEUE_ |
|
|
146 | #define QUEUE_RECV 0 | |
|
147 | #define QUEUE_SEND 1 | |
|
148 | 148 | |
|
149 | 149 | //******* |
|
150 | 150 | // MACROS |
@@ -26,7 +26,7 void updateLFRCurrentMode(); | |||
|
26 | 26 | |
|
27 | 27 | //********************* |
|
28 | 28 | // ACCEPTANCE FUNCTIONS |
|
29 |
int tc_acceptance(ccsdsTelecommandPacket_t *TC, unsigned int TC_LEN_RCV, rtems_id queue_ |
|
|
29 | int tc_acceptance(ccsdsTelecommandPacket_t *TC, unsigned int TC_LEN_RCV, rtems_id queue_recv_id, rtems_id queue_send_id); | |
|
30 | 30 | int tc_parser(ccsdsTelecommandPacket_t * TCPacket, unsigned int TC_LEN_RCV); |
|
31 | 31 | int tc_check_type( unsigned char packetType ); |
|
32 | 32 | int tc_check_subtype( unsigned char packetType ); |
@@ -264,8 +264,8 int create_names( void ) // create all n | |||
|
264 | 264 | // rate monotonic period name |
|
265 | 265 | HK_name = rtems_build_name( 'H', 'O', 'U', 'S' ); |
|
266 | 266 | |
|
267 |
misc_name[QUEUE_ |
|
|
268 |
misc_name[QUEUE_ |
|
|
267 | misc_name[QUEUE_RECV] = rtems_build_name( 'Q', 'U', 'E', 'U' ); | |
|
268 | misc_name[QUEUE_SEND] = rtems_build_name( 'P', 'K', 'T', 'S' ); | |
|
269 | 269 | |
|
270 | 270 | return RTEMS_SUCCESSFUL; |
|
271 | 271 | } |
@@ -553,21 +553,21 rtems_status_code create_message_queues( | |||
|
553 | 553 | rtems_status_code ret; |
|
554 | 554 | rtems_id queue_id; |
|
555 | 555 | |
|
556 | // create the queue for handling valid TCs | |
|
557 | status = rtems_message_queue_create( misc_name[QUEUE_RECV], ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE, | |
|
558 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
|
559 | if (status != RTEMS_SUCCESSFUL) { | |
|
560 | ret = status; | |
|
561 | BOOT_PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", ret) | |
|
562 | } | |
|
563 | ||
|
556 | 564 | // create the queue for handling TM packet sending |
|
557 |
ret = rtems_message_queue_create( misc_name[QUEUE_ |
|
|
565 | ret = rtems_message_queue_create( misc_name[QUEUE_SEND], ACTION_MSG_PKTS_COUNT, | |
|
558 | 566 | ACTION_MSG_PKTS_MAX_SIZE, |
|
559 | 567 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
560 | 568 | if (ret != RTEMS_SUCCESSFUL) { |
|
561 | 569 | BOOT_PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", ret) |
|
562 | 570 | } |
|
563 | 571 | |
|
564 | // create the queue for handling valid TCs | |
|
565 | status = rtems_message_queue_create( misc_name[QUEUE_QUEU], ACTION_MSG_QUEUE_COUNT, CCSDS_TC_PKT_MAX_SIZE, | |
|
566 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
|
567 | if (status != RTEMS_SUCCESSFUL) { | |
|
568 | ret = status; | |
|
569 | BOOT_PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", ret) | |
|
570 | } | |
|
571 | ||
|
572 | return ret; | |
|
572 | return ret; | |
|
573 | 573 | } |
@@ -173,7 +173,7 rtems_task hous_task(rtems_task_argument | |||
|
173 | 173 | spw_ioctl_send.data = (char*) &housekeeping_packet; |
|
174 | 174 | spw_ioctl_send.options = 0; |
|
175 | 175 | |
|
176 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
176 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
|
177 | 177 | if (status != RTEMS_SUCCESSFUL) |
|
178 | 178 | { |
|
179 | 179 | PRINTF1("in HOUS *** ERR %d\n", status) |
@@ -251,7 +251,7 rtems_task send_task( rtems_task_argumen | |||
|
251 | 251 | u_int32_t count; |
|
252 | 252 | rtems_id queue_id; |
|
253 | 253 | |
|
254 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
254 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
|
255 | 255 | if (status != RTEMS_SUCCESSFUL) |
|
256 | 256 | { |
|
257 | 257 | PRINTF1("in SEND *** ERR getting queue id, %d\n", status) |
@@ -318,7 +318,7 rtems_id get_pkts_queue_id( void ) | |||
|
318 | 318 | rtems_id queue_id; |
|
319 | 319 | rtems_status_code status; |
|
320 | 320 | |
|
321 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
321 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
|
322 | 322 | if (status != RTEMS_SUCCESSFUL) |
|
323 | 323 | { |
|
324 | 324 | PRINTF1("in get_pkts_queue_id *** ERR %d\n", status) |
@@ -201,7 +201,7 rtems_task matr_task(rtems_task_argument | |||
|
201 | 201 | |
|
202 | 202 | init_header_asm( &headerASM ); |
|
203 | 203 | |
|
204 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
204 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
|
205 | 205 | if (status != RTEMS_SUCCESSFUL) |
|
206 | 206 | { |
|
207 | 207 | PRINTF1("in MATR *** ERR getting queue id, %d\n", status) |
@@ -119,14 +119,14 void updateLFRCurrentMode() | |||
|
119 | 119 | |
|
120 | 120 | //********************* |
|
121 | 121 | // ACCEPTANCE FUNCTIONS |
|
122 |
int tc_acceptance(ccsdsTelecommandPacket_t *TC, unsigned int tc_len_recv, rtems_id queue_ |
|
|
122 | int tc_acceptance(ccsdsTelecommandPacket_t *TC, unsigned int tc_len_recv, rtems_id queue_recv_id, rtems_id queue_send_id) | |
|
123 | 123 | { |
|
124 | 124 | /** This function executes the TeleCommand acceptance steps. |
|
125 | 125 | * |
|
126 | 126 | * @param TC points to the TeleCommand packet which is under investigation. |
|
127 | 127 | * @param tc_len_recv contains the length of the packet that has been received. |
|
128 |
* @param queue_ |
|
|
129 |
* @param queue_ |
|
|
128 | * @param queue_recv_id is the id of the rtems queue in which messages are written if the acceptance is not successful | |
|
129 | * @param queue_send_id is the id of the rtems queue in which messages are written if the acceptance is successful | |
|
130 | 130 | * @return status code |
|
131 | 131 | * |
|
132 | 132 | * The acceptance steps can result in two different actions. |
@@ -145,10 +145,10 int tc_acceptance(ccsdsTelecommandPacket | |||
|
145 | 145 | if ( (parserCode == ILLEGAL_APID) | (parserCode == WRONG_LEN_PACKET) | (parserCode == INCOR_CHECKSUM) |
|
146 | 146 | | (parserCode == ILL_TYPE) | (parserCode == ILL_SUBTYPE) | (parserCode == WRONG_APP_DATA) ) |
|
147 | 147 | { // send TM_LFR_TC_EXE_CORRUPTED |
|
148 |
send_tm_lfr_tc_exe_corrupted( TC, queue_ |
|
|
148 | send_tm_lfr_tc_exe_corrupted( TC, queue_send_id, computed_CRC, currentTC_LEN_RCV ); | |
|
149 | 149 | } |
|
150 | 150 | else { // send valid TC to the action launcher |
|
151 |
status = rtems_message_queue_send( queue_ |
|
|
151 | status = rtems_message_queue_send( queue_recv_id, TC, tc_len_recv + CCSDS_TC_TM_PACKET_OFFSET + 3); | |
|
152 | 152 | ret = LFR_SUCCESSFUL; |
|
153 | 153 | } |
|
154 | 154 | return ret; |
@@ -453,23 +453,23 rtems_task recv_task( rtems_task_argumen | |||
|
453 | 453 | ccsdsTelecommandPacket_t currentTC; |
|
454 | 454 | char data[100]; |
|
455 | 455 | rtems_status_code status; |
|
456 |
rtems_id queue_ |
|
|
457 |
rtems_id queue_ |
|
|
456 | rtems_id queue_recv_id; | |
|
457 | rtems_id queue_send_id; | |
|
458 | 458 | |
|
459 | 459 | for(i=0; i<100; i++) data[i] = 0; |
|
460 | 460 | |
|
461 | 461 | initLookUpTableForCRC(); // the table is used to compute Cyclic Redundancy Codes |
|
462 | 462 | |
|
463 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
463 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_recv_id ); | |
|
464 | 464 | if (status != RTEMS_SUCCESSFUL) |
|
465 | 465 | { |
|
466 |
PRINTF1("in RECV *** ERR getting |
|
|
466 | PRINTF1("in RECV *** ERR getting QUEUE_RECV id, %d\n", status) | |
|
467 | 467 | } |
|
468 | 468 | |
|
469 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
469 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_send_id ); | |
|
470 | 470 | if (status != RTEMS_SUCCESSFUL) |
|
471 | 471 | { |
|
472 |
PRINTF1("in RECV *** ERR getting |
|
|
472 | PRINTF1("in RECV *** ERR getting QUEUE_SEND id, %d\n", status) | |
|
473 | 473 | } |
|
474 | 474 | |
|
475 | 475 | BOOT_PRINTF("in RECV *** \n") |
@@ -489,7 +489,7 rtems_task recv_task( rtems_task_argumen | |||
|
489 | 489 | currentTC_LEN_RCV[1] = (unsigned char) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // build the corresponding packet size field |
|
490 | 490 | currentTC_LEN_RCV_AsUnsignedInt = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes |
|
491 | 491 | // CHECK THE TC |
|
492 |
tc_acceptance(¤tTC, currentTC_LEN_RCV_AsUnsignedInt, queue_ |
|
|
492 | tc_acceptance(¤tTC, currentTC_LEN_RCV_AsUnsignedInt, queue_recv_id, queue_send_id); | |
|
493 | 493 | } |
|
494 | 494 | } |
|
495 | 495 | } |
@@ -514,13 +514,13 rtems_task actn_task( rtems_task_argumen | |||
|
514 | 514 | rtems_id queue_rcv_id; |
|
515 | 515 | rtems_id queue_snd_id; |
|
516 | 516 | |
|
517 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
517 | status = rtems_message_queue_ident( misc_name[QUEUE_RECV], 0, &queue_rcv_id ); | |
|
518 | 518 | if (status != RTEMS_SUCCESSFUL) |
|
519 | 519 | { |
|
520 | 520 | PRINTF1("in ACTN *** ERR getting queue_rcv_id %d\n", status) |
|
521 | 521 | } |
|
522 | 522 | |
|
523 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
523 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_snd_id ); | |
|
524 | 524 | if (status != RTEMS_SUCCESSFUL) |
|
525 | 525 | { |
|
526 | 526 | PRINTF1("in ACTN *** ERR getting queue_snd_id %d\n", status) |
@@ -222,7 +222,7 rtems_task wfrm_task(rtems_task_argument | |||
|
222 | 222 | |
|
223 | 223 | init_waveforms(); |
|
224 | 224 | |
|
225 |
status = rtems_message_queue_ident( misc_name[QUEUE_ |
|
|
225 | status = rtems_message_queue_ident( misc_name[QUEUE_SEND], 0, &queue_id ); | |
|
226 | 226 | if (status != RTEMS_SUCCESSFUL) |
|
227 | 227 | { |
|
228 | 228 | PRINTF1("in WFRM *** ERR getting queue id, %d\n", status) |
General Comments 0
You need to be logged in to leave comments.
Login now