##// END OF EJS Templates
Bug 709...
paul -
r73:8d0190b179ad 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: Wed Nov 13 08:18:19 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 08:56:42 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=22 -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=23 -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
@@ -7,11 +7,11 CONFIG -= qt
7 7 include(./sparc.pri)
8 8
9 9 # flight software version
10 SWVERSION=-0-22
10 SWVERSION=-0-23
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=22
14 DEFINES += SW_VERSION_N4=23
15 15
16 16 contains( CONFIG, verbose ) {
17 17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
@@ -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-13T13:39:43. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-14T09:19:44. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -53,8 +53,8 int suspend_science_tasks();
53 53
54 54 // other functions
55 55 void updateLFRCurrentMode();
56 void update_last_TC_exe(ccsdsTelecommandPacket_t *TC);
57 void update_last_TC_rej(ccsdsTelecommandPacket_t *TC);
56 void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time);
57 void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char *time);
58 58 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id);
59 59
60 60 #endif // TC_HANDLER_H_INCLUDED
@@ -11,7 +11,7 extern time_management_regs_t *time_mana
11 11 extern Packet_TM_LFR_HK_t housekeeping_packet;
12 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 15 int send_tm_lfr_tc_exe_inconsistent(ccsdsTelecommandPacket_t *TC, rtems_id queue_id,
16 16 unsigned char byte_position, unsigned char rcv_value);
17 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 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 682 housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0];
683 683 housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1];
@@ -685,15 +685,15 void update_last_TC_exe(ccsdsTelecommand
685 685 housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType;
686 686 housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00;
687 687 housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType;
688 housekeeping_packet.hk_lfr_last_exe_tc_time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
689 housekeeping_packet.hk_lfr_last_exe_tc_time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
690 housekeeping_packet.hk_lfr_last_exe_tc_time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
691 housekeeping_packet.hk_lfr_last_exe_tc_time[3] = (unsigned char) (time_management_regs->coarse_time);
692 housekeeping_packet.hk_lfr_last_exe_tc_time[4] = (unsigned char) (time_management_regs->fine_time>>8);
693 housekeeping_packet.hk_lfr_last_exe_tc_time[5] = (unsigned char) (time_management_regs->fine_time);
688 housekeeping_packet.hk_lfr_last_exe_tc_time[0] = time[0];
689 housekeeping_packet.hk_lfr_last_exe_tc_time[1] = time[1];
690 housekeeping_packet.hk_lfr_last_exe_tc_time[2] = time[2];
691 housekeeping_packet.hk_lfr_last_exe_tc_time[3] = time[3];
692 housekeeping_packet.hk_lfr_last_exe_tc_time[4] = time[4];
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 698 housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0];
699 699 housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1];
@@ -701,17 +701,26 void update_last_TC_rej(ccsdsTelecommand
701 701 housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType;
702 702 housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00;
703 703 housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType;
704 housekeeping_packet.hk_lfr_last_rej_tc_time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
705 housekeeping_packet.hk_lfr_last_rej_tc_time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
706 housekeeping_packet.hk_lfr_last_rej_tc_time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
707 housekeeping_packet.hk_lfr_last_rej_tc_time[3] = (unsigned char) (time_management_regs->coarse_time);
708 housekeeping_packet.hk_lfr_last_rej_tc_time[4] = (unsigned char) (time_management_regs->fine_time>>8);
709 housekeeping_packet.hk_lfr_last_rej_tc_time[5] = (unsigned char) (time_management_regs->fine_time);
704 housekeeping_packet.hk_lfr_last_rej_tc_time[0] = time[0];
705 housekeeping_packet.hk_lfr_last_rej_tc_time[1] = time[1];
706 housekeeping_packet.hk_lfr_last_rej_tc_time[2] = time[2];
707 housekeeping_packet.hk_lfr_last_rej_tc_time[3] = time[3];
708 housekeeping_packet.hk_lfr_last_rej_tc_time[4] = time[4];
709 housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5];
710 710 }
711 711
712 712 void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id)
713 713 {
714 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 724 if (result == LFR_SUCCESSFUL)
716 725 {
717 726 if ( !( (TC->serviceType==TC_TYPE_TIME) && (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) )
@@ -719,9 +728,9 void close_action(ccsdsTelecommandPacket
719 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 734 val = housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_exe_tc_lfr_cnt[1];
726 735 val++;
727 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 739 else
731 740 {
732 update_last_TC_rej( TC );
741 update_last_TC_rej( TC, time );
733 742 val = housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] * 256 + housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[1];
734 743 val++;
735 744 housekeeping_packet.hk_dpu_rej_tc_lfr_cnt[0] = (unsigned char) (val >> 8);
@@ -15,7 +15,7
15 15
16 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 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 51 TM.serviceType = TM_TYPE_TC_EXE;
52 52 TM.serviceSubType = TM_SUBTYPE_EXE_OK;
53 53 TM.destinationID = TC->sourceID;
54 TM.time[0] = (unsigned char) (time_management_regs->coarse_time>>24);
55 TM.time[1] = (unsigned char) (time_management_regs->coarse_time>>16);
56 TM.time[2] = (unsigned char) (time_management_regs->coarse_time>>8);
57 TM.time[3] = (unsigned char) (time_management_regs->coarse_time);
58 TM.time[4] = (unsigned char) (time_management_regs->fine_time>>8);
59 TM.time[5] = (unsigned char) (time_management_regs->fine_time);
54 TM.time[0] = time[0];
55 TM.time[1] = time[1];
56 TM.time[2] = time[2];
57 TM.time[3] = time[3];
58 TM.time[4] = time[4];
59 TM.time[5] = time[5];
60 60 //
61 61 TM.telecommand_pkt_id[0] = TC->packetID[0];
62 62 TM.telecommand_pkt_id[1] = TC->packetID[1];
General Comments 0
You need to be logged in to leave comments. Login now