From c38326f941579e784acd36d337e355cf578606e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Schuhb=C3=A4ck?= Date: Mon, 28 Jun 2021 10:52:41 +0200 Subject: [PATCH] use candiateMasterRssi_ with -120 for dynamic assositiation --- src/stack/phy/layer/LtePhyUe.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/stack/phy/layer/LtePhyUe.cc b/src/stack/phy/layer/LtePhyUe.cc index b81246e7..0509c600 100644 --- a/src/stack/phy/layer/LtePhyUe.cc +++ b/src/stack/phy/layer/LtePhyUe.cc @@ -41,7 +41,7 @@ void LtePhyUe::initialize(int stage) handoverLatency_ = par("handoverLatency").doubleValue(); dynamicCellAssociation_ = par("dynamicCellAssociation"); currentMasterRssi_ = 0; - candidateMasterRssi_ = 0; + candidateMasterRssi_ = -120.0; // set do MIN_VALUE to allow best eNB selection during dynamic association hysteresisTh_ = 0; hysteresisFactor_ = 10; handoverDelta_ = 0.00001; @@ -127,7 +127,8 @@ void LtePhyUe::initialize(int stage) rssi += *it; rssi /= rssiV.size(); // compute the mean over all RBs - EV << "LtePhyUe::initialize - RSSI from eNodeB " << cellId << ": " << rssi << " dB (current candidate eNodeB " << candidateMasterId_ << ": " << candidateMasterRssi_ << " dB" << endl; + EV << "LtePhyUe::initialize - RSSI from eNodeB " << cellId << ": " << rssi << " dB (current candidate eNodeB " + << candidateMasterId_ << ": " << candidateMasterRssi_ << " dB" << endl; if (rssi > candidateMasterRssi_) { @@ -218,7 +219,8 @@ void LtePhyUe::handoverHandler(LteAirFrame* frame, UserControlInfo* lteInfo) rssi /= rssiV.size(); } - EV << "UE " << nodeId_ << " broadcast frame from " << lteInfo->getSourceId() << " with RSSI: " << rssi << " at " << simTime() << endl; + EV << "UE " << nodeId_ << " broadcast frame from " << lteInfo->getSourceId() + << " with RSSI: " << rssi << " at " << simTime() << endl; if (rssi > candidateMasterRssi_ + hysteresisTh_) {