5G-LENA nr-v3.0-33-g7aea1e4
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mac-rx-trace.h
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#ifndef SRC_NR_HELPER_NR_MAC_RX_TRACE_H_
8#define SRC_NR_HELPER_NR_MAC_RX_TRACE_H_
9
10#include <ns3/nr-control-messages.h>
11#include <ns3/nr-phy-mac-common.h>
12#include <ns3/object.h>
13#include <ns3/spectrum-value.h>
14
15#include <iostream>
16
17namespace ns3
18{
19
20class NrMacRxTrace : public Object
21{
22 public:
24 ~NrMacRxTrace() override;
25 static TypeId GetTypeId();
26
39 static void RxedGnbMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
40 std::string path,
41 SfnSf sfn,
42 uint16_t nodeId,
43 uint16_t rnti,
44 uint8_t bwpId,
45 Ptr<const NrControlMessage> msg);
46
59 static void TxedGnbMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
60 std::string path,
61 SfnSf sfn,
62 uint16_t nodeId,
63 uint16_t rnti,
64 uint8_t bwpId,
65 Ptr<const NrControlMessage> msg);
66
79 static void RxedUeMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
80 std::string path,
81 SfnSf sfn,
82 uint16_t nodeId,
83 uint16_t rnti,
84 uint8_t bwpId,
85 Ptr<const NrControlMessage> msg);
86
99 static void TxedUeMacCtrlMsgsCallback(Ptr<NrMacRxTrace> macStats,
100 std::string path,
101 SfnSf sfn,
102 uint16_t nodeId,
103 uint16_t rnti,
104 uint8_t bwpId,
105 Ptr<const NrControlMessage> msg);
106
107 private:
108 static std::ofstream m_rxedGnbMacCtrlMsgsFile;
109 static std::string m_rxedGnbMacCtrlMsgsFileName;
110 static std::ofstream m_txedGnbMacCtrlMsgsFile;
111 static std::string m_txedGnbMacCtrlMsgsFileName;
112
113 static std::ofstream m_rxedUeMacCtrlMsgsFile;
114 static std::string m_rxedUeMacCtrlMsgsFileName;
115 static std::ofstream m_txedUeMacCtrlMsgsFile;
116 static std::string m_txedUeMacCtrlMsgsFileName;
117};
118
119} /* namespace ns3 */
120
121#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:34