Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: COM_SND_TM.h
- Revision:
- 53:18db568f1098
- Parent:
- 52:0bd68655c651
- Child:
- 57:bf998cb2a104
- Child:
- 69:20f09a0c3fd2
diff -r 0bd68655c651 -r 18db568f1098 COM_SND_TM.h
--- a/COM_SND_TM.h Thu Jan 14 06:16:42 2016 +0000
+++ b/COM_SND_TM.h Thu Jan 14 10:32:40 2016 +0000
@@ -121,26 +121,6 @@
parameter: type 0 or 1
return: pointer of the first node having same type
*/
-// Base_tm* first_type_structure(int type){
-// Base_tm* temp_ptr = head_ptr;
-// if(type == 0){
-// while(GETshort_or_long_tm(temp_ptr->fields) == 1){
-// temp_ptr = temp_ptr->next_TM;
-// if(temp_ptr == NULL){
-// return NULL ;
-// }
-// }
-// }
-// else if(type == 1){
-// while(GETshort_or_long_tm(temp_ptr->fields) == 0){
-// temp_ptr = temp_ptr->next_TM;
-// if(temp_ptr == NULL){
-// return NULL;
-// }
-// }
-// }
-// return temp_ptr;
-// }
#define exor(ptr) { for(int i=0 ; i<134; i++ ) ptr[i]=ptr[i]^EXOR_SEQ[i];}
@@ -197,33 +177,6 @@
}
-// unsigned char * type1_frame(){
-// int i=4;
-// if(type1_frame_flag){
-// T1F_pointer = first_type_structure(1);
-// T1F_counter = 0;
-// type1_frame_flag = false;
-// }
-// for(i = 4 ; (i < 134) && (T1F_pointer != NULL) ; i++){
-// TMframe_type1[i] = T1F_pointer->TM_string[T1F_counter];
-// if(T1F_counter++ == 12){
-// T1F_counter = 0;
-// T1F_pointer = next_type_structure(T1F_pointer);
-// }
-// }
-// // header
-// TMframe_type1[0] = 1<<7 + ( (i-4)/10 )<<3; //( (i-4)/10 ) gives number of packets in the frame
-// //insert time ;
-// TMframe_type1[3] = CRC::crc16_gen(TMframe_type1,3);
-// //end header
-// if(T1F_pointer == NULL && i>12){
-// for( ; i < 134 ; i++){ //repeating ;ast packet to fill up the extra space
-// TMframe_type1[i] = TMframe_type1[i-13];
-// }
-// }
-// return TMframe_type1;
-// }
-
bool type0_frame_flag;
@@ -237,19 +190,7 @@
}\
ptr = T0F_pointer->TM_string;\
}
-
-
-// unsigned char* type0_frame(){
-// if(type0_frame_flag){
-// T0F_pointer = first_type_structure(0);
-// type0_frame_flag = false;
-// }
-// else {
-// T0F_pointer = next_type_structure(T0F_pointer);
-// }
-// return T0F_pointer->TM_string;
-// }
-
+
unsigned char convoluted_frame[270];
Convolution ConvObj2;
void convolution (unsigned char * ptr){
@@ -264,34 +205,6 @@
int DS_counter;
bool DS_f;
bool make_DataStream_f;
-// #define make_DataStream {\
-// unsigned char* ptr;\
-// if(make_DataStream_f == true){\
-// DS_state = true;\
-// DS_counter = 0;\
-// DS_f = false;\
-// make_DataStream_f = false;\
-// }\
-// if(DS_state){\
-// if(DS_counter < total_frames-type0_no){\
-// type1_frame(ptr); \
-// DS_f = true;\
-// }\
-// else if(DS_counter < total_frames ){\
-// type0_frame(ptr);\
-// DS_f = true;\
-// }\
-// DS_counter++;\
-// }\
-// DS_state = !DS_state;\
-// if (DS_f){\
-// DS_f = false;\
-// convolution(ptr);\
-// interleave(convoluted_frame,interleave_data[0]);\
-// interleave(convoluted_frame+ 135,interleave_data[1]);\
-// }\
-// DS_index = (DS_state==true)?1:0;\
-// }
#define make_DataStream {\
unsigned char* ptr;\
@@ -329,9 +242,7 @@
bool reset_adf;
SND_TM(){
MAX_SEGMENT = (MAX_ADF_LEN-EOS_SIZE)/( S_FRAME_SIZE + ISR*T_FRAME_SIZE);
- //MAX_SEGMENT = 1;
//(max length - eos size)/(sframe length + tFrameLength*ISR)
-// cout<<int(MAX_SEGMENT)<<endl;
}
@@ -344,8 +255,6 @@
transmit_data_f = true;
diff_prev = 0;
data_number();
- // make_DataStream;
-// gPC.putc('z');
}
@@ -457,15 +366,6 @@
if(EOS_c == EOS_SIZE){
EOS_c = 0;
eos_f = false;
- // printf("exit EOS\n");
-// if(segment_c == MAX_SEGMENT){
-// segment_c = 0;
-// SEGMENT_NO = SEGMENT_NO - MAX_SEGMENT;
-// reset_adf = true;//what does this do??
-// Sframe = true;
-// }else{
-// *last_buffer = true;
-// }
if(segment_c == SEGMENT_NO && segment_r == 0){
*last_buffer = true;
}
