##// END OF EJS Templates
Message queue implemented for valid TC processing...
Message queue implemented for valid TC processing Default action coded

File last commit:

r9:515486994c1d default
r9:515486994c1d default
Show More
tc_handler.h
48 lines | 1.6 KiB | text/x-c | CLexer
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 #ifndef TC_HANDLER_H_INCLUDED
#define TC_HANDLER_H_INCLUDED
#include <rtems.h>
#include <stdio.h>
#include <unistd.h> // for the read call
#include <sys/ioctl.h> // for the ioctl call
#include <ccsds_types.h>
#include <grspw.h>
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 #include <fsw_init.h>
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
extern int fdSPW;
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 extern rtems_name misc_name[ ];
extern rtems_name misc_id[ ];
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 extern rtems_id Task_id[ ]; /* array of task ids */
unsigned char currentTC_LEN_RCV[2]; // SHALL be equal to the current TC packet estimated packet length field
unsigned char currentTC_COMPUTED_CRC[2];
unsigned int currentTC_LEN_RCV_AsUnsignedInt;
unsigned int currentTM_length;
unsigned char currentTC_processedFlag;
paul@pc-solar1.lab-lpp.local
Minor updates
r7 //**********************
// GENERAL USE FUNCTIONS
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 unsigned int lookUpTableForCRC[256];
void InitLookUpTableForCRC();
void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData);
paul@pc-solar1.lab-lpp.local
Minor updates
r7 //*********************
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 // ACCEPTANCE FUNCTIONS
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 unsigned char acceptTM(ccsdsTelecommandPacket_t * TMPacket, unsigned int tc_len_recv);
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
unsigned char TM_build_header( enum TM_TYPE tm_type, unsigned int SID, unsigned int packetLength,
unsigned int coarseTime, unsigned int fineTime, TMHeader_t *TMHeader);
unsigned char TM_build_data(ccsdsTelecommandPacket_t *TC, char* data, unsigned int SID, unsigned char *computed_CRC);
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 int TC_checker(ccsdsTelecommandPacket_t *TC, unsigned int TC_LEN_RCV);
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul@pc-solar1.lab-lpp.local
Minor updates
r7 //***********
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 // RTEMS TASK
paul@pc-solar1.lab-lpp.local
Message queue implemented for valid TC processing...
r9 rtems_task recv_task( rtems_task_argument unused );
rtems_task actn_task( rtems_task_argument unused );
int create_message_queue();
//***********
// TC ACTIONS
int default_action(ccsdsTelecommandPacket_t *TC);
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
#endif // TC_HANDLER_H_INCLUDED