@@ -1,6 +1,6 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 08:56:42 2013 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
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 | CC = sparc-rtems-gcc |
|
11 | CC = sparc-rtems-gcc | |
12 | CXX = sparc-rtems-g++ |
|
12 | CXX = sparc-rtems-g++ | |
13 |
DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=2 |
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=23 -DPRINT_MESSAGES_ON_CONSOLE | |
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
@@ -7,11 +7,11 CONFIG -= qt | |||||
7 | include(./sparc.pri) |
|
7 | include(./sparc.pri) | |
8 |
|
8 | |||
9 | # flight software version |
|
9 | # flight software version | |
10 |
SWVERSION=-0-2 |
|
10 | SWVERSION=-0-23 | |
11 | DEFINES += SW_VERSION_N1=0 |
|
11 | DEFINES += SW_VERSION_N1=0 | |
12 | DEFINES += SW_VERSION_N2=0 |
|
12 | DEFINES += SW_VERSION_N2=0 | |
13 | DEFINES += SW_VERSION_N3=0 |
|
13 | DEFINES += SW_VERSION_N3=0 | |
14 |
DEFINES += SW_VERSION_N4=2 |
|
14 | DEFINES += SW_VERSION_N4=23 | |
15 |
|
15 | |||
16 | contains( CONFIG, verbose ) { |
|
16 | contains( CONFIG, verbose ) { | |
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
|
17 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
@@ -1,6 +1,6 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 2.8.1, 2013-11-1 |
|
3 | <!-- Written by QtCreator 2.8.1, 2013-11-14T09:19:44. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -53,8 +53,8 int suspend_science_tasks(); | |||||
53 |
|
53 | |||
54 | // other functions |
|
54 | // other functions | |
55 | void updateLFRCurrentMode(); |
|
55 | void updateLFRCurrentMode(); | |
56 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC); |
|
56 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time); | |
57 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC); |
|
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); | |
59 |
|
59 | |||
60 | #endif // TC_HANDLER_H_INCLUDED |
|
60 | #endif // TC_HANDLER_H_INCLUDED |
@@ -11,7 +11,7 extern time_management_regs_t *time_mana | |||||
11 | extern Packet_TM_LFR_HK_t housekeeping_packet; |
|
11 | extern Packet_TM_LFR_HK_t housekeeping_packet; | |
12 | extern unsigned short sequenceCounters_TC_EXE[]; |
|
12 | extern unsigned short sequenceCounters_TC_EXE[]; | |
13 |
|
13 | |||
14 | int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
14 | int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); | |
15 | int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, |
|
15 | int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, | |
16 | unsigned char byte_position, unsigned char rcv_value); |
|
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); |
|
17 | int send_tm_lfr_tc_exe_not_executable(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
@@ -677,7 +677,7 int suspend_science_tasks() | |||||
677 |
|
677 | |||
678 | //**************** |
|
678 | //**************** | |
679 | // CLOSING ACTIONS |
|
679 | // CLOSING ACTIONS | |
680 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC) |
|
680 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time) | |
681 | { |
|
681 | { | |
682 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; |
|
682 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; | |
683 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; |
|
683 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; | |
@@ -685,15 +685,15 void update_last_TC_exe(ccsdsTelecommand | |||||
685 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; |
|
685 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; | |
686 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; |
|
686 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; | |
687 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; |
|
687 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; | |
688 |
housekeeping_packet.hk_lfr_last_exe_tc_time[0] = |
|
688 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = time[0]; | |
689 |
housekeeping_packet.hk_lfr_last_exe_tc_time[1] = |
|
689 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = time[1]; | |
690 |
housekeeping_packet.hk_lfr_last_exe_tc_time[2] = |
|
690 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = time[2]; | |
691 |
housekeeping_packet.hk_lfr_last_exe_tc_time[3] = |
|
691 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = time[3]; | |
692 |
housekeeping_packet.hk_lfr_last_exe_tc_time[4] = |
|
692 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = time[4]; | |
693 |
housekeeping_packet.hk_lfr_last_exe_tc_time[5] = |
|
693 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = time[5]; | |
694 | } |
|
694 | } | |
695 |
|
695 | |||
696 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC) |
|
696 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time) | |
697 | { |
|
697 | { | |
698 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; |
|
698 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; | |
699 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; |
|
699 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; | |
@@ -701,17 +701,26 void update_last_TC_rej(ccsdsTelecommand | |||||
701 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; |
|
701 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; | |
702 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; |
|
702 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; | |
703 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; |
|
703 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; | |
704 |
housekeeping_packet.hk_lfr_last_rej_tc_time[0] = |
|
704 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = time[0]; | |
705 |
housekeeping_packet.hk_lfr_last_rej_tc_time[1] = |
|
705 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = time[1]; | |
706 |
housekeeping_packet.hk_lfr_last_rej_tc_time[2] = |
|
706 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = time[2]; | |
707 |
housekeeping_packet.hk_lfr_last_rej_tc_time[3] = |
|
707 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = time[3]; | |
708 |
housekeeping_packet.hk_lfr_last_rej_tc_time[4] = |
|
708 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = time[4]; | |
709 |
housekeeping_packet.hk_lfr_last_rej_tc_time[5] = |
|
709 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5]; | |
710 | } |
|
710 | } | |
711 |
|
711 | |||
712 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id) |
|
712 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id) | |
713 | { |
|
713 | { | |
714 | unsigned int val = 0; |
|
714 | 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 | ||||
715 | if (result == LFR_SUCCESSFUL) |
|
724 | if (result == LFR_SUCCESSFUL) | |
716 | { |
|
725 | { | |
717 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) |
|
726 | if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) | |
@@ -719,9 +728,9 void close_action(ccsdsTelecommandPacket | |||||
719 | !( (TC->serviceType==TC_TYPE_GEN) && (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) |
|
728 | !( (TC->serviceType==TC_TYPE_GEN) && (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) | |
720 | ) |
|
729 | ) | |
721 | { |
|
730 | { | |
722 | send_tm_lfr_tc_exe_success( TC, queue_id ); |
|
731 | send_tm_lfr_tc_exe_success( TC, queue_id, time ); | |
723 | } |
|
732 | } | |
724 | update_last_TC_exe( TC ); |
|
733 | update_last_TC_exe( TC, time ); | |
725 | val = housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1]; |
|
734 | val = housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1]; | |
726 | val++; |
|
735 | val++; | |
727 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] = (unsigned char) (val >> 8); |
|
736 | housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] = (unsigned char) (val >> 8); | |
@@ -729,7 +738,7 void close_action(ccsdsTelecommandPacket | |||||
729 | } |
|
738 | } | |
730 | else |
|
739 | else | |
731 | { |
|
740 | { | |
732 | update_last_TC_rej( TC ); |
|
741 | update_last_TC_rej( TC, time ); | |
733 | val = housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1]; |
|
742 | val = housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1]; | |
734 | val++; |
|
743 | val++; | |
735 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] = (unsigned char) (val >> 8); |
|
744 | housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] = (unsigned char) (val >> 8); |
@@ -15,7 +15,7 | |||||
15 |
|
15 | |||
16 | #include "tm_lfr_tc_exe.h" |
|
16 | #include "tm_lfr_tc_exe.h" | |
17 |
|
17 | |||
18 | int send_tm_lfr_tc_exe_success( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ) |
|
18 | int send_tm_lfr_tc_exe_success( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ) | |
19 | { |
|
19 | { | |
20 | /** This function sends a TM_LFR_TC_EXE_SUCCESS packet in the dedicated RTEMS message queue. |
|
20 | /** This function sends a TM_LFR_TC_EXE_SUCCESS packet in the dedicated RTEMS message queue. | |
21 | * |
|
21 | * | |
@@ -51,12 +51,12 int send_tm_lfr_tc_exe_success( ccsdsTel | |||||
51 | TM.serviceType = TM_TYPE_TC_EXE; |
|
51 | TM.serviceType = TM_TYPE_TC_EXE; | |
52 | TM.serviceSubType = TM_SUBTYPE_EXE_OK; |
|
52 | TM.serviceSubType = TM_SUBTYPE_EXE_OK; | |
53 | TM.destinationID = TC->sourceID; |
|
53 | TM.destinationID = TC->sourceID; | |
54 | TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
54 | TM.time[0] = time[0]; | |
55 | TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
55 | TM.time[1] = time[1]; | |
56 | TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
56 | TM.time[2] = time[2]; | |
57 | TM.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
57 | TM.time[3] = time[3]; | |
58 | TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
58 | TM.time[4] = time[4]; | |
59 | TM.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
59 | TM.time[5] = time[5]; | |
60 | // |
|
60 | // | |
61 | TM.telecommand_pkt_id[0] = TC->packetID[0]; |
|
61 | TM.telecommand_pkt_id[0] = TC->packetID[0]; | |
62 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
|
62 | TM.telecommand_pkt_id[1] = TC->packetID[1]; |
General Comments 0
You need to be logged in to leave comments.
Login now