5G-LENA nr-v3.0-32-g83aee33
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-pm-search.cc
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2024 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#include "nr-pm-search.h"
8
9namespace ns3
10{
11
12NS_LOG_COMPONENT_DEFINE("NrPmSearch");
13NS_OBJECT_ENSURE_REGISTERED(NrPmSearch);
14
15TypeId
17{
18 static TypeId tid =
19 TypeId("ns3::NrPmSearch")
20 .SetParent<Object>()
21 .AddAttribute("RankLimit",
22 "Max MIMO rank is minimum of num UE ports, num gNB ports, and RankLimit",
23 UintegerValue(UINT8_MAX),
24 MakeUintegerAccessor(&NrPmSearch::m_rankLimit),
25 MakeUintegerChecker<uint8_t>());
26 return tid;
27}
28
29void
30NrPmSearch::SetAmc(Ptr<const NrAmc> amc)
31{
32 m_amc = amc;
33}
34
35void
36NrPmSearch::SetGnbParams(bool isDualPol, size_t numHPorts, size_t numVPorts)
37{
38 m_nGnbPorts = isDualPol ? 2 * numHPorts * numVPorts : numHPorts * numVPorts;
39 m_isGnbDualPol = isDualPol;
40 m_nGnbHPorts = numHPorts;
41 m_nGnbVPorts = numVPorts;
42}
43
44void
45NrPmSearch::SetUeParams(size_t numTotalPorts)
46{
47 m_nRxPorts = numTotalPorts;
48}
49
50void
51NrPmSearch::SetSubbandSize(size_t subbandSize)
52{
53 m_subbandSize = subbandSize;
54}
55
56size_t
58{
59 return m_subbandSize;
60}
61
62} // namespace ns3
static TypeId GetTypeId()
Get TypeId.
size_t GetSubbandSize() const
void SetSubbandSize(size_t subbandSize)
Set the subband size (in number of RBs)
void SetGnbParams(bool isDualPol, size_t numHPorts, size_t numVPorts)
Set the antenna parameters of the gNB antenna.
uint8_t m_rankLimit
Limit the UE's maximum supported rank.
void SetUeParams(size_t numTotalPorts)
Set the antenna parameters of the UE antenna.
size_t m_nRxPorts
Number of receive ports at this UE.
size_t m_nGnbHPorts
Number of horizontal ports in the gNB antenna array.
Ptr< const NrAmc > m_amc
The NrAmc to be used for computing TB size and MCS.
size_t m_nGnbPorts
Total number of ports in the gNB antenna array.
bool m_isGnbDualPol
True when gNB has a dual-polarized antenna array.
void SetAmc(Ptr< const NrAmc > amc)
Set the AMC object to be used for MCS and TB size calculation.
size_t m_subbandSize
Size of each subband (in number of RBs)
size_t m_nGnbVPorts
Number of vertical ports in the gNB antenna array.