5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-spectrum-phy.h
1// Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef NR_SPECTRUM_PHY_H
6#define NR_SPECTRUM_PHY_H
7
8#include "beam-manager.h"
9#include "nr-chunk-processor.h"
10#include "nr-control-messages.h"
11#include "nr-harq-phy.h"
12#include "nr-interference.h"
13#include "nr-phy.h"
14#include "nr-spectrum-signal-parameters.h"
15
16#include "ns3/matrix-based-channel-model.h"
17#include "ns3/net-device.h"
18#include "ns3/random-variable-stream.h"
19#include "ns3/spectrum-channel.h"
20#include "ns3/traced-callback.h"
21
22#include <functional>
23
24namespace ns3
25{
26
27class UniformPlanarArray;
28
71class NrSpectrumPhy : public SpectrumPhy
72{
73 public:
78 static TypeId GetTypeId();
79
84
88 ~NrSpectrumPhy() override;
89
103
104 // callbacks typedefs and setters
108 typedef Callback<void, const Ptr<Packet>&> NrPhyRxDataEndOkCallback;
112 typedef std::function<void(const std::list<Ptr<NrControlMessage>>&, uint8_t)>
114
119 typedef Callback<void, uint16_t, const Ptr<SpectrumValue>&> NrPhyRxPssCallback;
120
125 typedef Callback<void, const DlHarqInfo&> NrPhyDlHarqFeedbackCallback;
130 typedef Callback<void, const UlHarqInfo&> NrPhyUlHarqFeedbackCallback;
131
142
150
159
160 // Methods inherited from spectrum phy
161 void SetDevice(Ptr<NetDevice> d) override;
162 Ptr<NetDevice> GetDevice() const override;
163 void SetMobility(Ptr<MobilityModel> m) override;
164 Ptr<MobilityModel> GetMobility() const override;
165 void SetChannel(Ptr<SpectrumChannel> c) override;
166 Ptr<const SpectrumModel> GetRxSpectrumModel() const override;
167 /*
168 * @brief Sets the beam manager of this spectrum phy, and that beam manager
169 * is responsible for the antenna array of this spectrum phy
170 */
171 void SetBeamManager(Ptr<BeamManager> b);
172
176 void AddBeamManager(Ptr<BeamManager> b);
177
182
187 void ConfigPanelsBearingAngles(double firstPanelBearingAngleRad);
188
193 double CircularBearingAnglesForPanels(double firstPanelBearingAngleRad,
194 uint8_t panelIndex) const;
195
196 /*
197 * @brief Gets the beam manager of this spectrum phy.
198 */
199 Ptr<BeamManager> GetBeamManager();
200
201 /*
202 * @brief Sets the error model of this spectrum phy, overriding the default
203 * that is created by the attribute NrSpectrumPhy::ErrorModelType
204 *
205 * @param em The error model
206 */
207 void SetErrorModel(Ptr<NrErrorModel> em);
208
209 /*
210 * @brief Gets a pointer to the error model (if instantiated)
211 * @return Pointer to the error model
212 */
213 Ptr<NrErrorModel> GetErrorModel() const;
214
215 /*
216 * @brief Gets a pointer to the NrPhy instance
217 * @return Pointer to the NrPhy instance
218 */
219 Ptr<NrPhy> GetNrPhy() const;
220
221 /*
222 * @brief Get the time of the most recent start of reception
223 * @return The time value of the most recent start of reception
224 */
225 Time GetFirstRxStart() const;
226
227 /*
228 * @brief Set the time of the most recent start of reception
229 * @param startTime The time value of the most recent start of reception
230 */
231 void SetFirstRxStart(Time startTime);
232
233 /*
234 * @brief Get the duration of the most recent start of reception
235 * @return The time value of the duration of the most recent start of reception
236 */
237 Time GetFirstRxDuration() const;
238
239 /*
240 * @brief Set the duration of the most recent start of reception
241 * @param duration The time value of the duration of the most recent start of reception
242 */
243 void SetFirstRxDuration(Time duration);
244
250 Ptr<Object> GetAntenna() const override;
251
256 Ptr<Object> GetPanelByIndex(const uint8_t index) const;
257
261 void SetNumPanels(const uint8_t numPanel);
262
267 uint8_t GetNumPanels() const;
268 /*
269 * @brief Used to enable generation and triggering of DL DATA pathloss trace
270 */
271 void EnableDlDataPathlossTrace();
272
273 /*
274 * @brief Used to enable generation and triggering of DL CTRL pahtloss trace
275 */
276 void EnableDlCtrlPathlossTrace();
277
283 void StartRx(Ptr<SpectrumSignalParameters> params) override;
284
289 void SetRnti(uint16_t rnti);
290
295 uint16_t GetRnti() const;
296
297 // Attributes setters
302 void SetCcaMode1Threshold(double thresholdDBm);
307 double GetCcaMode1Threshold() const;
312 void SetUnlicensedMode(bool unlicensedMode);
317 void SetDataErrorModelEnabled(bool dataErrorModelEnabled);
321 void SetErrorModelType(TypeId errorModelType);
322
323 // other methods
328 virtual void SetNoisePowerSpectralDensity(const Ptr<const SpectrumValue>& noisePsd);
334 void SetTxPowerSpectralDensity(const Ptr<SpectrumValue>& txPsd);
335 /*
336 * @brief Returns a const pointer to the TX PSD
337 * @return the TX PSD
338 */
339 Ptr<const SpectrumValue> GetTxPowerSpectralDensity();
347 void StartTxDataFrames(const Ptr<PacketBurst>& pb,
348 const std::list<Ptr<NrControlMessage>>& ctrlMsgList,
349 const std::shared_ptr<DciInfoElementTdma> dci,
350 const Time& duration);
351
355 bool IsTransmitting();
356
361 void StartTxDlControlFrames(const std::list<Ptr<NrControlMessage>>& ctrlMsgList,
362 const Time& duration); // control frames from Gnb to ue
363
369 void StartTxCsiRs(uint16_t rnti, uint16_t beamId);
370
376 void StartTxUlControlFrames(const std::list<Ptr<NrControlMessage>>& ctrlMsgList,
377 const Time& duration);
382 void AddDataPowerChunkProcessor(const Ptr<NrChunkProcessor>& p);
387 void AddDataSinrChunkProcessor(const Ptr<NrChunkProcessor>& p);
388
389 /*
390 * @brief Adds the chunk processor that will process the interference for SRS signals at gNBs
391 * @param p the chunk processor
392 */
393 void AddSrsSinrChunkProcessor(const Ptr<NrChunkProcessor>& p);
394
399 void AddRsPowerChunkProcessor(const Ptr<NrChunkProcessor>& p);
400
405 void AddDlCtrlSinrChunkProcessor(const Ptr<NrChunkProcessor>& p);
412 void UpdateSinrPerceived(const SpectrumValue& sinr);
413
418 void ReportDlCtrlSinr(const SpectrumValue& sinr);
419
426 void UpdateSrsSinrPerceived(const SpectrumValue& srsSinr);
432 void UpdateSrsSnrPerceived(const double srsSnr);
437 void InstallPhy(const Ptr<NrPhy>& phyModel);
438
439 Ptr<NrPhy> GetPhy() const;
445 void SetAntenna(Ptr<Object> antenna);
446
452 void AddPanel(const Ptr<Object> antenna);
453
458 void SetActivePanel(const uint8_t panelIndex);
462 Ptr<SpectrumChannel> GetSpectrumChannel() const;
466 Ptr<NrInterference> GetNrInterference() const;
471 void AddExpectedTb(ExpectedTb expectedTb);
472
481 int64_t AssignStreams(int64_t stream);
482
492 typedef void (*RxDataTracedCallback)(const SfnSf& sfnSf,
493 Ptr<const SpectrumValue> v,
494 const Time& t,
495 uint16_t bwpId,
496 uint16_t cellId);
497
498 void AddExpectedSrsRnti(uint16_t rnti);
505 void AddExpectedDlCtrlEnd(Time ctrlEndTime);
506 /*
507 * @brief SRS SINR callback whose input parameters are cellid, rnti, SRS SINR value
508 */
509 typedef Callback<void, uint16_t, uint16_t, double> SrsSinrReportCallback;
510 typedef Callback<void, uint16_t, uint16_t, double> SrsSnrReportCallback;
511
517 void AddSrsSinrReportCallback(SrsSinrReportCallback callback);
523 void AddSrsSnrReportCallback(SrsSnrReportCallback callback);
529 void SetIsGnb(bool isGnb);
533 uint16_t GetCellId() const;
537 uint16_t GetBwpId() const;
545 typedef void (*DataSnrTracedCallback)(const SfnSf& sfnSf,
546 const uint16_t cellId,
547 const uint8_t bwpId,
548 const uint64_t imsi,
549 const double snr);
555 void ReportWbDlDataSnrPerceived(const double dlDataSnr);
556
561 void AddDataMimoChunkProcessor(const Ptr<NrMimoChunkProcessor>& p);
562
567 void AddCsiRsMimoChunkProcessor(const Ptr<NrMimoChunkProcessor>& p);
568
573 void AddCsiImMimoChunkProcessor(const Ptr<NrMimoChunkProcessor>& p);
574
579 void UpdateMimoSinrPerceived(const std::vector<MimoSinrChunk>& sinr);
583 bool IsGnb() const;
584
585 protected:
589 void DoDispose() override;
590
595 State GetState() const;
596
601 Ptr<SpectrumChannel> GetChannel() const;
602
607 Ptr<UniformRandomVariable> GetErrorModelRv() const;
608
615 void ChangeState(State newState, Time duration);
616
621 void EndTx();
622
627
636 void NotifyRxDataTrace(const SfnSf& sfn,
637 Ptr<const SpectrumValue> spectrumValue,
638 const Time& duration,
639 uint16_t bwpId,
640 uint16_t cellId) const;
641
646 void NotifyTxCtrlTrace(Time duration) const;
647
652 void NotifyTxDataTrace(Time duration) const;
653
654 private:
655 std::vector<MimoSinrChunk>
656 m_mimoSinrPerceived;
658
663 void StartRxData(const Ptr<NrSpectrumSignalParametersDataFrame>& params);
668 void StartRxDlCtrl(const Ptr<NrSpectrumSignalParametersDlCtrlFrame>& params);
673 void StartRxUlCtrl(const Ptr<NrSpectrumSignalParametersUlCtrlFrame>& params);
678 void StartRxCsiRs(const Ptr<NrSpectrumSignalParametersCsiRs>& csiRsParams);
684 void StartRxSrs(const Ptr<NrSpectrumSignalParametersUlCtrlFrame>& params);
690 void CheckIfCsiImNeeded(const Ptr<NrSpectrumSignalParametersCsiRs>& csiRsParams);
691
697 std::vector<MimoSinrChunk> GetMimoSinrForRnti(uint16_t rnti, uint8_t rank);
698
704 void EndRxData();
709 void ScheduleCsiIm(Ptr<SpectrumSignalParameters> csiRsParams) const;
713 bool IsUeScheduled() const;
718 void EndRxCtrl();
725 void EndRxSrs();
729 void MaybeCcaBusy();
737 void CheckIfStillBusy();
745 bool IsOnlySrs(const std::list<Ptr<NrControlMessage>>& ctrlMsgList);
746
754 Ptr<MatrixBasedChannelModel::Complex3DVector> CreateSpectrumChannelMatrix(
755 const Ptr<SpectrumSignalParameters> params) const;
756
760 void CheckTransportBlockCorruptionStatus();
761
768 void ProcessReceivedPacketBurst();
769
775 void SendUlHarqFeedback(uint16_t rnti, TransportBlockInfo& tbInfo);
776
783 DlHarqInfo SendDlHarqFeedback(uint16_t rnti, TransportBlockInfo& tbInfo);
784
785 // attributes
786 TypeId m_errorModelType{
787 Object::GetTypeId()};
788 bool m_dataErrorModelEnabled{
789 true};
790 double m_ccaMode1ThresholdW{0};
792 // CcaMode1Threshold and is configured in dBm
793 bool m_unlicensedMode{
794 false};
795 // Unlicensed mode additionally to licensed mode allows channel monitoring to
796 // discover if is busy before transmission.
797
798 Ptr<SpectrumChannel> m_channel{
799 nullptr};
801 Ptr<const SpectrumModel> m_rxSpectrumModel{
802 nullptr};
803 std::vector<Ptr<BeamManager>> m_beamManagers;
805 Ptr<MobilityModel> m_mobility{
806 nullptr};
807 Ptr<NetDevice> m_device{nullptr};
808 Ptr<NrPhy> m_phy{nullptr};
809 Ptr<NrErrorModel> m_errorModel{nullptr};
810 std::vector<Ptr<Object>>
811 m_antennaPanels;
813 Ptr<NrInterference> m_interferenceData{nullptr};
815 Ptr<NrInterference> m_interferenceCtrl{nullptr};
817 Ptr<NrInterference> m_interferenceSrs{
818 nullptr};
820 Ptr<NrInterference> m_interferenceCsiRs{
821 nullptr};
822 Ptr<NrInterference> m_interferenceCsiIm{
823 nullptr};
824
825 Ptr<SpectrumValue> m_txPsd{nullptr};
826 Ptr<UniformRandomVariable> m_random{nullptr};
827
828 NrHarqPhy m_harqPhyModule;
829
830 std::unordered_map<uint16_t, TransportBlockInfo>
831 m_transportBlocks;
833 std::list<Ptr<PacketBurst>> m_rxPacketBurstList;
834 std::list<Ptr<NrControlMessage>>
835 m_rxControlMessageList;
836
837 Time m_firstRxStart{
838 Seconds(0)};
839 Time m_firstRxDuration{Seconds(0)};
840 State m_state{IDLE};
841 SpectrumValue m_sinrPerceived;
843
844 uint16_t m_rnti{0};
845 bool m_hasRnti{false};
846 uint16_t m_activeTransmissions{0};
848
849 std::list<SrsSinrReportCallback> m_srsSinrReportCallback;
850 std::list<SrsSnrReportCallback> m_srsSnrReportCallback;
851 uint16_t m_currentSrsRnti{0};
852 Time m_ctrlEndTime;
853 EventId m_checkIfIsIdleEvent;
855 Time m_busyTimeEnds{
856 Seconds(0)};
857
858 // callbacks for CTRL and DATA, and UL/DL HARQ
860 m_phyRxCtrlEndOkCallback;
862 m_phyRxDataEndOkCallback;
863 NrPhyRxPssCallback m_phyRxPssCallback;
865 m_phyDlHarqFeedbackCallback;
868 m_phyUlHarqFeedbackCallback;
870 // traces
871 TracedCallback<Time>
872 m_channelOccupied;
874 TracedCallback<Time> m_txDataTrace;
876 TracedCallback<Time> m_txCtrlTrace;
878 TracedCallback<RxPacketTraceParams>
879 m_rxPacketTraceGnb;
880 TracedCallback<RxPacketTraceParams>
881 m_rxPacketTraceUe;
882 TracedCallback<GnbPhyPacketCountParameter>
883 m_txPacketTraceGnb;
884 TracedCallback<const SfnSf&, Ptr<const SpectrumValue>, const Time&, uint16_t, uint16_t>
885 m_rxDataTrace;
886 TracedCallback<const SfnSf,
887 const uint16_t,
888 const uint8_t,
889 const uint64_t,
890 const double>
891 m_dlDataSnrTrace;
892
893 /*
894 * @brief Trace source that reports the following: Cell ID, Bwp ID, UE node ID, DL
895 * CTRL pathloss
896 */
897 typedef TracedCallback<uint16_t, uint8_t, uint32_t, double> DlPathlossTrace;
898 DlPathlossTrace m_dlCtrlPathlossTrace;
899 bool m_enableDlCtrlPathlossTrace =
900 false;
901 /*
902 * @brief Trace source that reports the following: Cell ID, Bwp ID, UE node ID, DL
903 * CTRL pathloss, CQI that corresponds to the current SINR considering single port(rank 1).
904 * This CQI value is added to the data pathloss trace to allow results filtering for the
905 * calibration purposes, to compensate for the lack of RSSI based initial access and handover
906 * features at the time this trace was added to 5G-LENA. Once these both features are part of
907 * 5G-LENA, the CQI value should be removed from this trace. Also, notice that for MIMO
908 * simulations this CQI value is based on the approximation of SINR, such as if it was used
909 * a single port (rank 1), so this CQI value does not correspond to the CQI value that will
910 * later be determined by PM search algorithm.
911 */
912 typedef TracedCallback<uint16_t, uint8_t, uint32_t, double, uint8_t> DlDataPathlossTrace;
913 DlDataPathlossTrace m_dlDataPathlossTrace;
914 bool m_enableDlDataPathlossTrace =
915 false;
916 double m_dlDataPathloss = 0; // DL data pathloss calculated in StartRx, and used in trace in
917 // EndRxData, i.e., when ProcessReceivedPacketBurst is called
918 bool m_isGnb = false;
919 uint8_t m_numPanels{1};
920 uint8_t m_activePanelIndex{0};
921};
922
923} // namespace ns3
924
925#endif /* NR_SPECTRUM_PHY_H */
Interface between the physical layer and the channel.
double CircularBearingAnglesForPanels(double firstPanelBearingAngleRad, uint8_t panelIndex) const
initialize the bearing angles of panels in to cover 360 Degree
void SetUnlicensedMode(bool unlicensedMode)
Sets whether to perform in unlicensed mode in which the channel monitoring is enabled.
void SetErrorModelType(TypeId errorModelType)
Sets the error model type.
void IncrementActiveTransmissions()
Increase the counter of active transmissions.
void NotifyTxCtrlTrace(Time duration) const
call TxCtrlTrace from subclass
void(* DataSnrTracedCallback)(const SfnSf &sfnSf, const uint16_t cellId, const uint8_t bwpId, const uint64_t imsi, const double snr)
void NotifyRxDataTrace(const SfnSf &sfn, Ptr< const SpectrumValue > spectrumValue, const Time &duration, uint16_t bwpId, uint16_t cellId) const
call RxDataTrace from subclass
Ptr< Object > GetPanelByIndex(const uint8_t index) const
Interface enable to access all panels using proper index.
void AddCsiRsMimoChunkProcessor(const Ptr< NrMimoChunkProcessor > &p)
Connect CSI-RS chunk processor with the corresponding CSI-RS interference object.
void UpdateSrsSnrPerceived(const double srsSnr)
SpectrumPhy that will be called when the SNR for the received SRS at gNB is being calculated.
void ReportWbDlDataSnrPerceived(const double dlDataSnr)
Report wideband perceived downlink data SNR.
void UpdateSinrPerceived(const SpectrumValue &sinr)
SpectrumPhy that will be called when the SINR for the received DATA is being calculated by the interf...
NrSpectrumPhy()
NrSpectrumPhy constructor.
void SetPhyRxCtrlEndOkCallback(const NrPhyRxCtrlEndOkCallback &c)
Sets the callback to be called when CTRL is received successfully.
static TypeId GetTypeId()
Get the object TypeId.
void StartTxUlControlFrames(const std::list< Ptr< NrControlMessage > > &ctrlMsgList, const Time &duration)
Start transmission of UL CTRL.
~NrSpectrumPhy() override
~NrSpectrumPhy
std::function< void(const std::list< Ptr< NrControlMessage > > &, uint8_t)> NrPhyRxCtrlEndOkCallback
This callback method type is used to notify that CTRL is received.
Ptr< UniformRandomVariable > GetErrorModelRv() const
Get pointer to error model random variable.
void AddSrsSnrReportCallback(SrsSnrReportCallback callback)
It adds callback to the list of callbacks that will be notified once SRS is being received.
void AddExpectedTb(ExpectedTb expectedTb)
Instruct the Spectrum Model of a incoming transmission.
void SetPhyDlHarqFeedbackCallback(const NrPhyDlHarqFeedbackCallback &c)
Sets the callback to be called when DL HARQ feedback is generated.
void AddBeamManager(Ptr< BeamManager > b)
Adds the beam manager of corresponds spectrum phy of antenna panel, and that beam manager is responsi...
void AddDataPowerChunkProcessor(const Ptr< NrChunkProcessor > &p)
Adds the chunk processor that will process the power for the data.
Ptr< NrInterference > GetNrInterference() const
void SetNumPanels(const uint8_t numPanel)
Set the number of panels in this NrSpectrumPhy.
uint8_t GetNumPanels() const
Get the number of panels in this NrSpectrumPhy.
void DoDispose() override
DoDispose method inherited from Object.
void UpdateSrsSinrPerceived(const SpectrumValue &srsSinr)
SpectrumPhy that will be called when the SINR for the received SRS at gNB is being calculated by the ...
Callback< void, const UlHarqInfo & > NrPhyUlHarqFeedbackCallback
virtual void SetNoisePowerSpectralDensity(const Ptr< const SpectrumValue > &noisePsd)
Sets noise power spectral density to be used by this device.
void SetCcaMode1Threshold(double thresholdDBm)
Set clear channel assessment (CCA) threshold.
void StartTxDlControlFrames(const std::list< Ptr< NrControlMessage > > &ctrlMsgList, const Time &duration)
Starts transmission of DL CTRL.
void InstallPhy(const Ptr< NrPhy > &phyModel)
Set NrPhy of this spectrum phy in order to be able to obtain information such as cellId,...
void SetRnti(uint16_t rnti)
void UpdateMimoSinrPerceived(const std::vector< MimoSinrChunk > &sinr)
Store the SINR chunks for all received signals at end of interference calculations.
bool IsTransmitting()
Return true if the current Phy State is TX.
void AddPanel(const Ptr< Object > antenna)
Add the antenna panel to this NrSpectrumPhy, currently in NR module it is expected to be of type Unif...
double GetCcaMode1Threshold() const
Callback< void, const DlHarqInfo & > NrPhyDlHarqFeedbackCallback
void AddCsiImMimoChunkProcessor(const Ptr< NrMimoChunkProcessor > &p)
Connect CSI-IM chunk processor with the corresponding CSI-IM interference object.
State GetState() const
Get current state.
void SetIsGnb(bool isGnb)
Set whether this spectrum PHY belongs to Gnb or UE TODO NrHelper should be declared as friend and thi...
void EndTx()
Function that is called when the transmission has ended. It is used to update spectrum phy state.
void AddDlCtrlSinrChunkProcessor(const Ptr< NrChunkProcessor > &p)
Adds the chunk processor that will process the received power.
Ptr< SpectrumChannel > GetChannel() const
Get pointer to SpectrumChannel.
int64_t AssignStreams(int64_t stream)
Ptr< SpectrumChannel > GetSpectrumChannel() const
Returns spectrum channel object to which is attached this spectrum phy instance.
void ConfigPanelsBearingAngles()
Either initialize the bearing angles of panels in install step or update all bearing angles based on ...
uint16_t GetCellId() const
void StartTxCsiRs(uint16_t rnti, uint16_t beamId)
Callback< void, uint16_t, const Ptr< SpectrumValue > & > NrPhyRxPssCallback
void SetDataErrorModelEnabled(bool dataErrorModelEnabled)
Enables or disabled data error model.
void SetPhyRxDataEndOkCallback(const NrPhyRxDataEndOkCallback &c)
Sets the callback to be called when DATA is received successfully.
void ReportDlCtrlSinr(const SpectrumValue &sinr)
Called when DlCtrlSinr is fired.
void AddExpectedDlCtrlEnd(Time ctrlEndTime)
Keeps track of when DL CTRL should finish. Needed for CSI-RS and CSI-IM implementation to be able to ...
void SetTxPowerSpectralDensity(const Ptr< SpectrumValue > &txPsd)
Sets transmit power spectral density.
void SetPhyUlHarqFeedbackCallback(const NrPhyUlHarqFeedbackCallback &c)
Sets the callback to be called when UL HARQ feedback is generated.
void SetAntenna(Ptr< Object > antenna)
Sets the antenna of this NrSpectrumPhy instance, currently in NR module it is expected to be of type ...
void AddDataSinrChunkProcessor(const Ptr< NrChunkProcessor > &p)
Adds the chunk processor that will process the interference.
void AddSrsSinrReportCallback(SrsSinrReportCallback callback)
It adds callback to the list of callbacks that will be notified once SRS is being received.
void StartTxDataFrames(const Ptr< PacketBurst > &pb, const std::list< Ptr< NrControlMessage > > &ctrlMsgList, const std::shared_ptr< DciInfoElementTdma > dci, const Time &duration)
Starts transmission of data frames on connected spectrum channel object.
void(* RxDataTracedCallback)(const SfnSf &sfnSf, Ptr< const SpectrumValue > v, const Time &t, uint16_t bwpId, uint16_t cellId)
TracedCallback signature for RB statistics.
void AddDataMimoChunkProcessor(const Ptr< NrMimoChunkProcessor > &p)
Connect DATA chunk processor with the corresponding DATA interference object.
Callback< void, const Ptr< Packet > & > NrPhyRxDataEndOkCallback
This callback method type is used to notify that DATA is received.
State
Enum that defines possible states of the spectrum phy.
@ RX_DATA
Receiving data.
@ TX
Transmitting state (data or ctrl)
@ RX_UL_SRS
Receiving SRS.
@ CCA_BUSY
BUSY state (channel occupied by another entity)
@ RX_UL_CTRL
Receiving UL CTRL.
@ RX_DL_CTRL
Receiving DL CTRL.
@ IDLE
IDLE state (no action in progress)
void AddRsPowerChunkProcessor(const Ptr< NrChunkProcessor > &p)
Adds the chunk processor that will process the received power.
void SetActivePanel(const uint8_t panelIndex)
Set the active antenna panel to this NrSpectrumPhy,.
uint16_t GetBwpId() const
void StartRx(Ptr< SpectrumSignalParameters > params) override
Inherited from SpectrumPhy. When this function is called this spectrum phy starts receiving a signal ...
void ChangeState(State newState, Time duration)
Update the state of the spectrum phy. The states are: IDLE, TX, RX_DATA, RX_DL_CTRL,...
void NotifyTxDataTrace(Time duration) const
call TxDataTrace from subclass
Ptr< Object > GetAntenna() const override
Inherited from SpectrumPhy Note: Implements GetRxAntenna function from SpectrumPhy.
void SetPhyRxPssCallback(const NrPhyRxPssCallback &c)
uint16_t GetRnti() const
The SfnSf class.
Definition sfnsf.h:32
A struct that contains info for the DL HARQ.
Information about the expected transport block at a certain point in the slot.