本文整理汇总了C++中wns::ldk::CompoundPtr::getData方法的典型用法代码示例。如果您正苦于以下问题:C++ CompoundPtr::getData方法的具体用法?C++ CompoundPtr::getData怎么用?C++ CompoundPtr::getData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wns::ldk::CompoundPtr
的用法示例。
在下文中一共展示了CompoundPtr::getData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processIncoming
void RSRelayMapper::processIncoming( const wns::ldk::CompoundPtr& compound )
{
wns::ldk::ClassifierCommand* clcom =
classifier_->getCommand( compound->getCommandPool() );
RelayMapping mapping =
findMapping( clcom->peer.id );
if ( mapping == RelayMapping() )
{
std::stringstream ss;
ss << "no mapping registered for CID " << clcom->peer.id;
assure( 0, ss.str() );
}
wns::ldk::CommandPool* injection =
getFUN()->getProxy()->createCommandPool();
getFUN()->getProxy()
->partialCopy( this, injection, compound->getCommandPool() );
if ( ackSwitch_
&& getFUN()->getProxy()->commandIsActivated( compound->getCommandPool(), ackSwitch_ ) )
{
// we need to switch the CID of the ACK too
wimac::AckSwitchCommand* ackCom =
ackSwitch_->getCommand( compound->getCommandPool() );
wimac::AckSwitchCommand* injectACKCom =
ackSwitch_->getCommand( injection );
RelayMapping ackMapping =
findMapping( ackCom->peer.originalCID );
if ( ackCom->peer.originalCID == ackMapping.upperConnection_ )
injectACKCom->peer.originalCID = ackMapping.lowerConnection_;
else
injectACKCom->peer.originalCID = ackMapping.upperConnection_;
}
wns::ldk::ClassifierCommand* injectClcom =
classifier_->getCommand( injection );
wns::ldk::CompoundPtr injectCompound( new wns::ldk::Compound(injection, compound->getData()));
if ( clcom->peer.id == mapping.upperConnection_ )
{
LOG_INFO(getFUN()->getLayer()->getName(),
" maps compound CID from ", clcom->peer.id, " down to ",
mapping.lowerConnection_ );
injectClcom->peer.id = mapping.lowerConnection_;
RelayMapperCommand* rCommand =
this->activateCommand(injectCompound->getCommandPool());
rCommand->peer.direction_ = RelayMapperCommand::Down;
downRelayInject_->sendData( injectCompound );
}
else
{
LOG_INFO(getFUN()->getLayer()->getName(),
" maps compound CID from ", clcom->peer.id, " up to ",
mapping.upperConnection_ );
injectClcom->peer.id = mapping.upperConnection_;
RelayMapperCommand* rCommand =
this->activateCommand(injectCompound->getCommandPool());
rCommand->peer.direction_ = RelayMapperCommand::Up;
upRelayInject_->sendData( injectCompound );
}
}