| 209 | | switch ( operationalMode ) { |
| 210 | | case ASSEMBLE_PREAMBLE: |
| 211 | | DEBUG(4, FrameAssembler, "Assembling preamble") |
| 212 | | |
| 213 | | // push |
| 214 | | dataOut_0->pushPacket(I_out_phasing_pattern, Q_out_phasing_pattern); |
| 215 | | |
| 216 | | // do not break; continue to assemble header |
| 217 | | operationalMode = ASSEMBLE_HEADER; |
| 218 | | |
| 219 | | case ASSEMBLE_HEADER: |
| 220 | | DEBUG(4, FrameAssembler, "Assembling header") |
| 221 | | // copy header |
| 222 | | I_out_header.length(512); |
| 223 | | Q_out_header.length(512); |
| 224 | | AssembleHeader( I_header, Q_header ); |
| 225 | | for (unsigned int i=0; i<512; i++) { |
| 226 | | I_out_header[i] = I_header[i]; |
| 227 | | Q_out_header[i] = Q_header[i]; |
| | 209 | // ASSEMBLE_PREAMBLE |
| | 210 | DEBUG(4, FrameAssembler, "Assembling preamble") |
| | 211 | |
| | 212 | // push |
| | 213 | dataOut_0->pushPacket(I_out_phasing_pattern, Q_out_phasing_pattern); |
| | 214 | |
| | 215 | // ASSEMBLE_HEADER |
| | 216 | DEBUG(4, FrameAssembler, "Assembling header") |
| | 217 | // copy header |
| | 218 | I_out_header.length(512); |
| | 219 | Q_out_header.length(512); |
| | 220 | AssembleHeader( I_header, Q_header ); |
| | 221 | for (unsigned int i=0; i<512; i++) { |
| | 222 | I_out_header[i] = I_header[i]; |
| | 223 | Q_out_header[i] = Q_header[i]; |
| | 224 | } |
| | 225 | |
| | 226 | // push data |
| | 227 | dataOut_0->pushPacket(I_out_header, Q_out_header); |
| | 228 | |
| | 229 | |
| | 230 | // ASSEMBLE_FRAME |
| | 231 | // break output into smaller pieces |
| | 232 | |
| | 233 | I_out_0.length(512); |
| | 234 | Q_out_0.length(512); |
| | 235 | |
| | 236 | j = 0; |
| | 237 | for ( unsigned int i=0; i<frameSize; i++ ) { |
| | 238 | I_out_0[j] = I_out_data[i]; |
| | 239 | Q_out_0[j] = Q_out_data[i]; |
| | 240 | j++; |
| | 241 | |
| | 242 | if ( j==blockSize || i==(frameSize-1) ) { |
| | 243 | I_out_0.length(j); |
| | 244 | Q_out_0.length(j); |
| | 245 | dataOut_0->pushPacket(I_out_0, Q_out_0); |
| | 246 | j=0; |
| 229 | | |
| 230 | | // push data |
| 231 | | dataOut_0->pushPacket(I_out_header, Q_out_header); |
| 232 | | |
| 233 | | // do not break; continue to assemble frame |
| 234 | | operationalMode = ASSEMBLE_FRAME; |
| 235 | | |
| 236 | | case ASSEMBLE_FRAME: |
| 237 | | // break output into smaller pieces |
| 238 | | std::cout << "Assembling frame symbols in blocks..." << std::endl; |
| 239 | | |
| 240 | | I_out_0.length(512); |
| 241 | | Q_out_0.length(512); |
| 242 | | |
| 243 | | j = 0; |
| 244 | | for ( unsigned int i=0; i<frameSize; i++ ) { |
| 245 | | I_out_0[j] = I_out_data[i]; |
| 246 | | Q_out_0[j] = Q_out_data[i]; |
| 247 | | j++; |
| 248 | | |
| 249 | | if ( j==blockSize || i==(frameSize-1) ) { |
| 250 | | I_out_0.length(j); |
| 251 | | Q_out_0.length(j); |
| 252 | | dataOut_0->pushPacket(I_out_0, Q_out_0); |
| 253 | | j=0; |
| 254 | | } |
| 255 | | } |
| 256 | | |
| 257 | | operationalMode = ASSEMBLE_EOM_CODE; |
| 258 | | |
| 259 | | case ASSEMBLE_EOM_CODE: |
| 260 | | // push phasing pattern |
| 261 | | ///\todo assemble EOM code |
| 262 | | dataOut_0->pushPacket(I_out_phasing_pattern, Q_out_phasing_pattern); |
| 263 | | |
| 264 | | operationalMode = ASSEMBLE_PREAMBLE; |
| 265 | | break; |
| 266 | | } |
| | 248 | } |
| | 249 | |
| | 250 | // ASSEMBLE_EOM_CODE: |
| | 251 | // push phasing pattern |
| | 252 | ///\todo assemble EOM code |
| | 253 | dataOut_0->pushPacket(I_out_phasing_pattern, Q_out_phasing_pattern); |