5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-rx-trace.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef SRC_NR_HELPER_NR_MAC_RX_TRACE_H_
6#define SRC_NR_HELPER_NR_MAC_RX_TRACE_H_
7
8#include <ns3/nr-control-messages.h>
9#include <ns3/nr-phy-mac-common.h>
10#include <ns3/object.h>
11#include <ns3/spectrum-value.h>
12
13#include <iostream>
14
15namespace ns3
16{
17
18class NrMacRxTrace : public Object
19{
20 public:
22 ~NrMacRxTrace() override;
23 static TypeId GetTypeId();
24
37 static void RxedGnbMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
38 std::string path,
39 SfnSf sfn,
40 uint16_t nodeId,
41 uint16_t rnti,
42 uint8_t bwpId,
43 Ptr<const NrControlMessage> msg);
44
57 static void TxedGnbMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
58 std::string path,
59 SfnSf sfn,
60 uint16_t nodeId,
61 uint16_t rnti,
62 uint8_t bwpId,
63 Ptr<const NrControlMessage> msg);
64
77 static void RxedUeMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
78 std::string path,
79 SfnSf sfn,
80 uint16_t nodeId,
81 uint16_t rnti,
82 uint8_t bwpId,
83 Ptr<const NrControlMessage> msg);
84
97 static void TxedUeMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
98 std::string path,
99 SfnSf sfn,
100 uint16_t nodeId,
101 uint16_t rnti,
102 uint8_t bwpId,
103 Ptr<const NrControlMessage> msg);
104
105 private:
106 static std::ofstream m_rxedGnbMacCtrlMsgsFile;
107 static std::string m_rxedGnbMacCtrlMsgsFileName;
108 static std::ofstream m_txedGnbMacCtrlMsgsFile;
109 static std::string m_txedGnbMacCtrlMsgsFileName;
110
111 static std::ofstream m_rxedUeMacCtrlMsgsFile;
112 static std::string m_rxedUeMacCtrlMsgsFileName;
113 static std::ofstream m_txedUeMacCtrlMsgsFile;
114 static std::string m_txedUeMacCtrlMsgsFileName;
115};
116
117} /* namespace ns3 */
118
119#endif /* SRC_NR_HELPER_NR_MAC_RX_TRACE_H_ */
static void RxedGnbMacCtrlMsgsCallback(Ptr< NrMacRxTrace > macStats, std::string path, SfnSf sfn, uint16_t nodeId, uint16_t rnti, uint8_t bwpId, Ptr< const NrControlMessage > msg)
static void TxedGnbMacCtrlMsgsCallback(Ptr< NrMacRxTrace > macStats, std::string path, SfnSf sfn, uint16_t nodeId, uint16_t rnti, uint8_t bwpId, Ptr< const NrControlMessage > msg)
static void RxedUeMacCtrlMsgsCallback(Ptr< NrMacRxTrace > macStats, std::string path, SfnSf sfn, uint16_t nodeId, uint16_t rnti, uint8_t bwpId, Ptr< const NrControlMessage > msg)
static void TxedUeMacCtrlMsgsCallback(Ptr< NrMacRxTrace > macStats, std::string path, SfnSf sfn, uint16_t nodeId, uint16_t rnti, uint8_t bwpId, Ptr< const NrControlMessage > msg)
The SfnSf class.
Definition sfnsf.h:32