1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
3 * Copyright (c) 2022 Northeastern University
4 * Copyright (c) 2022 Sapienza, University of Rome
5 * Copyright (c) 2022 University of Padova
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation;
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * Author: Andrea Lacava <thecave003@gmail.com>
21 * Tommaso Zugno <tommasozugno@gmail.com>
22 * Michele Polese <michele.polese@gmail.com>
26 #include <ns3/lte-indication-message-helper.h>
30 LteIndicationMessageHelper::LteIndicationMessageHelper (IndicationMessageType type, bool isOffline,
32 : IndicationMessageHelper (type, isOffline, reducedPmValues)
34 NS_ABORT_MSG_IF (type == IndicationMessageType::Du,
35 "Wrong type for LTE Indication Message, expected CuUp or CuCp");
39 LteIndicationMessageHelper::AddCuUpUePmItem (std::string ueImsiComplete, long txBytes,
40 long txDlPackets, double pdcpThroughput,
43 Ptr<MeasurementItemList> ueVal = Create<MeasurementItemList> (ueImsiComplete);
45 if (!m_reducedPmValues)
47 // UE-specific PDCP SDU volume from LTE eNB. Unit is Mbits
48 ueVal->AddItem<long> ("DRB.PdcpSduVolumeDl_Filter.UEID", txBytes);
50 // UE-specific number of PDCP SDUs from LTE eNB
51 ueVal->AddItem<long> ("Tot.PdcpSduNbrDl.UEID", txDlPackets);
53 // UE-specific Downlink IP combined EN-DC throughput from LTE eNB. Unit is kbps
54 ueVal->AddItem<double> ("DRB.PdcpSduBitRateDl.UEID", pdcpThroughput);
56 //UE-specific Downlink IP combined EN-DC throughput from LTE eNB
57 ueVal->AddItem<double> ("DRB.PdcpSduDelayDl.UEID", pdcpLatency);
60 m_msgValues.m_ueIndications.insert (ueVal);
64 LteIndicationMessageHelper::AddCuUpCellPmItem (double cellAverageLatency)
66 if (!m_reducedPmValues)
68 Ptr<MeasurementItemList> cellVal = Create<MeasurementItemList> ();
69 cellVal->AddItem<double> ("DRB.PdcpSduDelayDl", cellAverageLatency);
70 m_msgValues.m_cellMeasurementItems = cellVal;
75 LteIndicationMessageHelper::FillCuUpValues (std::string plmId, long pdcpBytesUl, long pdcpBytesDl)
77 m_cuUpValues->m_pDCPBytesUL = pdcpBytesUl;
78 m_cuUpValues->m_pDCPBytesDL = pdcpBytesDl;
79 FillBaseCuUpValues (plmId);
83 LteIndicationMessageHelper::FillCuCpValues (uint16_t numActiveUes)
85 FillBaseCuCpValues (numActiveUes);
89 LteIndicationMessageHelper::AddCuCpUePmItem (std::string ueImsiComplete, long numDrb,
93 Ptr<MeasurementItemList> ueVal = Create<MeasurementItemList> (ueImsiComplete);
94 if (!m_reducedPmValues)
96 ueVal->AddItem<long> ("DRB.EstabSucc.5QI.UEID", numDrb);
97 ueVal->AddItem<long> ("DRB.RelActNbr.5QI.UEID", drbRelAct); // not modeled in the simulator
99 m_msgValues.m_ueIndications.insert (ueVal);
102 LteIndicationMessageHelper::~LteIndicationMessageHelper ()