Changeset 4005
- Timestamp:
- 05/29/07 16:01:20 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
experimental/components/Demodulator/src/Demodulator.cpp
r3994 r4005 152 152 unsigned int N_in(0), N_out(0); 153 153 154 unsigned int i; 155 char * b(NULL); 156 short * I(NULL), * Q(NULL); 157 154 158 while( true ) { 155 159 // Get data from port … … 161 165 162 166 // Configure output data length 167 bits_out.length(N_out); 168 169 // Copy data 170 ///\todo Copying data is incredibly inefficient; need to initialize 171 /// CORBA array on buffer and vise versa 172 b = new char[N_out]; 173 I = new short[N_in]; 174 Q = new short[N_in]; 175 176 for (i=0; i<N_in; i++) { 177 I[i] = (*I_in)[i]; 178 Q[i] = (*Q_in)[i]; 179 } 163 180 164 181 // Signal processing goes here 182 DemodulateSequence(I, Q, N_in, b); 183 184 for (i=0; i<N_out; i++) { 185 bits_out[i] = b[i]; 186 } 165 187 166 188 dataIn_0->bufferEmptied(); … … 168 190 } 169 191 192 delete [] b; 193 delete [] I; 194 delete [] Q; 195 170 196 } 171 197