5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-no-backhaul-epc-helper.h
1// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4//
5// Author: Manuel Requena <manuel.requena@cttc.es>
6// (based on the original point-to-point-epc-helper.h)
7
8#ifndef NR_NO_BACKHAUL_EPC_HELPER_H
9#define NR_NO_BACKHAUL_EPC_HELPER_H
10
11#include "nr-epc-helper.h"
12
13namespace ns3
14{
15
16class NrEpcSgwApplication;
17class NrEpcPgwApplication;
18class NrEpcMmeApplication;
19
34{
35 public:
40
44 ~NrNoBackhaulEpcHelper() override;
45
46 // inherited from Object
51 static TypeId GetTypeId();
52 void DoDispose() override;
53
54 // inherited from NrEpcHelper
55 void AddGnb(Ptr<Node> gnbNode,
56 Ptr<NetDevice> nrGnbNetDevice,
57 std::vector<uint16_t> cellIds) override;
58 void AddUe(Ptr<NetDevice> ueNrDevice, uint64_t imsi) override;
59 void AddX2Interface(Ptr<Node> gnbNode1, Ptr<Node> gnbNode2) override;
60 void AddS1Interface(Ptr<Node> gnb,
61 Ipv4Address gnbAddress,
62 Ipv4Address sgwAddress,
63 std::vector<uint16_t> cellIds) override;
64 uint8_t ActivateEpsBearer(Ptr<NetDevice> ueNrDevice,
65 uint64_t imsi,
66 Ptr<NrEpcTft> tft,
67 NrEpsBearer bearer) override;
68 Ptr<Node> GetSgwNode() const override;
69 Ptr<Node> GetPgwNode() const override;
70 Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override;
71 Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices) override;
72 Ipv4Address GetUeDefaultGatewayAddress() override;
73 Ipv6Address GetUeDefaultGatewayAddress6() override;
74 int64_t AssignStreams(int64_t stream) override;
75 std::pair<Ptr<Node>, Ipv4Address> SetupRemoteHost(std::optional<std::string> dataRate,
76 std::optional<uint16_t> mtu,
77 std::optional<Time> delay) override;
78 std::pair<Ptr<Node>, Ipv6Address> SetupRemoteHost6(std::optional<std::string> dataRate,
79 std::optional<uint16_t> mtu,
80 std::optional<Time> delay) override;
81
82 protected:
93 virtual void DoAddX2Interface(const Ptr<NrEpcX2>& gnb1X2,
94 const Ptr<NetDevice>& gnb1NrDev,
95 const Ipv4Address& gnb1X2Address,
96 const Ptr<NrEpcX2>& gnb2X2,
97 const Ptr<NetDevice>& gnb2NrDev,
98 const Ipv4Address& gnb2X2Address) const;
99
106 virtual void DoActivateEpsBearerForUe(const Ptr<NetDevice>& ueDevice,
107 const Ptr<NrEpcTft>& tft,
108 const NrEpsBearer& bearer) const;
109
110 private:
114 Ipv4AddressHelper m_uePgwAddressHelper;
118 Ipv6AddressHelper m_uePgwAddressHelper6;
119
123 Ptr<Node> m_pgw;
124
128 Ptr<Node> m_sgw;
129
133 Ptr<Node> m_mme;
134
138 Ptr<NrEpcSgwApplication> m_sgwApp;
139
143 Ptr<NrEpcPgwApplication> m_pgwApp;
144
148 Ptr<NrEpcMmeApplication> m_mmeApp;
149
153 Ptr<VirtualNetDevice> m_tunDevice;
154
158 uint16_t m_gtpuUdpPort;
159
163 Ipv4AddressHelper m_s11Ipv4AddressHelper;
164
168 DataRate m_s11LinkDataRate;
169
173 Time m_s11LinkDelay;
174
178 uint16_t m_s11LinkMtu;
179
183 uint16_t m_gtpcUdpPort;
184
192 Ipv4AddressHelper m_s5Ipv4AddressHelper;
193
197 DataRate m_s5LinkDataRate;
198
202 Time m_s5LinkDelay;
203
207 uint16_t m_s5LinkMtu;
208
212 std::map<uint64_t, Ptr<NetDevice>> m_imsiGnbDeviceMap;
213
217 Ipv4AddressHelper m_x2Ipv4AddressHelper;
218
222 DataRate m_x2LinkDataRate;
223
227 Time m_x2LinkDelay;
228
233 uint16_t m_x2LinkMtu;
234
238 bool m_x2LinkEnablePcap;
239
243 std::string m_x2LinkPcapPrefix;
244};
245
246} // namespace ns3
247
248#endif // NR_NO_BACKHAUL_EPC_HELPER_H
Base helper class to handle the creation of the EPC entities.
This class contains the specification of EPS Bearers.
Create an EPC network with PointToPoint links between the core network nodes.
void AddGnb(Ptr< Node > gnbNode, Ptr< NetDevice > nrGnbNetDevice, std::vector< uint16_t > cellIds) override
int64_t AssignStreams(int64_t stream) override
Ptr< Node > GetPgwNode() const override
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices) override
void AddS1Interface(Ptr< Node > gnb, Ipv4Address gnbAddress, Ipv4Address sgwAddress, std::vector< uint16_t > cellIds) override
void AddUe(Ptr< NetDevice > ueNrDevice, uint64_t imsi) override
std::pair< Ptr< Node >, Ipv6Address > SetupRemoteHost6(std::optional< std::string > dataRate, std::optional< uint16_t > mtu, std::optional< Time > delay) override
void AddX2Interface(Ptr< Node > gnbNode1, Ptr< Node > gnbNode2) override
Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices) override
uint8_t ActivateEpsBearer(Ptr< NetDevice > ueNrDevice, uint64_t imsi, Ptr< NrEpcTft > tft, NrEpsBearer bearer) override
Ipv4Address GetUeDefaultGatewayAddress() override
virtual void DoActivateEpsBearerForUe(const Ptr< NetDevice > &ueDevice, const Ptr< NrEpcTft > &tft, const NrEpsBearer &bearer) const
DoActivateEpsBearerForUe: Schedule ActivateEpsBearer on the UE.
Ipv6Address GetUeDefaultGatewayAddress6() override
std::pair< Ptr< Node >, Ipv4Address > SetupRemoteHost(std::optional< std::string > dataRate, std::optional< uint16_t > mtu, std::optional< Time > delay) override
Ptr< Node > GetSgwNode() const override
virtual void DoAddX2Interface(const Ptr< NrEpcX2 > &gnb1X2, const Ptr< NetDevice > &gnb1NrDev, const Ipv4Address &gnb1X2Address, const Ptr< NrEpcX2 > &gnb2X2, const Ptr< NetDevice > &gnb2NrDev, const Ipv4Address &gnb2X2Address) const
DoAddX2Interface: Call AddX2Interface on top of the Gnb device pointers.