void SDCCHL1Encoder::sendFrame(const L2Frame& frame) { OBJLOG(DEEPDEBUG) << "SDCCHL1Encoder " << frame; // Make sure there's something down there to take the busts. LOG(INFO) <<"SDCCHL1Encoder SENDFRAME"; if (mDownstream==NULL) { LOG(WARN) << "XCCHL1Encoder with no downstream"; return; } // This comes from GSM 05.03 4.1 // Copy the L2 frame into u[] for processing. // GSM 05.03 4.1.1. //assert(mD.size()==headerOffset()+frame.size()); frame.copyToSegment(mU,headerOffset()); OBJLOG(DEEPDEBUG) << "XCCHL1Encoder d[]=" << mD; mD.LSB8MSB(); OBJLOG(DEEPDEBUG) << "XCCHL1Encoder d[]=" << mD; encode(); // Encode u[] to c[], GSM 05.03 4.1.2 and 4.1.3. LOG(INFO) << "SDCCHL1ENCODER ENCODED"; interleave(); // Interleave c[] to i[][], GSM 05.03 4.1.4. LOG(INFO) << "SDCCHL1ENCODER INTERLEAVED"; encrypt(); // Encrypt i[][] to e[]. LOG(INFO) << "SDCCHL1ENCODER ENCRYPTED"; transmit(); // Send the bursts to the radio, GSM 05.03 4.1.5. LOG(INFO) << "SDCCHL1ENCODER TRANSMITTED"; // FIXME: is this FN OK, or do we need to back it up by 4? gWriteGSMTAP(ARFCN(),mTN,mPrevWriteTime.FN(),frame); }
void XCCHL1Encoder::sendFrame(const L2Frame& frame) { OBJLOG(DEBUG) << "XCCHL1Encoder " << frame; // Make sure there's something down there to take the busts. if (mDownstream==NULL) { LOG(WARNING) << "XCCHL1Encoder with no downstream"; return; } // This comes from GSM 05.03 4.1 // Copy the L2 frame into u[] for processing. // GSM 05.03 4.1.1. //assert(mD.size()==headerOffset()+frame.size()); frame.copyToSegment(mU,headerOffset()); // Send to GSMTAP (must send mU = real bits !) gWriteGSMTAP(ARFCN(),TN(),mNextWriteTime.FN(), typeAndOffset(),mMapping.repeatLength()>51,false,mU); // Encode data into bursts OBJLOG(DEBUG) << "XCCHL1Encoder d[]=" << mD; mD.LSB8MSB(); OBJLOG(DEBUG) << "XCCHL1Encoder d[]=" << mD; encode(); // Encode u[] to c[], GSM 05.03 4.1.2 and 4.1.3. interleave(); // Interleave c[] to i[][], GSM 05.03 4.1.4. transmit(); // Send the bursts to the radio, GSM 05.03 4.1.5. }