当前位置: 首页>>代码示例>>C++>>正文


C++ BitVector::copyToSegment方法代码示例

本文整理汇总了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);
}
开发者ID:LiRenjie88,项目名称:OpenBTS,代码行数:14,代码来源:GSML1FEC.cpp

示例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.
}
开发者ID:84danielwhite,项目名称:openbts,代码行数:24,代码来源:FEC.cpp


注:本文中的BitVector::copyToSegment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。