本文整理汇总了C++中wns::ldk::CompoundPtr类的典型用法代码示例。如果您正苦于以下问题:C++ CompoundPtr类的具体用法?C++ CompoundPtr怎么用?C++ CompoundPtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CompoundPtr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: doOnData
void DuplicateFilter::doOnData(const wns::ldk::CompoundPtr& compound)
{
// retransmission, check sequence number
DuplicateFilterCommand* command = getCommand(compound);
if(not lastReceivedSN.knows(friends.manager->getTransmitterAddress(compound->getCommandPool())))
{
// first compound from source
MESSAGE_SINGLE(NORMAL, logger, "Received first frame from " << friends.manager->getTransmitterAddress(compound->getCommandPool()) << " -> deliver");
lastReceivedSN.insert(friends.manager->getTransmitterAddress(compound->getCommandPool()), command->peer.sn);
getDeliverer()->getAcceptor(compound)->onData(compound);
}
else
{
if(lastReceivedSN.find(friends.manager->getTransmitterAddress(compound->getCommandPool())) != command->peer.sn)
{
// compound has different sn
MESSAGE_SINGLE(NORMAL, logger, "Received frame from " << friends.manager->getTransmitterAddress(compound->getCommandPool()) << " with unknown sn -> deliver");
getDeliverer()->getAcceptor(compound)->onData(compound);
lastReceivedSN.update(friends.manager->getTransmitterAddress(compound->getCommandPool()), command->peer.sn);
}
else
{
MESSAGE_SINGLE(NORMAL, logger, "Received duplicate frame from " << friends.manager->getTransmitterAddress(compound->getCommandPool()) << " -> drop");
}
}
}
开发者ID:openwns,项目名称:wifimac,代码行数:27,代码来源:DuplicateFilter.cpp
示例2: getCommand
void
PhyUser::doOnData(const wns::ldk::CompoundPtr& compound)
{
assure(compound, "doOnData called with an invalid compound.");
PhyUserCommand* puCommand = getCommand( compound->getCommandPool() );
LOG_INFO( getFUN()->getName(), ": doOnData source: ", puCommand->peer.source_->getName(),
" C/I = ", puCommand->local.rxPower_, " / ", puCommand->local.interference_,
" = ", getCommand( compound->getCommandPool() )->magic.rxMeasurement->getSINR()
);
if(puCommand->peer.estimatedCQI.interference.get_mW() > 0)
{
LOG_INFO( "estimated C/I = ",
puCommand->peer.estimatedCQI.carrier, " / ", puCommand->peer.estimatedCQI.interference,
" = " , puCommand->peer.estimatedCQI.carrier / puCommand->peer.estimatedCQI.interference,
"\n estimated intra-cell interference: ", puCommand->getEstimatedIintra()
);
double delta_SINR = (getCommand( compound->getCommandPool() )->magic.rxMeasurement->getSINR().get_factor()) - (puCommand->peer.estimatedCQI.carrier / puCommand->peer.estimatedCQI.interference).get_factor();
if(abs(delta_SINR) > 0.001)
{
LOG_INFO( "Delta C / I: ", delta_SINR);
}else{ LOG_INFO("abs(Delta C / I) < 0.001 "); }
}
else{
LOG_INFO( "estimated C/I = ",
puCommand->peer.estimatedCQI.carrier, " / ", puCommand->peer.estimatedCQI.interference,
"\n estimated intra-cell interference: ", puCommand->getEstimatedIintra()
);
}
getDeliverer()->getAcceptor(compound)->onData(compound);
}
开发者ID:openwns,项目名称:wimac,代码行数:31,代码来源:PhyUser.cpp
示例3: phase
bool
RACHUT::doIsAccepting(const wns::ldk::CompoundPtr& compound) const
{
// Check whether we are outside the RAP phase
if (accepting == false) return false;
// how much of the overall RACH duration is left?
simTimeType duration = stopTime - wns::simulator::getEventScheduler()->getTime();
assure(duration >= 0, "RACH Timing mismatch.");
// Check whether the packet can be transmitted in the remaining time of
// this RACH phase
assure(phyModePtr->dataRateIsValid(),"!dataRateIsValid");
int capacity = phyModePtr->getBitCapacityFractional(duration);
bool compoundFits = (capacity >= compound->getLengthInBits());
if (compoundFits == true)
{
return true;
}
else
{
MESSAGE_BEGIN(NORMAL, logger, m, "Deferring RACH compound until next RACH phase (not enough capacity left).");
m << " Capacity needed=" << compound->getLengthInBits();
m << ", capacity available=" << capacity;
MESSAGE_END();
return false;
}
} // doIsAccepting
开发者ID:openwns,项目名称:lte,代码行数:29,代码来源:RACH.cpp
示例4: activateCommand
void
TxDurationSetter::processOutgoing(const wns::ldk::CompoundPtr& compound)
{
TxDurationSetterCommand* command = activateCommand(compound->getCommandPool());
wimemac::convergence::PhyMode phyMode = friends.manager->getPhyMode(compound->getCommandPool());
// calculate tx duration
wns::simulator::Time preambleTxDuration = friends.manager->getProtocolCalculator()->getDuration()->preamble(phyMode);
if(friends.manager->isPreamble(compound->getCommandPool()))
{
command->local.txDuration = preambleTxDuration;
MESSAGE_BEGIN(NORMAL, this->logger, m, "Preamble");
m << ": duration " << command->local.txDuration;
MESSAGE_END();
}
else
{
command->local.txDuration = friends.manager->getProtocolCalculator()->getDuration()->PSDU_PPDU(compound->getLengthInBits(), phyMode) - preambleTxDuration;
//MESSAGE_BEGIN(VERBOSE, this->logger, m, "Outgoing Compound with size ");
MESSAGE_BEGIN(NORMAL, this->logger, m, "Outgoing Compound with size ");
m << compound->getLengthInBits();
m << " with nIBP6S " << phyMode.getInfoBitsPer6Symbols();
m << " --> duration " << friends.manager->getProtocolCalculator()->getDuration()->PSDU_PPDU(compound->getLengthInBits(), phyMode);
m << " - " << preambleTxDuration;
MESSAGE_END();
MESSAGE_BEGIN(NORMAL, this->logger, m, "Command");
m << " start " << wns::simulator::getEventScheduler()->getTime();
m << " stop " << wns::simulator::getEventScheduler()->getTime() + command->local.txDuration;
MESSAGE_END();
}
}
开发者ID:openwns,项目名称:wimemac,代码行数:35,代码来源:TxDurationSetter.cpp
示例5: assure
void
RTSCTS::doSendData(const wns::ldk::CompoundPtr& compound)
{
assure(this->pendingMPDU == wns::ldk::CompoundPtr(),
"Cannot have two MPDUs");
assure(this->pendingRTS == wns::ldk::CompoundPtr(),
"Cannot have two RTSs");
switch(friends.manager->getFrameType(compound->getCommandPool()))
{
case DATA_TXOP:
if(not this->rtsctsOnTxopData)
{
break;
}
// fall through to DATA if RTS/CTS during TXOP is activ
case DATA:
if(compound->getLengthInBits() < this->rtsctsThreshold)
{
MESSAGE_SINGLE(NORMAL, this->logger,
"Outgoing DATA with size " << compound->getLengthInBits() << ", below threshold");
}
else
{
MESSAGE_SINGLE(NORMAL, this->logger,
"Outgoing DATA with size " << compound->getLengthInBits() << "-> Save and send RTS");
this->pendingMPDU = compound;
this->pendingRTS = this->prepareRTS(this->pendingMPDU);
// RTS/CTS initializes mini-TXOP for compound, it can be send
// directly after SIFS
friends.manager->setFrameType(this->pendingMPDU->getCommandPool(), DATA_TXOP);
// try to send RTS
if(getConnector()->hasAcceptor(this->pendingRTS))
{
state = transmitRTS;
getConnector()->getAcceptor(compound)->sendData(this->pendingRTS);
this->pendingRTS = wns::ldk::CompoundPtr();
}
return;
}
break;
default:
throw wns::Exception("Unknown frame type");
break;
}
// try to send data
if(getConnector()->hasAcceptor(compound))
{
getConnector()->getAcceptor(compound)->sendData(compound);
}
else
{
this->pendingMPDU = compound;
}
}
开发者ID:openwns,项目名称:wifimac,代码行数:58,代码来源:RTSCTS.cpp
示例6: getCommand
void
PhyUser::traceIncoming(wns::ldk::CompoundPtr compound, wns::service::phy::power::PowerMeasurementPtr rxPowerMeasurement)
{
wns::probe::bus::json::Object objdoc;
PhyCommand* myCommand = getCommand(compound->getCommandPool());
objdoc["Transmission"]["ReceiverID"] = wns::probe::bus::json::String(getFUN()->getLayer()->getNodeName());
objdoc["Transmission"]["SenderID"] = wns::probe::bus::json::String(myCommand->magic.source->getName());
objdoc["Transmission"]["SourceID"] = wns::probe::bus::json::String(myCommand->magic.source->getName());
if(myCommand->magic.destination == NULL)
{
objdoc["Transmission"]["DestinationID"] = wns::probe::bus::json::String("Broadcast");
}
else
{
objdoc["Transmission"]["DestinationID"] = wns::probe::bus::json::String(myCommand->magic.destination->getName());
}
objdoc["Transmission"]["Start"] = wns::probe::bus::json::Number(myCommand->local.start);
objdoc["Transmission"]["Stop"] = wns::probe::bus::json::Number(myCommand->local.stop);
objdoc["Transmission"]["Subchannel"] = wns::probe::bus::json::Number(myCommand->local.subBand);
objdoc["Transmission"]["TxPower"] = wns::probe::bus::json::Number(myCommand->magic.txp.get_dBm());
objdoc["Transmission"]["RxPower"] = wns::probe::bus::json::Number(rxPowerMeasurement->getRxPower().get_dBm());
objdoc["Transmission"]["InterferencePower"] = wns::probe::bus::json::Number(rxPowerMeasurement->getInterferencePower().get_dBm());
if (myCommand->magic.estimatedSINR.carrier != wns::Power() &&
myCommand->magic.estimatedSINR.interference != wns::Power())
{
objdoc["SINREst"]["C"] = wns::probe::bus::json::Number(myCommand->magic.estimatedSINR.carrier.get_dBm());
objdoc["SINREst"]["I"] = wns::probe::bus::json::Number(myCommand->magic.estimatedSINR.interference.get_dBm());
}
if (schedulerCommandReader_->commandIsActivated(compound->getCommandPool()))
{
// Now we have a look at the scheduling time slot
lte::timing::SchedulerCommand* schedCommand = schedulerCommandReader_->readCommand<lte::timing::SchedulerCommand>(compound->getCommandPool());
wns::scheduler::SchedulingTimeSlotPtr ts = schedCommand->magic.schedulingTimeSlotPtr;
wns::probe::bus::json::Array a;
for (wns::scheduler::PhysicalResourceBlockVector::iterator it= ts->physicalResources.begin(); it != ts->physicalResources.end(); ++it)
{
wns::probe::bus::json::Object pr;
pr["NetBits"] = wns::probe::bus::json::Number(it->getNetBlockSizeInBits());
a.Insert(pr);
}
objdoc["SchedulingTimeSlot"]["PhysicalResources"] = a;
objdoc["SchedulingTimeSlot"]["HARQ"]["enabled"] = wns::probe::bus::json::Boolean(ts->isHARQEnabled());
objdoc["SchedulingTimeSlot"]["HARQ"]["ProcessID"] = wns::probe::bus::json::Number(ts->harq.processID);
objdoc["SchedulingTimeSlot"]["HARQ"]["NDI"] = wns::probe::bus::json::Boolean(ts->harq.NDI);
objdoc["SchedulingTimeSlot"]["HARQ"]["TransportBlockID"] = wns::probe::bus::json::Number(ts->harq.transportBlockID);
objdoc["SchedulingTimeSlot"]["HARQ"]["RetryCounter"] = wns::probe::bus::json::Number(ts->harq.retryCounter);
}
wns::probe::bus::json::probeJSON(jsonTracingCC_, objdoc);
}
开发者ID:openwns,项目名称:lte,代码行数:58,代码来源:PhyUser.cpp
示例7: doVisit
virtual void
doVisit(wns::probe::bus::IContext& c, const wns::ldk::CompoundPtr& compound) const
{
assure(compound, "Received NULL CompoundPtr");
if (macgCommandReader->commandIsActivated(compound->getCommandPool()) == true)
{
int hopCount = macgCommandReader->readCommand<lte::macg::MACgCommand>(compound->getCommandPool())->magic.hopCount;
assure(hopCount >= 1, "number of hops must be >=1, but it is " << hopCount);
assure(hopCount <= 2, "number of hops must be <=2, but it is " << hopCount);
c.insertInt(this->key, hopCount);
}
}
开发者ID:openwns,项目名称:lte,代码行数:14,代码来源:HopCount.hpp
示例8: return
wns::ldk::CompoundPtr
RTSCTS::prepareCTS(const wns::ldk::CompoundPtr& rts)
{
wns::ldk::CommandPool* rtsCP = rts->getCommandPool();
// calculate nav from rts
wns::simulator::Time nav = friends.manager->getFrameExchangeDuration(rtsCP) - sifsDuration - maximumCTSDuration;
wns::ldk::CompoundPtr cts = friends.manager->createCompound(friends.manager->getReceiverAddress(rtsCP),
friends.manager->getTransmitterAddress(rtsCP),
ACK,
nav,
sifsDuration + preambleProcessingDelay);
friends.manager->setPhyMode(cts->getCommandPool(), rtsctsPhyMode);
RTSCTSCommand* rtsctsC = this->activateCommand(cts->getCommandPool());
rtsctsC->peer.isRTS = false;
MESSAGE_BEGIN(NORMAL, this->logger, m, "Prepare CTS frame");
m << " to " << friends.manager->getTransmitterAddress(rtsCP);
m << " with NAV " << nav;
MESSAGE_END();
this->ctsPrepared = wns::simulator::getEventScheduler()->getTime();
return(cts);
}
开发者ID:openwns,项目名称:wifimac,代码行数:25,代码来源:RTSCTS.cpp
示例9: getFUN
void
RACHUT::doSendData(const wns::ldk::CompoundPtr& compound)
{
// set PhyUser Command
lte::macr::PhyCommand* phyCommand =
dynamic_cast<lte::macr::PhyCommand*>(
getFUN()->getProxy()->activateCommand( compound->getCommandPool(),
friends.phyUser ));
simTimeType startTime = wns::simulator::getEventScheduler()->getTime(); // now
phyCommand->local.beamforming = false;
phyCommand->local.pattern = wns::service::phy::ofdma::PatternPtr(); // NULL Pointer
phyCommand->local.start = startTime;
phyCommand->local.stop = stopTime;
phyCommand->local.subBand = subBandCounter++;
phyCommand->local.modeRxTx = lte::macr::PhyCommand::Tx;
phyCommand->local.phyModePtr = phyModePtr;
phyCommand->magic.destination = NULL;
phyCommand->magic.source = getFUN()->getLayer<dll::ILayer2*>()->getNode();
phyCommand->magic.txp = txPower;
if (getConnector()->hasAcceptor(compound)){
assure(phyModePtr->dataRateIsValid(),"invalid PhyMode dataRate");
MESSAGE_SINGLE(NORMAL, logger, "sent RACH compound ("<< *phyModePtr <<")");
getConnector()->getAcceptor(compound)->sendData(compound);
}
else
assure(false, "Lower FU is not accepting scheduled PDU but is supposed to do so");
}
开发者ID:openwns,项目名称:lte,代码行数:32,代码来源:RACH.cpp
示例10: doOnData
void FrameHeadCollector::doOnData( const wns::ldk::CompoundPtr& compound )
{
FrameHeadCommand* command =
getCommand( compound->getCommandPool() );
LOG_INFO( getFUN()->getLayer()->getName(), ": received FCH from station:",command->peer.baseStationID);
if(channelQualityObserver_)
{
PhyUserCommand* phyCommand = phyUser_->getCommand(compound->getCommandPool());
channelQualityObserver_->storeMeasurement(command->peer.baseStationID,
phyCommand->magic.rxMeasurement);
}
getFrameBuilder()->getTimingControl()->finishedPhase( this );
}
开发者ID:openwns,项目名称:wimac,代码行数:16,代码来源:FrameHeadCollector.cpp
示例11: processOutgoing
void BSRelayMapper::processOutgoing( const wns::ldk::CompoundPtr& compound )
{
RelayMapperCommand* command = dynamic_cast<RelayMapperCommand*>
(getFUN()->getProxy()->activateCommand( compound->getCommandPool(), this ));
command->peer.direction_ =
RelayMapperCommand::Down;
}
开发者ID:openwns,项目名称:wimac,代码行数:8,代码来源:RelayMapper.cpp
示例12: setNewTimeout
void
RTSCTS::onTxEnd(const wns::ldk::CompoundPtr& compound)
{
if(this->pendingMPDU and
(getFUN()->getProxy()->commandIsActivated(compound->getCommandPool(), this)) and
(getCommand(compound->getCommandPool())->peer.isRTS) and
(state == transmitRTS))
{
state = waitForCTS;
setNewTimeout(ctsTimeout);
MESSAGE_BEGIN(NORMAL, logger, m, "RTS to ");
m << friends.manager->getReceiverAddress(compound->getCommandPool());
m << " is sent, waiting for CTS for ";
m << ctsTimeout;
MESSAGE_END();
}
}
开发者ID:openwns,项目名称:wifimac,代码行数:17,代码来源:RTSCTS.cpp
示例13: doSendData
void DuplicateFilter::doSendData(const wns::ldk::CompoundPtr& compound)
{
// add duplicate filter command
DuplicateFilterCommand* command = activateCommand(compound->getCommandPool());
command->peer.sn = nextSN;
++nextSN;
getConnector()->getAcceptor(compound)->sendData(compound);
}
开发者ID:openwns,项目名称:wifimac,代码行数:9,代码来源:DuplicateFilter.cpp
示例14: assure
void
PhyUser::doSendData(const wns::ldk::CompoundPtr& compound)
{
assure(compound, "sendData called with an invalid compound.");
assure(getFUN()->getProxy()->commandIsActivated( compound->getCommandPool(), this),
"PhyCommand not specified. PhyUser can not handle this compound!");
// finally commit CommandPool Size
this->commitSizes(compound->getCommandPool());
PhyCommand* myCommand = getCommand(compound->getCommandPool());
if (myCommand->local.modeRxTx == lte::macr::PhyCommand::Tx)
{
MESSAGE_SINGLE(NORMAL, logger,"doSendData(Tx): start="
<< myCommand->local.start <<"s..stop="
<< myCommand->local.stop <<"s => d="
<< (myCommand->local.stop-myCommand->local.start) * 1e6
<< "us, subBand=" << myCommand->local.subBand
<< ", len="<<compound->getLengthInBits() << "bits");
simTimeType startTime = myCommand->local.start;
// Will call this->startTransmission at startTime
es->schedule(StartTxEvent(compound, this), startTime);
// Inform FUs that have added a callback that the compound is on air now
if (!myCommand->local.onAirCallback.empty())
{
myCommand->local.onAirCallback();
}
}
else
{ // reception (Rx)
MESSAGE_SINGLE(NORMAL, logger,"doSendData(Rx): startTime="
<< myCommand->local.start <<", stopTime="
<< myCommand->local.stop << ", subBand="
<< myCommand->local.subBand << ", len="
<< compound->getLengthInBits() << "bits"
<< " SHALL NOT OCCUR");
assure(false,"Tryed to transmit while in RX mode");
}
// stamp link to my InterferenceCache into the Command
myCommand->magic.remoteCache = iCache;
} // doSendData
开发者ID:openwns,项目名称:lte,代码行数:44,代码来源:PhyUser.cpp
示例15: getFUN
void
BeaconBuilder::doOnData( const wns::ldk::CompoundPtr& compound )
{
wns::ldk::CommandPool* commandPool = compound->getCommandPool();
wns::service::dll::UnicastAddress iam
= getFUN()->findFriend<dll::UpperConvergence*>("upperConvergence")->getMACAddress();
dll::UpperCommand* uc =
friends.keyReader->readCommand<dll::UpperCommand>(commandPool);
wns::service::dll::UnicastAddress tx = uc->peer.sourceMACAddress;
//evaluate beacon, only Beacon Command is necessary
if(tx != iam)
{
BeaconEvaluator::BeaconExamination(tx, iam, getCommand(compound->getCommandPool()),logger);
}
}
开发者ID:openwns,项目名称:wimemac,代码行数:19,代码来源:BeaconBuilder.cpp
示例16: MESSAGE_BEGIN
bool
HARQReceiverProcess::decodeReceivedTransportBlock(wns::ldk::CompoundPtr transportBlockRedundancyVersion, imtaphy::interface::TransmissionStatusPtr status)
{
ltea::mac::DownlinkControlInformation* dci =
entity_->getDCIReader()->readCommand<ltea::mac::DownlinkControlInformation>(transportBlockRedundancyVersion->getCommandPool());
MESSAGE_BEGIN(NORMAL, logger_, m, "HarqReceiverProcess::receive processID = " << processID_);
m << ", RV = " << dci->peer.rv << ", TransmissionAttempt=" << dci->magic.transmissionAttempts
<< " NDI= " << dci->peer.NDI;
MESSAGE_END();
if (dci->peer.NDI)
{
receptionBuffer_.clear();
}
if (dci->magic.ackCallback.empty())
{
std::cout << "Tried to decode resource block with empty ack callback" << std::endl;
exit(1);
}
if (dci->magic.nackCallback.empty())
{
std::cout << "Tried to decode resource block with empty nack callback" << std::endl;
exit(1);
}
receptionBuffer_.push_back(std::make_pair<wns::ldk::CompoundPtr, imtaphy::interface::TransmissionStatusPtr>(transportBlockRedundancyVersion, status));
if(entity_->getDecoder()->canDecode(receptionBuffer_))
{
MESSAGE_SINGLE(NORMAL, logger_, "HARQReceiver processID=" << processID_ << " sucessful decoded");
receptionBuffer_.clear();
// send magic ACK feedback to sending process
dci->magic.ackCallback();
return true;
}
else
{
MESSAGE_SINGLE(NORMAL, logger_, "HARQReceiver processID=" << processID_ << " failed to decode"
<< " Transmission attempt: " << dci->magic.transmissionAttempts);
// send magic NACK feedback to sending process
dci->magic.nackCallback();
return false;
}
}
开发者ID:lshmenor,项目名称:IMTAphy,代码行数:55,代码来源:HARQReceiverProcess.cpp
示例17: compound
wns::ldk::CompoundPtr
SelectiveRepeatFSMTest::createACKFrame(wns::ldk::CompoundPtr receivedCompound)
{
SelectiveRepeatCommand* receivedPCI = arq->getCommand(receivedCompound->getCommandPool());
wns::ldk::CompoundPtr compound(fun->createCompound());
SelectiveRepeatCommand* command = arq->activateCommand(compound->getCommandPool());
command->peer.type = SelectiveRepeatCommand::ACK;
command->peer.NS = receivedPCI->peer.NS;
return compound;
} // createACKFrame
开发者ID:lshmenor,项目名称:IMTAphy,代码行数:11,代码来源:SelectiveRepeatFSMTest.cpp
示例18: assure
void
Manager::processOutgoing(const wns::ldk::CompoundPtr& compound)
{
assure(getFUN()->getCommandReader(ucName_)
->readCommand<dll::UpperCommand>(compound->getCommandPool())
->peer.sourceMACAddress == myMACAddress_,
"Try to tx compound with source address " <<
getFUN()->getCommandReader(ucName_)
->readCommand<dll::UpperCommand>(compound->getCommandPool())
->peer.sourceMACAddress <<
" from transceiver with MAC address " << myMACAddress_ );
// The command has to be activated to be considered in the createReply chain
ManagerCommand* mc = activateCommand(compound->getCommandPool());
mc->peer.CompoundType = DATA;
mc->peer.hasPayload = true;
mc->peer.frameExchangeDuration = this->sifsDuration + this->expectedACKDuration;
// Sets the phymode according to the configuration of the drpscheduler
wns::service::dll::UnicastAddress rx = getFUN()->getCommandReader(ucName_)
->readCommand<dll::UpperCommand>(compound->getCommandPool())
->peer.targetMACAddress;
int masNumber_ = getMASNumber(wns::simulator::getEventScheduler()->getTime());
mc->peer.phyMode = friends.drpScheduler->getPhyMode(rx, masNumber_);
mc->peer.psduDuration = protocolCalculator->getDuration()->MSDU_PSDU(compound->getLengthInBits(), mc->peer.phyMode);
mcsProbe->put(mc->peer.phyMode.getDataRate() );
if(this->msduLifetimeLimit > 0)
{
mc->local.expirationTime = wns::simulator::getEventScheduler()->getTime() + this->msduLifetimeLimit;
MESSAGE_SINGLE(NORMAL, logger_, "Outgoing command will expire at " << mc->local.expirationTime);
}
else
{
mc->local.expirationTime = 0.0;
MESSAGE_SINGLE(NORMAL, logger_, "Outgoing command, no expiration time");
}
}
开发者ID:openwns,项目名称:wimemac,代码行数:39,代码来源:Manager.cpp
示例19: switch
bool
RTSCTS::doIsAccepting(const wns::ldk::CompoundPtr& compound) const
{
switch(friends.manager->getFrameType(compound->getCommandPool()))
{
case DATA_TXOP:
if(not this->rtsctsOnTxopData)
{
return(getConnector()->hasAcceptor(compound));
}
case DATA:
if(compound->getLengthInBits() < this->rtsctsThreshold)
{
return(getConnector()->hasAcceptor(compound));
}
else
{
return (this->pendingMPDU == wns::ldk::CompoundPtr());
}
default:
throw wns::Exception("Unknown frame type");
break;
}
}
开发者ID:openwns,项目名称:wifimac,代码行数:24,代码来源:RTSCTS.cpp
示例20: value
RadioBearerID::RadioBearerID(const RadioBearerIDBuilder* factory,
const wns::ldk::CompoundPtr& compound)
{
wns::ldk::CommandPool* commandPool = compound->getCommandPool();
dll::UpperCommand* pdcpCommand = factory->friends.pdcpReader->readCommand<dll::UpperCommand>(commandPool);
// TODO: move pdcpCommand to own class that includes a EPS/radio bearer
size_t hash = 0; // the hash value (ID) should be the same regardless of the direction -> min/max
boost::hash_combine(hash, std::min(pdcpCommand->peer.sourceMACAddress.getInteger(), pdcpCommand->peer.targetMACAddress.getInteger()));
boost::hash_combine(hash, std::max(pdcpCommand->peer.sourceMACAddress.getInteger(), pdcpCommand->peer.targetMACAddress.getInteger()));
// basically casting unsigned to signed int but as long as it is still unique
// negative flowIDs should not make a difference
radioBearerID = -static_cast<wns::service::dll::FlowID>(hash);
}
开发者ID:lshmenor,项目名称:IMTAphy,代码行数:16,代码来源:RadioBearerID.cpp
注:本文中的wns::ldk::CompoundPtr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论