Repo for COM_MNG_TMTC_SIMPLE for integration with adf

Dependencies:   mbed-rtos mbed

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Revision:
8:d1951bbdcdd8
Parent:
6:79d422d1ed42
diff -r 4e744637b2e8 -r d1951bbdcdd8 Structures.h
--- a/Structures.h	Thu Dec 31 08:25:11 2015 +0000
+++ b/Structures.h	Thu Dec 31 08:39:43 2015 +0000
@@ -4,12 +4,6 @@
     #define TM_LONG_SIZE 134
     #define TM_SHORT_SIZE 13
 
-    #define SHORT_TC_CODE 0
-    #define LONG_TC_CODE 1
-
-    #define SHORT_TM_CODE 1
-    #define LONG_TM_CODE 0
-
 // COM_RX
     #define RX_BUFFER_LENGTH 60
     // 60+4 = 64
@@ -51,19 +45,19 @@
 #define GETpacket_seq_count(x) (x->TC_string[0])
 
 //x should be a Base_tc pointer
-//y should be a 8-bit number with relevant data in LSB
+//y should be a 16-bit number with relevant data in LSB
 //use in a seperate line with ; at the end: similar to a function
 #define PUTshort_or_long(x,y) x->flags = ( (x->flags) & ~(SHORT_LONG_TC_MASK)) | ( (y << 4) & SHORT_LONG_TC_MASK )
 #define PUTcrc_pass(x,y) x->flags = ( (x->flags) & ~(CRC_MASK)) | ( (y << 3) & CRC_MASK)
 #define PUTexec_status(x,y) x->flags = ( (x->flags) & ~(EXEC_STATUS_MASK)) | ( y & EXEC_STATUS_MASK)
 
-//PARENT TELECOMMAND CLASS 
+//PARENT TELECOMMAND CLASS
 class Base_tc{
 public:
     uint8_t flags;
     uint8_t *TC_string;
     Base_tc *next_TC;
-    
+
     virtual ~Base_tc(){}
 };
 
@@ -76,7 +70,7 @@
         TC_string = fix_str;
         flags = 0;
     }
-    
+
     ~Short_tc(){}
 };
 
@@ -89,7 +83,7 @@
         TC_string = fix_str;
         flags = 0;
     }
-    
+
     ~Long_tc(){}
 };
 
@@ -113,7 +107,7 @@
     uint8_t fields;
     uint8_t *TM_string;
     Base_tm *next_TM;
-    
+
     virtual ~Base_tm(){}
 };
 
@@ -124,11 +118,11 @@
     uint8_t fix_str[TM_LONG_SIZE];
 public:
     Long_tm(){
-        TM_string = fix_str;
+        this->TM_string = fix_str;
         // type 0
         fields = 0;
     }
-    
+
     ~Long_tm(){}
 };
 
@@ -139,10 +133,10 @@
     uint8_t fix_str[TM_SHORT_SIZE];
 public:
     Short_tm(){
-        TM_string = fix_str;
+        this->TM_string = fix_str;
         // type 1
         fields = 0x10;
     }
-    
+
     ~Short_tm(){}
-};
\ No newline at end of file
+};