D2dUeMacBase.h Source File¶
|
Simu5G
|
D2dUeMacBase.h
4// Copyright (C) 2012-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
101 bool isBsrPending() const override { return this->bsrTriggered_ || d2dUeHelper_.getBsrD2DMulticastTriggered(); }
119 MacNodeId pduDestId(MacCid destCid) override { return this->connDescOut_.at(destCid).flowInfo.getDestId(); }
123 bool shouldSkipScheduleEntry(unsigned int sduPerCid) const override { return sduPerCid == 0 && !this->isBsrPending(); }
177 d2dUeHelper_.setEnb(check_and_cast<ID2dMacEnb *>(this->binder_->getMacByNodeId(this->cellId_)));
179 LteAmc *amc = check_and_cast<LteMacEnb *>(this->binder_->getMacByNodeId(this->cellId_))->getAmc();
212 LogicalCid bsrType = d2dUeHelper_.getBsrD2DMulticastTriggered() ? D2D_MULTI_SHORT_BSR : D2D_SHORT_BSR;
226 EV << "D2dUeMacBase::buildStandaloneBsr - BSR D2D created with size " << sizeBsr << " bytes created" << endl;
272LteHarqBufferRx *D2dUeMacBase<Base>::createRxHarqBuffer(MacNodeId src, const UserControlInfo *userInfo)
276 return new LteHarqBufferRxD2D(this->harqProcesses_, this, this->binder_, src, (dir == D2D_MULTI));
283 // NOTE: unlike the base class, the UL buffer is paired with the MAC of destId, not of the serving cell
285 return new LteHarqBufferTx(this->binder_, (unsigned int)this->harqProcesses_, this, check_and_cast<LteMacBase *>(this->binder_->getMacByNodeId(destId)));
287 return new LteHarqBufferTxD2D(this->binder_, (unsigned int)this->harqProcesses_, this, check_and_cast<LteMacBase *>(this->binder_->getMacByNodeId(destId)));
330 EV << NOW << " D2dUeMacBase::macHandleGrant - UE [" << this->nodeId_ << "] - Grant received " << endl;
338 EV << NOW << " D2dUeMacBase::macHandleGrant - Direction: " << dirToA(grant->getDirection()) << " Carrier: " << carrierFrequency << endl;
341 if (this->schedulingGrant_.find(carrierFrequency) != this->schedulingGrant_.end() && this->schedulingGrant_[carrierFrequency] != nullptr) {
352 EV << NOW << " Node " << this->nodeId_ << " received grant of blocks " << grant->getTotalGrantedBlocks()
353 << ", bytes " << grant->getGrantedCwBytes(0) << " Direction: " << dirToA(grant->getDirection()) << endl;
365 EV << NOW << " D2dUeMacBase::checkRAC , Ue " << this->nodeId_ << ", racTimer : " << this->racBackoffTimer_ << " maxRacTryOuts : " << this->maxRacTryouts_
376 EV << NOW << " D2dUeMacBase::checkRAC - waiting for previous RAC requests to complete (timer=" << this->raRespTimer_ << ")" << endl;
383 EV << NOW << " D2dUeMacBase::checkRAC - waiting for a grant, BSR rtx timer has not expired yet (timer=" << this->bsrRtxTimer_ << ")" << endl;
414 EV << NOW << " D2dUeMacBase::checkRAC , Ue " << this->nodeId_ << ", RAC aborted, no data in queues " << endl;
437 EV << NOW << " Ue " << this->nodeId_ << " cell " << this->cellId_ << ", RAC request sent to PHY (preamble="
Definition ChannelModelBase.h:145
Definition D2dUeMacBase.h:70
int64_t appendBsr(inet::Ptr< LteMacPdu > macPdu) override
Definition D2dUeMacBase.h:105
LteHarqBufferRx * createRxHarqBuffer(MacNodeId src, const UserControlInfo *userInfo) override
HARQ buffer factories: add support for the D2D and D2D_MULTI directions.
Definition D2dUeMacBase.h:272
UnitList reserveTxHarqUnits(LteHarqBufferTx *txBuf, Direction dir) override
Definition D2dUeMacBase.h:130
bool shouldSkipScheduleEntry(unsigned int sduPerCid) const override
Definition D2dUeMacBase.h:123
LcgScheduler * createLcgScheduler() override
Factory override: use the D2D-capable LCG scheduler.
Definition D2dUeMacBase.h:291
void handleMessage(cMessage *msg) override
Definition D2dUeMacBase.h:297
void recordBufferOverflow(Direction dir, double sample) override
The D2D directions are serviced here; everything else defers to the core MAC.
Definition D2dUeMacBase.h:80
bool buildStandaloneBsr() override
Definition D2dUeMacBase.h:186
void macHandleRac(cPacket *pkt) override
Definition D2dUeMacBase.h:446
MacNodeId pduDestId(MacCid destCid) override
D2D bearers are peer-addressed: the destination comes from the flow, not the cell.
Definition D2dUeMacBase.h:119
Definition LcgSchedulerD2D.h:29
Definition LcgScheduler.h:43
Definition LteHarqBufferRxD2D.h:36
Definition LteHarqBufferRx.h:37
Definition LteTypes.h:153
Definition AlertReceiver.h:24
constexpr LogicalCid SHORT_BSR
Special LogicalCid values for Buffer Status Reports.
Definition LteTypes.h:112
std::pair< unsigned char, CwList > UnitList
Pair of acid, list of unit ids.
Definition LteCommon.h:395
Generated by