Skip to content

Commit 6360a42

Browse files
committed
LteChannelModel: Rename isError() to isReceptionSuccessful()
Because it returns true for success, and false for reception error. Ditto for isError_D2D()
1 parent 53861fe commit 6360a42

11 files changed

Lines changed: 18 additions & 23 deletions

src/simu5g/stack/phy/LtePhyEnb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void LtePhyEnb::handleAirFrame(cMessage *msg)
176176
return; // If frame contains a control packet no further action is needed
177177

178178
// DAS removed - single antenna only
179-
bool result = channelModel->isError(frame, lteInfo);
179+
bool result = channelModel->isReceptionSuccessful(frame, lteInfo);
180180
if (result)
181181
numAirFrameReceived_++;
182182
else

src/simu5g/stack/phy/LtePhyEnbD2D.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void LtePhyEnbD2D::handleAirFrame(cMessage *msg)
195195
return; // If frame contains a control pkt no further action is needed
196196

197197
// DAS removed - single antenna only
198-
bool result = channelModel->isError(frame, lteInfo);
198+
bool result = channelModel->isReceptionSuccessful(frame, lteInfo);
199199
if (result)
200200
numAirFrameReceived_++;
201201
else

src/simu5g/stack/phy/LtePhyUe.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ void LtePhyUe::handleAirFrame(cMessage *msg)
471471
recordCqi(cqi, DL);
472472
}
473473
// apply decider to received packet (DAS removed - single antenna only)
474-
bool result = channelModel->isError(frame, lteInfo);
474+
bool result = channelModel->isReceptionSuccessful(frame, lteInfo);
475475

476476
// update statistics
477477
if (result)

src/simu5g/stack/phy/LtePhyUeD2D.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void LtePhyUeD2D::handleAirFrame(cMessage *msg)
190190
}
191191

192192
// Apply decider to received packet.
193-
bool result = channelModel->isError(frame, lteInfo);
193+
bool result = channelModel->isReceptionSuccessful(frame, lteInfo);
194194

195195
// Update statistics.
196196
if (result)
@@ -432,9 +432,9 @@ void LtePhyUeD2D::decodeAirFrame(LteAirFrame *frame, UserControlInfo *lteInfo)
432432
// Apply decider to received packet
433433
bool result;
434434
if (lteInfo->getDirection() == D2D_MULTI)
435-
result = channelModel->isError_D2D(frame, lteInfo, bestRsrpVector_);
435+
result = channelModel->isReceptionSuccessful_D2D(frame, lteInfo, bestRsrpVector_);
436436
else
437-
result = channelModel->isError(frame, lteInfo);
437+
result = channelModel->isReceptionSuccessful(frame, lteInfo);
438438

439439
// Update statistics
440440
if (result)

src/simu5g/stack/phy/NrPhyUe.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void NrPhyUe::handleAirFrame(cMessage *msg)
157157
}
158158
}
159159

160-
bool result = channelModel->isError(frame, lteInfo);
160+
bool result = channelModel->isReceptionSuccessful(frame, lteInfo);
161161

162162
// Update statistics
163163
if (result)

src/simu5g/stack/phy/channelmodel/LteChannelModel.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,7 @@ std::vector<double> LteChannelModel::getSIR(LteAirFrame *frame, UserControlInfo
7272
return tmp;
7373
}
7474

75-
bool LteChannelModel::isError(LteAirFrame *frame, UserControlInfo *lteInfo)
76-
{
77-
return true;
78-
}
79-
80-
bool LteChannelModel::isError_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector)
75+
bool LteChannelModel::isReceptionSuccessful_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector)
8176
{
8277
return true;
8378
}

src/simu5g/stack/phy/channelmodel/LteChannelModel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class LteChannelModel : public cSimpleModule
8181
* @param frame pointer to the packet
8282
* @param lteInfo pointer to the user control info
8383
*/
84-
virtual bool isError(LteAirFrame *frame, UserControlInfo *lteI) = 0;
84+
virtual bool isReceptionSuccessful(LteAirFrame *frame, UserControlInfo *lteInfo) = 0;
8585

8686
/*
8787
* Compute Attenuation caused by path loss and shadowing (optional)
@@ -134,7 +134,7 @@ class LteChannelModel : public cSimpleModule
134134
* @param lteInfo pointer to the user control info
135135
* @param rsrpVector the received signal for each RB, if it has already been computed
136136
*/
137-
virtual bool isError_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector) = 0;
137+
virtual bool isReceptionSuccessful_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector) = 0;
138138
/*
139139
* Compute received useful signal for each band for user nodeId according to path loss, shadowing (optional), and multipath fading
140140
*

src/simu5g/stack/phy/channelmodel/LteDummyChannelModel.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ std::vector<double> LteDummyChannelModel::getSIR(LteAirFrame *frame, UserControl
9292
return tmp;
9393
}
9494

95-
bool LteDummyChannelModel::isError(LteAirFrame *frame, UserControlInfo *lteInfo)
95+
bool LteDummyChannelModel::isReceptionSuccessful(LteAirFrame *frame, UserControlInfo *lteInfo)
9696
{
9797
// Number of RTX
9898
unsigned char nTx = lteInfo->getTxNumber();
@@ -118,7 +118,7 @@ bool LteDummyChannelModel::isError(LteAirFrame *frame, UserControlInfo *lteInfo)
118118
return true;
119119
}
120120

121-
bool LteDummyChannelModel::isError_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector)
121+
bool LteDummyChannelModel::isReceptionSuccessful_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector)
122122
{
123123
// Number of RTX
124124
unsigned char nTx = lteInfo->getTxNumber();

src/simu5g/stack/phy/channelmodel/LteDummyChannelModel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LteDummyChannelModel : public LteChannelModel
3434
* @param frame pointer to the packet
3535
* @param lteInfo pointer to the user control info
3636
*/
37-
bool isError(LteAirFrame *frame, UserControlInfo *lteInfo) override;
37+
bool isReceptionSuccessful(LteAirFrame *frame, UserControlInfo *lteInfo) override;
3838
/*
3939
* Compute the path-loss attenuation according to the selected scenario
4040
*/
@@ -92,7 +92,7 @@ class LteDummyChannelModel : public LteChannelModel
9292
* @param lteInfo pointer to the user control info
9393
* @param rsrpVector the received signal for each RB, if it has already been computed
9494
*/
95-
bool isError_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector) override;
95+
bool isReceptionSuccessful_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector) override;
9696
/*
9797
* Compute received useful signal for D2D transmissions
9898
*/

src/simu5g/stack/phy/channelmodel/LteRealisticChannelModel.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ double LteRealisticChannelModel::jakesFading(MacNodeId nodeId, double speed,
17051705
return linearToDb(re_h * re_h + im_h * im_h);
17061706
}
17071707

1708-
bool LteRealisticChannelModel::isError(LteAirFrame *frame, UserControlInfo *lteInfo)
1708+
bool LteRealisticChannelModel::isReceptionSuccessful(LteAirFrame *frame, UserControlInfo *lteInfo)
17091709
{
17101710
EV << "LteRealisticChannelModel::error" << endl;
17111711

@@ -1847,7 +1847,7 @@ bool LteRealisticChannelModel::isError(LteAirFrame *frame, UserControlInfo *lteI
18471847
return true;
18481848
}
18491849

1850-
bool LteRealisticChannelModel::isError_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector)
1850+
bool LteRealisticChannelModel::isReceptionSuccessful_D2D(LteAirFrame *frame, UserControlInfo *lteInfo, const std::vector<double>& rsrpVector)
18511851
{
18521852
EV << "LteRealisticChannelModel::error_D2D" << endl;
18531853

0 commit comments

Comments
 (0)