5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-helper.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef NR_HELPER_H
6#define NR_HELPER_H
7
8#include "cc-bwp-helper.h"
9#include "ideal-beamforming-helper.h"
10#include "nr-bearer-stats-connector.h"
11#include "nr-mac-scheduling-stats.h"
12
13#include "ns3/net-device-container.h"
14#include "ns3/node-container.h"
15#include "ns3/nr-component-carrier.h"
16#include "ns3/nr-control-messages.h"
17#include "ns3/nr-eps-bearer.h"
18#include "ns3/nr-spectrum-phy.h"
19#include "ns3/object-factory.h"
20
21namespace ns3
22{
23
24class NrUePhy;
25class NrGnbPhy;
26class SpectrumChannel;
27class NrSpectrumValueHelper;
28class NrGnbMac;
29class NrEpcHelper;
30class NrEpcTft;
31class NrBearerStatsCalculator;
32class NrMacRxTrace;
33class NrPhyRxTrace;
34class NrMacScheduler;
35class NrGnbNetDevice;
36class NrUeNetDevice;
37class NrUeMac;
38class BwpManagerGnb;
39class BwpManagerUe;
40class NrFhControl;
41
206class NrHelper : public Object
207{
208 public:
212 NrHelper();
216 ~NrHelper() override;
217
222 static TypeId GetTypeId();
223
231 NetDeviceContainer InstallUeDevice(
232 const NodeContainer& c,
233 const std::vector<std::reference_wrapper<BandwidthPartInfoPtr>>& allBwps);
240 NetDeviceContainer InstallGnbDevice(
241 const NodeContainer& c,
242 const std::vector<std::reference_wrapper<BandwidthPartInfoPtr>> allBwps);
243
249 static uint32_t GetNumberBwp(const Ptr<const NetDevice>& gnbDevice);
256 static Ptr<NrGnbPhy> GetGnbPhy(const Ptr<NetDevice>& gnbDevice, uint32_t bwpIndex);
263 static Ptr<NrGnbMac> GetGnbMac(const Ptr<NetDevice>& gnbDevice, uint32_t bwpIndex);
270 static Ptr<NrUeMac> GetUeMac(const Ptr<NetDevice>& ueDevice, uint32_t bwpIndex);
277 static Ptr<NrUePhy> GetUePhy(const Ptr<NetDevice>& ueDevice, uint32_t bwpIndex);
283 static Ptr<BwpManagerGnb> GetBwpManagerGnb(const Ptr<NetDevice>& gnbDevice);
289 static Ptr<BwpManagerUe> GetBwpManagerUe(const Ptr<NetDevice>& ueDevice);
296 static Ptr<NrMacScheduler> GetScheduler(const Ptr<NetDevice>& gnbDevice, uint32_t bwpIndex);
297
303 void AttachToMaxRsrpGnb(const NetDeviceContainer& ueDevices,
304 const NetDeviceContainer& gnbDevices);
310 void AttachToClosestGnb(const NetDeviceContainer& ueDevices,
311 const NetDeviceContainer& gnbDevices);
317 void AttachToGnb(const Ptr<NetDevice>& ueDevice, const Ptr<NetDevice>& gnbDevice);
318
327 void EnableTraces();
328
335 void ActivateDataRadioBearer(NetDeviceContainer ueDevices, NrEpsBearer bearer);
345 void ActivateDataRadioBearer(Ptr<NetDevice> ueDevice, NrEpsBearer bearer);
359 void SetEpcHelper(Ptr<NrEpcHelper> NrEpcHelper);
360
366 void SetBeamformingHelper(Ptr<BeamformingHelperBase> beamformingHelper);
367
374 void SetSnrTest(bool snrTest);
379 bool GetSnrTest() const;
380
389 uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices,
390 NrEpsBearer bearer,
391 Ptr<NrEpcTft> tft);
392
401 uint8_t ActivateDedicatedEpsBearer(Ptr<NetDevice> ueDevice,
402 NrEpsBearer bearer,
403 Ptr<NrEpcTft> tft);
404
415 void DeActivateDedicatedEpsBearer(Ptr<NetDevice> ueDevice,
416 Ptr<NetDevice> gnbDevice,
417 uint8_t bearerId);
418
426 void SetUeMacAttribute(const std::string& n, const AttributeValue& v);
427
435 void SetGnbMacAttribute(const std::string& n, const AttributeValue& v);
436
441 void SetUeAntennaTypeId(const std::string&);
442
447 void SetGnbAntennaTypeId(const std::string&);
448
456 void SetGnbSpectrumAttribute(const std::string& n, const AttributeValue& v);
457
465 void SetUeSpectrumAttribute(const std::string& n, const AttributeValue& v);
466
475 void SetUeChannelAccessManagerAttribute(const std::string& n, const AttributeValue& v);
476
485 void SetGnbChannelAccessManagerAttribute(const std::string& n, const AttributeValue& v);
486
494 void SetSchedulerAttribute(const std::string& n, const AttributeValue& v);
495
504 void SetUePhyAttribute(const std::string& n, const AttributeValue& v);
505
514 void SetGnbPhyAttribute(const std::string& n, const AttributeValue& v);
515
524 void SetUeAntennaAttribute(const std::string& n, const AttributeValue& v);
525
534 void SetGnbAntennaAttribute(const std::string& n, const AttributeValue& v);
535
544 void SetUeChannelAccessManagerTypeId(const TypeId& typeId);
545
554 void SetGnbChannelAccessManagerTypeId(const TypeId& typeId);
555
567 void SetSchedulerTypeId(const TypeId& typeId);
568
575 void SetGnbBwpManagerAlgorithmTypeId(const TypeId& typeId);
576
583 void SetGnbBwpManagerAlgorithmAttribute(const std::string& n, const AttributeValue& v);
584
591 void SetUeBwpManagerAlgorithmTypeId(const TypeId& typeId);
592
599 void SetUeBwpManagerAlgorithmAttribute(const std::string& n, const AttributeValue& v);
600
609 void SetGnbDlAmcAttribute(const std::string& n, const AttributeValue& v);
610
619 void SetGnbUlAmcAttribute(const std::string& n, const AttributeValue& v);
620
621 /*
622 * @brief Sets beam managers attribute.
623 * @param n the name of the attribute
624 * @param v the value of the attribute
625 */
626 void SetGnbBeamManagerAttribute(const std::string& n, const AttributeValue& v);
627
633 void SetGnbBeamManagerTypeId(const TypeId& typeId);
634
652 void SetUlErrorModel(const std::string& errorModelTypeId);
653
670 void SetDlErrorModel(const std::string& errorModelTypeId);
671
678 void EnableFhControl();
679
689 void ConfigureFhControl(NetDeviceContainer gnbNetDevices);
690
691 /*
692 * @brief Sets the FH Control attributes.
693 * @param n the name of the attribute
694 * @param v the value of the attribute
695 */
696 void SetFhControlAttribute(const std::string& n, const AttributeValue& v);
697
702
707
711 void EnableUlPhyTraces();
712
720 Ptr<NrPhyRxTrace> GetPhyRxTrace();
721
729 Ptr<NrMacRxTrace> GetMacRxTrace();
730
735
741
750
755
760
765
770
776 Ptr<NrBearerStatsCalculator> GetRlcStatsCalculator();
777
782
787
791 void EnableRlcE2eTraces();
792
796 void EnablePdcpE2eTraces();
797
803 Ptr<NrBearerStatsCalculator> GetPdcpStatsCalculator();
804
809
814
819
820 /*
821 * @brief Enable DL CTRL pathloss trace from a serving cell (this trace connects
822 * to NrSpectrumPhy trace, which is implementation wise different from
823 * EnablePathlossTrace function which is implemented in by using
824 * MultiModelSpectrumChannel trace and which
825 * generates pathloss traces for both DL and UL
826 */
827 void EnableDlCtrlPathlossTraces(NetDeviceContainer& netDeviceContainer);
828
829 /*
830 * @brief Enable DL CTRL pathloss trace from a serving cell (this trace connects
831 * to NrSpectrumPhy trace, which is implementation wise different from
832 * EnablePathlossTrace function which is implemented in by using
833 * MultiModelSpectrumChannel trace and which generates pathloss traces for
834 * both DL and UL)
835 */
836 void EnableDlDataPathlossTraces(NetDeviceContainer& netDeviceContainer);
837
850 int64_t AssignStreams(NetDeviceContainer c, int64_t stream);
851
854 {
855 std::string antennaElem{"ns3::IsotropicAntennaModel"};
856 size_t nAntCols{1};
857 size_t nAntRows{1};
858 bool isDualPolarized{false};
859 size_t nHorizPorts{1};
860 size_t nVertPorts{1};
861 double bearingAngle{0.0};
862 double polSlantAngle{0.0};
863 double downtiltAngle{0.0};
864 };
865
868 {
869 std::string pmSearchMethod{"ns3::NrPmSearchFull"};
870 std::string fullSearchCb{"ns3::NrCbTwoPort"};
871 uint8_t rankLimit{UINT8_MAX};
873 double rankThreshold{0.0};
875 std::string rankTechnique{"Sasaoka"};
876 uint8_t subbandSize{1};
877 std::string downsamplingTechnique{"FirstPRB"};
878 };
879
882 {
883 std::vector<double> rowAngles{0, 90};
884 std::vector<double> colAngles{0, 90};
885 double handoffMargin{0};
887 };
888
891 void SetPmSearchTypeId(const TypeId& typeId);
892
896 void SetPmSearchAttribute(const std::string& name, const AttributeValue& value);
897
900 void SetInitialAssocTypeId(const TypeId& typeId);
901
905 void SetInitialAssocAttribute(const std::string& name, const AttributeValue& value);
906
909 void SetupGnbAntennas(const AntennaParams& ap);
910
913 void SetupUeAntennas(const AntennaParams& ap);
914
917 void SetupMimoPmi(const MimoPmiParams& mp);
918
921 void SetupInitialAssoc(const InitialAssocParams& params);
922
929 std::pair<double, BandwidthPartInfoPtrVector> CreateBandwidthParts(
930 std::vector<CcBwpCreator::SimpleOperationBandConf> bandConfs,
931 const std::string& scenario = "RMa",
932 const std::string& channelCondition = "Default",
933 const std::string& channelModel = "ThreeGpp");
934
958 NS_DEPRECATED("Obsolete method")
959 void UpdateDeviceConfigs(const NetDeviceContainer& netDevs);
960
961 // Handover related functions
962 void AddX2Interface(NodeContainer gnbNodes);
963 void AddX2Interface(Ptr<Node> gnbNode1, Ptr<Node> gnbNode2);
964
965 std::string GetHandoverAlgorithmType() const;
966 void SetHandoverAlgorithmType(std::string type);
967 void SetHandoverAlgorithmAttribute(std::string n, const AttributeValue& v);
968 void HandoverRequest(Time hoTime,
969 Ptr<NetDevice> ueDev,
970 Ptr<NetDevice> sourceGnbDev,
971 Ptr<NetDevice> targetGnbDev);
972 void HandoverRequest(Time hoTime,
973 Ptr<NetDevice> ueDev,
974 Ptr<NetDevice> sourceGnbDev,
975 uint16_t targetCellId);
976
977 private:
978 bool m_enableMimoFeedback{false};
979 ObjectFactory m_pmSearchFactory;
980 uint8_t m_csiFeedbackFlags{
981 CQI_CSI_IM | CQI_CSI_RS |
982 CQI_PDSCH_MIMO};
984
1000 int64_t DoAssignStreamsToChannelObjects(Ptr<NrSpectrumPhy> phy, int64_t currentStream);
1001
1011 void DoDeActivateDedicatedEpsBearer(Ptr<NetDevice> ueDevice,
1012 Ptr<NetDevice> gnbDevice,
1013 uint8_t bearerId);
1014
1015 Ptr<NrGnbPhy> CreateGnbPhy(const Ptr<Node>& n,
1016 const BandwidthPartInfoPtr& bwp,
1017 const Ptr<NrGnbNetDevice>& dev,
1018 const NrSpectrumPhy::NrPhyRxCtrlEndOkCallback& phyEndCtrlCallback);
1019 Ptr<NrMacScheduler> CreateGnbSched();
1020 Ptr<NrGnbMac> CreateGnbMac();
1021 Ptr<NrFhControl> CreateNrFhControl();
1022
1023 Ptr<NrUeMac> CreateUeMac() const;
1024 Ptr<NrUePhy> CreateUePhy(const Ptr<Node>& n,
1025 const BandwidthPartInfoPtr& bwp,
1026 const Ptr<NrUeNetDevice>& dev,
1027 const NrSpectrumPhy::NrPhyDlHarqFeedbackCallback& dlHarqCallback,
1028 const NrSpectrumPhy::NrPhyRxCtrlEndOkCallback& phyRxCtrlCallback);
1029
1030 Ptr<NetDevice> InstallSingleUeDevice(
1031 const Ptr<Node>& n,
1032 const std::vector<std::reference_wrapper<BandwidthPartInfoPtr>> allBwps);
1033 Ptr<NetDevice> InstallSingleGnbDevice(
1034 const Ptr<Node>& n,
1035 const std::vector<std::reference_wrapper<BandwidthPartInfoPtr>> allBwps);
1036
1037 void DoHandoverRequest(Ptr<NetDevice> ueDev,
1038 Ptr<NetDevice> sourceGnbDev,
1039 uint16_t targetCellId);
1040 void AttachToClosestGnb(const Ptr<NetDevice>& ueDevice, const NetDeviceContainer& gnbDevices);
1041
1042 void AttachToMaxRsrpGnb(const Ptr<NetDevice>& ueDevice, const NetDeviceContainer& gnbDevices);
1043
1044 ObjectFactory m_gnbNetDeviceFactory;
1045 ObjectFactory m_ueNetDeviceFactory;
1046 ObjectFactory m_channelFactory;
1047 ObjectFactory m_ueMacFactory;
1048 ObjectFactory m_gnbMacFactory;
1049 ObjectFactory m_ueSpectrumFactory;
1050 ObjectFactory m_gnbSpectrumFactory;
1051 ObjectFactory m_uePhyFactory;
1052 ObjectFactory m_gnbPhyFactory;
1053 ObjectFactory m_ueChannelAccessManagerFactory;
1054 ObjectFactory m_gnbChannelAccessManagerFactory;
1055 ObjectFactory m_schedFactory;
1056 ObjectFactory m_ueAntennaFactory;
1057 ObjectFactory m_gnbAntennaFactory;
1058 ObjectFactory m_gnbBwpManagerAlgoFactory;
1059 ObjectFactory m_ueBwpManagerAlgoFactory;
1060 ObjectFactory m_channelConditionModelFactory;
1061 ObjectFactory m_spectrumPropagationFactory;
1062 ObjectFactory m_pathlossModelFactory;
1063 ObjectFactory m_gnbDlAmcFactory;
1064 ObjectFactory m_gnbUlAmcFactory;
1065 ObjectFactory m_gnbBeamManagerFactory;
1066 ObjectFactory m_ueBeamManagerFactory;
1067 ObjectFactory m_handoverAlgorithmFactory;
1068 ObjectFactory m_fhControlFactory;
1069 ObjectFactory m_initialAttachmentFactory;
1070
1071 uint16_t m_cellIdCounter{1};
1072
1073 Ptr<NrEpcHelper> m_nrEpcHelper{nullptr};
1074 Ptr<BeamformingHelperBase> m_beamformingHelper{nullptr};
1075
1076 bool m_snrTest{false};
1077 bool m_fhEnabled{false};
1078
1079 Ptr<NrPhyRxTrace> m_phyStats;
1080 Ptr<NrMacRxTrace> m_macStats;
1081
1082 NrBearerStatsConnector
1083 m_radioBearerStatsConnectorSimpleTraces;
1085 NrBearerStatsConnector
1086 m_radioBearerStatsConnectorCalculator;
1088
1089 std::map<uint8_t, NrComponentCarrier> m_componentCarrierPhyParams;
1090 std::vector<Ptr<Object>>
1091 m_channelObjectsWithAssignedStreams;
1094 Ptr<NrMacSchedulingStats> m_macSchedStats;
1095 bool m_useIdealRrc;
1096 std::vector<OperationBandInfo> m_bands;
1097
1098 InitialAssocParams
1099 m_initialParams;
1100};
1101
1102} // namespace ns3
1103
1104#endif /* NR_HELPER_H */
Base helper class to handle the creation of the EPC entities.
This class contains the specification of EPS Bearers.
Helper to set up single- or multi-cell scenarios with NR.
Definition nr-helper.h:207
void EnableDlDataPhyTraces()
Enable DL DATA PHY traces.
static Ptr< BwpManagerGnb > GetBwpManagerGnb(const Ptr< NetDevice > &gnbDevice)
Get the BwpManager of the GNB.
Definition nr-helper.cc:238
std::pair< double, BandwidthPartInfoPtrVector > CreateBandwidthParts(std::vector< CcBwpCreator::SimpleOperationBandConf > bandConfs, const std::string &scenario="RMa", const std::string &channelCondition="Default", const std::string &channelModel="ThreeGpp")
Create BandwidthParts from a vector of band configurations.
Definition nr-helper.cc:151
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, NrEpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices.
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
void UpdateDeviceConfigs(const NetDeviceContainer &netDevs)
Update NetDevice configuration of one or more devices.
Definition nr-helper.cc:324
static Ptr< NrUeMac > GetUeMac(const Ptr< NetDevice > &ueDevice, uint32_t bwpIndex)
Get a pointer to the MAC of the UE at the specified BWP.
Definition nr-helper.cc:212
void EnableTraces()
Enables the following traces: Transmitted/Received Control Messages DL/UL Phy Traces RLC traces PDCP ...
void SetupInitialAssoc(const InitialAssocParams &params)
Set parameters for max RSRP based Initial Association.
void ConfigureFhControl(NetDeviceContainer gnbNetDevices)
Configure FH Control of each cell.
NetDeviceContainer InstallGnbDevice(const NodeContainer &c, const std::vector< std::reference_wrapper< BandwidthPartInfoPtr > > allBwps)
Install one (or more) GNBs.
Definition nr-helper.cc:308
void SetBeamformingHelper(Ptr< BeamformingHelperBase > beamformingHelper)
Set an ideal beamforming helper.
void SetGnbDlAmcAttribute(const std::string &n, const AttributeValue &v)
NrHelper()
NrHelper constructor.
Definition nr-helper.cc:60
Ptr< NrBearerStatsCalculator > GetPdcpStatsCalculator()
Get the PDCP stats calculator object.
void DeActivateDedicatedEpsBearer(Ptr< NetDevice > ueDevice, Ptr< NetDevice > gnbDevice, uint8_t bearerId)
Manually trigger dedicated bearer de-activation at specific simulation time.
void EnableUePhyCtrlMsgsTraces()
Enable UE PHY CTRL TX and RX traces.
void EnableRlcSimpleTraces()
Enable RLC simple traces (DL RLC TX, DL RLC RX, UL DL TX, UL DL RX)
void SetUeAntennaAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the UE antenna, before it is created.
void SetUeChannelAccessManagerAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the UE channel access manager, before it is created.
bool GetSnrTest() const
GetSnrTest.
Definition nr-helper.cc:286
void EnableGnbPhyCtrlMsgsTraces()
Enable gNB PHY CTRL TX and RX traces.
~NrHelper() override
~NrHelper
Definition nr-helper.cc:96
void SetGnbBwpManagerAlgorithmTypeId(const TypeId &typeId)
Set the TypeId of the GNB BWP Manager. Works only before it is created.
static Ptr< BwpManagerUe > GetBwpManagerUe(const Ptr< NetDevice > &ueDevice)
Get the BwpManager of the UE.
Definition nr-helper.cc:252
void EnableDlMacSchedTraces()
void SetInitialAssocAttribute(const std::string &name, const AttributeValue &value)
Set attribute of the initial attachment algorithm.
void SetUeMacAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the UE MAC, before it is created.
void SetUlErrorModel(const std::string &errorModelTypeId)
Set the ErrorModel for UL AMC and UE spectrum at the same time.
void SetUeBwpManagerAlgorithmTypeId(const TypeId &typeId)
Set the TypeId of the UE BWP Manager. Works only before it is created.
void EnableUlPhyTraces()
Enable UL PHY traces.
void EnablePathlossTraces()
Enable trace sinks for DL and UL pathloss.
Ptr< NrMacRxTrace > GetMacRxTrace()
Get the mac stats trace object.
void AttachToClosestGnb(const NetDeviceContainer &ueDevices, const NetDeviceContainer &gnbDevices)
Attach the UE specified to the closest GNB.
void SetPmSearchAttribute(const std::string &name, const AttributeValue &value)
Set attribute of the precoding matrix search algorithm.
void SetGnbAntennaAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the GNB antenna, before it is created.
void SetGnbAntennaTypeId(const std::string &)
Set a different TypeId for the GNB antenna device.
void SetupGnbAntennas(const AntennaParams &ap)
Set parameters for gNB and UE antenna arrays.
void AttachToMaxRsrpGnb(const NetDeviceContainer &ueDevices, const NetDeviceContainer &gnbDevices)
Attach the UE specified to the max RSRP associated GNB.
static Ptr< NrGnbPhy > GetGnbPhy(const Ptr< NetDevice > &gnbDevice, uint32_t bwpIndex)
Get a pointer to the PHY of the GNB at the specified BWP.
Definition nr-helper.cc:186
void AttachToGnb(const Ptr< NetDevice > &ueDevice, const Ptr< NetDevice > &gnbDevice)
Attach a UE to a particular GNB.
void EnableUlMacSchedTraces()
void SetGnbUlAmcAttribute(const std::string &n, const AttributeValue &v)
void SetInitialAssocTypeId(const TypeId &typeId)
Set TypeId of the initial attachment algorithm.
static uint32_t GetNumberBwp(const Ptr< const NetDevice > &gnbDevice)
Get the number of configured BWP for a specific GNB NetDevice.
Definition nr-helper.cc:174
void EnableGnbMacCtrlMsgsTraces()
Enable gNB MAC CTRL TX and RX traces.
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, NrEpsBearer bearer, Ptr< NrEpcTft > tft)
void SetUeChannelAccessManagerTypeId(const TypeId &typeId)
Set the TypeId of the UE Channel Access Manager. Works only before it is created.
void SetUeAntennaTypeId(const std::string &)
Set a different TypeId for the UE antenna device.
Ptr< NrBearerStatsCalculator > GetRlcStatsCalculator()
Get the RLC stats calculator object.
void EnableTransportBlockTrace()
Enable transport block trace.
void EnableGnbPacketCountTrace()
Enable gNB packet count trace.
void SetDlErrorModel(const std::string &errorModelTypeId)
Set the ErrorModel for DL AMC and GNB spectrum at the same time.
void EnableRlcE2eTraces()
Enable RLC calculator and end-to-end RCL traces to file.
void EnablePdcpSimpleTraces()
Enable PDCP traces (DL PDCP TX, DL PDCP RX, UL PDCP TX, UL PDCP RX)
static Ptr< NrMacScheduler > GetScheduler(const Ptr< NetDevice > &gnbDevice, uint32_t bwpIndex)
Get the Scheduler from the GNB specified.
Definition nr-helper.cc:266
void SetUeBwpManagerAlgorithmAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the GNB BWP Manager, before it is created.
void SetEpcHelper(Ptr< NrEpcHelper > NrEpcHelper)
void SetGnbMacAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the GNB MAC, before it is created.
void SetGnbPhyAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the GNB PHY, before it is created.
void EnableDlCtrlPhyTraces()
Enable DL CTRL PHY traces.
void SetupUeAntennas(const AntennaParams &ap)
Set parameters for gNB and UE antenna arrays.
static Ptr< NrGnbMac > GetGnbMac(const Ptr< NetDevice > &gnbDevice, uint32_t bwpIndex)
Get a pointer to the MAC of the GNB at the specified BWP.
Definition nr-helper.cc:199
void SetUePhyAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the UE PHY, before it is created.
static Ptr< NrUePhy > GetUePhy(const Ptr< NetDevice > &ueDevice, uint32_t bwpIndex)
Get a pointer to the PHY of the UE at the specified BWP.
Definition nr-helper.cc:225
void SetupMimoPmi(const MimoPmiParams &mp)
Set parameters for PMI search in MIMO operation.
void EnableUePacketCountTrace()
Enable UE packet count trace.
static TypeId GetTypeId()
GetTypeId.
Definition nr-helper.cc:107
void SetUeSpectrumAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the UE spectrum, before it is created.
void SetSchedulerAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the scheduler, before it is created.
void EnableUeMacCtrlMsgsTraces()
Enable UE MAC CTRL TX and RX traces.
void SetSchedulerTypeId(const TypeId &typeId)
Set the Scheduler TypeId. Works only before it is created.
void SetGnbBwpManagerAlgorithmAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the GNB BWP Manager, before it is created.
Ptr< NrPhyRxTrace > GetPhyRxTrace()
Get the phy traces object.
void SetGnbSpectrumAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the GNB spectrum, before it is created.
NetDeviceContainer InstallUeDevice(const NodeContainer &c, const std::vector< std::reference_wrapper< BandwidthPartInfoPtr > > &allBwps)
Install one (or more) UEs.
Definition nr-helper.cc:292
void SetGnbChannelAccessManagerAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the GNB channel access manager, before it is created.
void EnablePdcpE2eTraces()
Enable PDCP calculator and end-to-end PDCP traces to file.
void SetGnbChannelAccessManagerTypeId(const TypeId &typeId)
Set the TypeId of the GNB Channel Access Manager. Works only before it is created.
void EnableFhControl()
Enable FH Control.
void SetGnbBeamManagerTypeId(const TypeId &typeId)
Set the TypeId of the beam manager.
void SetPmSearchTypeId(const TypeId &typeId)
Set TypeId of the precoding matrix search algorithm.
void SetSnrTest(bool snrTest)
SetSnrTest.
Definition nr-helper.cc:280
std::function< void(const std::list< Ptr< NrControlMessage > > &, uint8_t)> NrPhyRxCtrlEndOkCallback
This callback method type is used to notify that CTRL is received.
Callback< void, const DlHarqInfo & > NrPhyDlHarqFeedbackCallback
std::unique_ptr< BandwidthPartInfo > BandwidthPartInfoPtr
unique_ptr of BandwidthPartInfo
parameters of the gNB or UE antenna arrays
Definition nr-helper.h:854
size_t nAntRows
Number of antenna element rows (vertical height)
Definition nr-helper.h:857
bool isDualPolarized
true if antennas are cross-polarized (dual-polarized)
Definition nr-helper.h:858
double downtiltAngle
Downtilt angle in radians.
Definition nr-helper.h:863
double bearingAngle
Bearing angle in radians.
Definition nr-helper.h:861
std::string antennaElem
Antenna type.
Definition nr-helper.h:855
size_t nHorizPorts
Number of antenna ports in horizontal direction.
Definition nr-helper.h:859
size_t nVertPorts
Number of antenna ports in vertical direction.
Definition nr-helper.h:860
size_t nAntCols
Number of antenna element columns (horizontal width)
Definition nr-helper.h:856
double polSlantAngle
Polarization slant angle in radians.
Definition nr-helper.h:862
Parameters for initial attachment association.
Definition nr-helper.h:882
double handoffMargin
Handoff margin for Initial assocc.
Definition nr-helper.h:885
std::vector< double > rowAngles
vector of angles to set in initial assocc
Definition nr-helper.h:883
double primaryCarrierIndex
primary carrier index for Initial assocc
Definition nr-helper.h:886
std::vector< double > colAngles
vector of angles to set in initial assocc
Definition nr-helper.h:884
parameters for the search of optimal rank and precoding matrix indicator (RI, PMI)
Definition nr-helper.h:868
double rankThreshold
Limits the selection of ranks determined by SVD decomposition.
Definition nr-helper.h:873
std::string downsamplingTechnique
Sub-band compression technique.
Definition nr-helper.h:877
uint8_t subbandSize
Number of PRBs per subband for downsampling.
Definition nr-helper.h:876
std::string rankTechnique
Select technique that determines ranks in non-exhaustive search.
Definition nr-helper.h:875
std::string fullSearchCb
Codebook when using full-search algorithm.
Definition nr-helper.h:870
std::string pmSearchMethod
Precoding matrix search algorithm.
Definition nr-helper.h:869