5G-LENA nr-v3.3-67-g8257369a
The 5G/NR module for the ns-3 simulator
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
realistic-bf-manager.cc
1// Copyright (c) 2021 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#include "realistic-bf-manager.h"
6
7#include <ns3/enum.h>
8#include <ns3/uinteger.h>
9
10namespace ns3
11{
12
13NS_LOG_COMPONENT_DEFINE("RealisticBfManager");
14NS_OBJECT_ENSURE_REGISTERED(RealisticBfManager);
15
19
21{
22 // TODO Auto-generated RealisticBfManager stub
23}
24
25TypeId
27{
28 static TypeId tid =
29 TypeId("ns3::RealisticBfManager")
30 .SetParent<BeamManager>()
31 .AddConstructor<RealisticBfManager>()
32 .AddAttribute("TriggerEvent",
33 "Defines a beamforming trigger event",
34 EnumValue(RealisticBfManager::SRS_COUNT),
35 MakeEnumAccessor<RealisticBfManager::TriggerEvent>(
38 MakeEnumChecker(RealisticBfManager::SRS_COUNT,
39 "SrsCount",
40 RealisticBfManager::DELAYED_UPDATE,
41 "DelayedUpdate"))
42 .AddAttribute("UpdatePeriodicity",
43 "Interval between consecutive beamforming update method executions "
44 "expressed in the "
45 "number of SRS periodicities to wait before triggering the next "
46 "beamforming update.",
47 UintegerValue(1),
48 MakeUintegerAccessor(&RealisticBfManager::SetUpdatePeriodicity,
50 MakeUintegerChecker<uint16_t>())
51 .AddAttribute(
52 "UpdateDelay",
53 "Delay between SRS SINR report and the beamforming vectors update. Should be lower "
54 "then SRS periodicity in slots, otherwise the SRS SINR being used will be the "
55 "latest "
56 "received.",
57 TimeValue(MilliSeconds(10)),
58 MakeTimeAccessor(&RealisticBfManager::SetUpdateDelay,
60 MakeTimeChecker());
61 return tid;
62}
63
64void
65RealisticBfManager::SetTriggerEvent(RealisticBfManager::TriggerEvent triggerEvent)
66{
67 m_triggerEvent = triggerEvent;
68}
69
70RealisticBfManager::TriggerEvent
72{
73 return m_triggerEvent;
74}
75
76void
78{
79 m_updatePeriodicity = periodicity;
80}
81
82uint16_t
84{
85 return m_updatePeriodicity;
86}
87
88void
90{
91 m_updateDelay = delay;
92}
93
94Time
96{
97 return m_updateDelay;
98}
99
100} /* namespace ns3 */
Antenna array management.
RealisticBfManager()
RealisticBfManager constructor.
void SetUpdatePeriodicity(uint16_t periodicity)
Sets the periodicity of the beamforming update in the number of the SRS SINR reports.
uint16_t GetUpdatePeriodicity() const
RealisticBfManager::TriggerEvent GetTriggerEvent() const
~RealisticBfManager() override
~RealisticBfManager
static TypeId GetTypeId()
GetTypeId.
void SetTriggerEvent(RealisticBfManager::TriggerEvent triggerEvent)
Sets the beamforming update trigger event, trigger event type is one for all the nodes.
void SetUpdateDelay(Time delay)
Sets the delay after the SRS SINR report reception and triggering of the beamforming update.