5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-epc-x2.h
1// Copyright (c) 2012 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
7#ifndef NR_EPC_X2_H
8#define NR_EPC_X2_H
9
10#include "nr-epc-x2-sap.h"
11
12#include "ns3/callback.h"
13#include "ns3/object.h"
14#include "ns3/ptr.h"
15#include "ns3/socket.h"
16
17#include <map>
18
19namespace ns3
20{
21
25class NrX2IfaceInfo : public SimpleRefCount<NrX2IfaceInfo>
26{
27 public:
35 NrX2IfaceInfo(Ipv4Address remoteIpAddr,
36 Ptr<Socket> localCtrlPlaneSocket,
37 Ptr<Socket> localUserPlaneSocket);
38 virtual ~NrX2IfaceInfo();
39
46
47 public:
48 Ipv4Address m_remoteIpAddr;
51};
52
56class NrX2CellInfo : public SimpleRefCount<NrX2CellInfo>
57{
58 public:
65 NrX2CellInfo(std::vector<uint16_t> localCellIds, std::vector<uint16_t> remoteCellIds);
66 virtual ~NrX2CellInfo();
67
73 NrX2CellInfo& operator=(const NrX2CellInfo& value);
74
75 public:
76 std::vector<uint16_t> m_localCellIds;
77 std::vector<uint16_t> m_remoteCellIds;
78};
79
85class NrEpcX2 : public Object
86{
89
90 public:
94 NrEpcX2();
95
99 ~NrEpcX2() override;
100
105 static TypeId GetTypeId();
106 void DoDispose() override;
107
112
117
125 void AddX2Interface(uint16_t gnb1CellId,
126 Ipv4Address gnb1X2Address,
127 std::vector<uint16_t> gnb2CellIds,
128 Ipv4Address gnb2X2Address);
129
136 void RecvFromX2cSocket(Ptr<Socket> socket);
137
144 void RecvFromX2uSocket(Ptr<Socket> socket);
145
146 protected:
147 // Interface provided by NrEpcX2SapProvider
196
199
200 private:
205 std::map<uint16_t, Ptr<NrX2IfaceInfo>> m_x2InterfaceSockets;
206
211 std::map<Ptr<Socket>, Ptr<NrX2CellInfo>> m_x2InterfaceCellIds;
212
216 uint16_t m_x2cUdpPort;
220 uint16_t m_x2uUdpPort;
221};
222
223} // namespace ns3
224
225#endif // NR_EPC_X2_H
virtual void DoSendResourceStatusUpdate(NrEpcX2SapProvider::ResourceStatusUpdateParams params)
Definition nr-epc-x2.cc:704
NrEpcX2SapProvider * m_x2SapProvider
X2 SAP provider.
Definition nr-epc-x2.h:198
void AddX2Interface(uint16_t gnb1CellId, Ipv4Address gnb1X2Address, std::vector< uint16_t > gnb2CellIds, Ipv4Address gnb2X2Address)
Definition nr-epc-x2.cc:118
virtual void DoSendUeContextRelease(NrEpcX2SapProvider::UeContextReleaseParams params)
Definition nr-epc-x2.cc:618
virtual void DoSendLoadInformation(NrEpcX2SapProvider::LoadInformationParams params)
Definition nr-epc-x2.cc:662
void RecvFromX2uSocket(Ptr< Socket > socket)
Definition nr-epc-x2.cc:394
~NrEpcX2() override
Definition nr-epc-x2.cc:81
NrEpcX2SapProvider * GetEpcX2SapProvider()
Definition nr-epc-x2.cc:111
virtual void DoSendUeData(NrEpcX2SapProvider::UeDataParams params)
Definition nr-epc-x2.cc:750
virtual void DoSendHandoverRequestAck(NrEpcX2SapProvider::HandoverRequestAckParams params)
Definition nr-epc-x2.cc:474
void SetEpcX2SapUser(NrEpcX2SapUser *s)
Definition nr-epc-x2.cc:104
virtual void DoSendHandoverPreparationFailure(NrEpcX2SapProvider::HandoverPreparationFailureParams params)
Definition nr-epc-x2.cc:522
virtual void DoSendHandoverCancel(NrEpcX2SapProvider::HandoverCancelParams params)
Send Handover Cancel function.
Definition nr-epc-x2.cc:781
virtual void DoSendSnStatusTransfer(NrEpcX2SapProvider::SnStatusTransferParams params)
Definition nr-epc-x2.cc:570
virtual void DoSendHandoverRequest(NrEpcX2SapProvider::HandoverRequestParams params)
Definition nr-epc-x2.cc:424
void RecvFromX2cSocket(Ptr< Socket > socket)
Definition nr-epc-x2.cc:167
static TypeId GetTypeId()
Get the type ID.
Definition nr-epc-x2.cc:97
NrEpcX2SapUser * m_x2SapUser
X2 SAP user.
Definition nr-epc-x2.h:197
std::vector< uint16_t > m_remoteCellIds
remote cell IDs
Definition nr-epc-x2.h:77
std::vector< uint16_t > m_localCellIds
local cell IDs
Definition nr-epc-x2.h:76
NrX2CellInfo & operator=(const NrX2CellInfo &value)
Definition nr-epc-x2.cc:60
NrX2IfaceInfo & operator=(const NrX2IfaceInfo &value)
Definition nr-epc-x2.cc:38
Ipv4Address m_remoteIpAddr
remote IP address
Definition nr-epc-x2.h:48
Ptr< Socket > m_localCtrlPlaneSocket
local control plane socket
Definition nr-epc-x2.h:49
Ptr< Socket > m_localUserPlaneSocket
local user plane socket
Definition nr-epc-x2.h:50
Parameters of the HANDOVER CANCEL message.
Parameters of the HANDOVER PREPARATION FAILURE message.
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Parameters of the HANDOVER REQUEST message.
Parameters of the LOAD INFORMATION message.
Parameters of the RESOURCE STATUS UPDATE message.
Parameters of the SN STATUS TRANSFER message.
Parameters of the UE CONTEXT RELEASE message.
Parameters of the UE DATA primitive.