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


C++ TLFrame::writeField方法代码示例

本文整理汇总了C++中TLFrame::writeField方法的典型用法代码示例。如果您正苦于以下问题:C++ TLFrame::writeField方法的具体用法?C++ TLFrame::writeField怎么用?C++ TLFrame::writeField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TLFrame的用法示例。


在下文中一共展示了TLFrame::writeField方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: write

void TLUserData::write(TLFrame& dest, size_t& wp) const
{
#if 1
	// First write TP-User-Data-Length
	dest.writeField(wp,mLength,8);

	// Then write TP-User-Data
	// This tail() works because UD is always the last field in the PDU.
	BitVector ud_dest = dest.tail(wp);
	mRawData.copyTo(ud_dest);
	ud_dest.LSB8MSB();
#else
	// Stuff we don't support...
	assert(!mUDHI);
	assert(mDCS==0);
	unsigned numChar = strlen(mData);
	dest.writeField(wp,numChar,8);
	// This tail() works because UD is always the last field in the PDU.
	BitVector chars = dest.tail(wp);
	chars.zero();
	for (unsigned i=0; i<numChar; i++) {
		char gsm = encodeGSMChar(mData[i]);
		dest.writeFieldReversed(wp,gsm,7);
	}
	chars.LSB8MSB();
#endif
}
开发者ID:57-Wolve,项目名称:OpenBTS-UMTS,代码行数:27,代码来源:SMSMessages.cpp

示例2: writeBody

void TLDeliver::writeBody(TLFrame& dest, size_t& wp) const
{
	writeMMS(dest);
	writeRP(dest);
	writeUDHI(dest, mUD.UDHI());
	writeSRI(dest);
	mOA.write(dest,wp);
	dest.writeField(wp,mPID,8);
	dest.writeField(wp,mUD.DCS(),8);
	mSCTS.write(dest,wp);
	writeUnused(dest);
	mUD.write(dest,wp);
}
开发者ID:57-Wolve,项目名称:OpenBTS-UMTS,代码行数:13,代码来源:SMSMessages.cpp

示例3: writeBody

// (pat) See 3GPP 3.40 9.2.2
void TLDeliver::writeBody(TLFrame& dest, size_t& wp) const
{
	writeMMS(dest);		// more messages to send bit.
	writeRP(dest);		// reply path bit.
	writeUDHI(dest, mUD.UDHI());	// User-data-header-indicator bit
	writeSRI(dest);		// status-report-indication bit
	mOA.write(dest,wp);	// originating address
	dest.writeField(wp,mPID,8);		// protocol id
	dest.writeField(wp,mUD.DCS(),8);	// Data-coding-scheme
	mSCTS.write(dest,wp);		// service-centre-time-stamp
	writeUnused(dest);			// user-data-length.  (pat) Why empty?
	mUD.write(dest,wp);			// user data.
}
开发者ID:84danielwhite,项目名称:openbts,代码行数:14,代码来源:SMSMessages.cpp

示例4: write

void TLUserData::write(TLFrame& dest, size_t& wp) const
{
	// Stuff we don't support...
	assert(!mUDHI);
	assert(mDCS==0);
	unsigned numChar = strlen(mData);
	dest.writeField(wp,numChar,8);
	// This tail() works because UD is always the last field in the PDU.
	BitVector chars = dest.tail(wp);
	chars.zero();
	for (unsigned i=0; i<numChar; i++) {
		char gsm = encodeGSMChar(mData[i]);
		dest.writeFieldReversed(wp,gsm,7);
	}
	chars.LSB8MSB();
}
开发者ID:5728136cs,项目名称:Mobile_Netze_HM_OpenBTS_Handover,代码行数:16,代码来源:SMSMessages.cpp


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