本文整理汇总了C++中BitVector::copyToSegment方法的典型用法代码示例。如果您正苦于以下问题:C++ BitVector::copyToSegment方法的具体用法?C++ BitVector::copyToSegment怎么用?C++ BitVector::copyToSegment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitVector
的用法示例。
在下文中一共展示了BitVector::copyToSegment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mE
SCHL1Encoder::SCHL1Encoder(L1FEC* wParent)
:GeneratorL1Encoder(0,gSCHMapping,wParent),
mBlockCoder(0x0575,10,25),
mU(25+10+4), mE(78),
mD(mU.head(25)),mP(mU.segment(25,10)),
mE1(mE.segment(0,39)),mE2(mE.segment(39,39))
{
// The SCH extended training sequence.
// GSM 05.02 5.2.5.
static const BitVector xts("1011100101100010000001000000111100101101010001010111011000011011");
xts.copyToSegment(mBurst,42);
// Set the tail bits in u[] now, just once.
mU.fillField(35,0,4);
}
示例2:
void GprsEncoder::encodeCS4(const BitVector &src)
{
//if (sFecDebug) GPRSLOG(1) <<"encodeCS4 src\n"<<src;
src.copyToSegment(mD_CS4,0,53*8);
//if (sFecDebug) GPRSLOG(1) <<"encodeCS4 mD_CS4\n"<<mD_CS4;
// mC.zero(); // DEBUG TEST!! Did not help.
mD_CS4.fillField(53*8,0,7); // zero out 7 spare bits.
mD_CS4.LSB8MSB(); // Ignores the last incomplete byte of 7 zero bits.
//if (sFecDebug) GPRSLOG(1) <<"mC before parity\n"<<mC;
// Parity is computed on original D before doing the USF translation above.
mBlockCoder_CS4.writeParityWord(mD_CS4,mP_CS4);
// Note that usf has been moved to the first three bits by the byte swapping above,
// so when we write the 12 bits of GPRSUSFEncoding for usf into mC, it will overwrite
// the original 3 parity bits.
int reverseUsf = mD_CS4.peekField(0,3);
// mU overwrites the first 3 bits of mD within mC.
mU_CS4.fillField(0,GPRS::GPRSUSFEncoding[reverseUsf],12);
// Result is left in mC.
devassert(mC.peekField(0,12) == (unsigned) GPRS::GPRSUSFEncoding[reverseUsf]);
devassert(mC.peekField(433,7) == 0); // unused bits not modified.
//if (sFecDebug) GPRSLOG(1) <<"mC before interleave\n"<<mC;
interleave41(); // Interleaves mC into mI.
}