A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
epc-x2.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Manuel Requena <manuel.requena@cttc.es>
19  */
20 
21 #ifndef EPC_X2_H
22 #define EPC_X2_H
23 
24 #include "ns3/socket.h"
25 #include "ns3/callback.h"
26 #include "ns3/ptr.h"
27 #include "ns3/object.h"
28 
29 #include "ns3/epc-x2-sap.h"
30 
31 #include <map>
32 
33 namespace ns3 {
34 
35 
36 class X2IfaceInfo : public SimpleRefCount<X2IfaceInfo>
37 {
38 public:
39  X2IfaceInfo (Ipv4Address remoteIpAddr, Ptr<Socket> localCtrlPlaneSocket, Ptr<Socket> localUserPlaneSocket);
40  virtual ~X2IfaceInfo (void);
41 
43 
44 public:
48 };
49 
50 
51 class X2CellInfo : public SimpleRefCount<X2CellInfo>
52 {
53 public:
54  X2CellInfo (uint16_t localCellId, uint16_t remoteCellId);
55  virtual ~X2CellInfo (void);
56 
58 
59 public:
60  uint16_t m_localCellId;
61  uint16_t m_remoteCellId;
62 };
63 
64 
70 class EpcX2 : public Object
71 {
73 
74 public:
78  EpcX2 ();
79 
83  virtual ~EpcX2 (void);
84 
85  static TypeId GetTypeId (void);
86  virtual void DoDispose (void);
87 
88 
93 
98 
99 
107  void AddX2Interface (uint16_t enb1CellId, Ipv4Address enb1X2Address,
108  uint16_t enb2CellId, Ipv4Address enb2X2Address);
109 
110 
117  void RecvFromX2cSocket (Ptr<Socket> socket);
118 
125  void RecvFromX2uSocket (Ptr<Socket> socket);
126 
127 
128 protected:
129  // Interface provided by EpcX2SapProvider
137  virtual void DoSendUeData (EpcX2SapProvider::UeDataParams params);
138 
141 
142 
143 private:
144 
149  std::map < uint16_t, Ptr<X2IfaceInfo> > m_x2InterfaceSockets;
150 
155  std::map < Ptr<Socket>, Ptr<X2CellInfo> > m_x2InterfaceCellIds;
156 
160  uint16_t m_x2cUdpPort;
161  uint16_t m_x2uUdpPort;
162 
163 };
164 
165 } //namespace ns3
166 
167 #endif // EPC_X2_H
virtual ~EpcX2(void)
Destructor.
Definition: epc-x2.cc:94
virtual void DoSendHandoverRequest(EpcX2SapProvider::HandoverRequestParams params)
Definition: epc-x2.cc:401
virtual ~X2IfaceInfo(void)
Definition: epc-x2.cc:42
These service primitives of this part of the X2 SAP are provided by the X2 entity and issued by RRC e...
Definition: epc-x2-sap.h:340
uint16_t m_remoteCellId
Definition: epc-x2.h:61
Ptr< Socket > m_localUserPlaneSocket
Definition: epc-x2.h:47
X2CellInfo & operator=(const X2CellInfo &)
Definition: epc-x2.cc:73
uint16_t m_localCellId
Definition: epc-x2.h:60
Parameters of the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:225
static TypeId GetTypeId(void)
Definition: epc-x2.cc:110
virtual void DoSendLoadInformation(EpcX2SapProvider::LoadInformationParams params)
Definition: epc-x2.cc:642
uint16_t m_x2cUdpPort
UDP ports to be used for the X2 interfaces: X2-C and X2-U.
Definition: epc-x2.h:160
void RecvFromX2uSocket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the X2-U (X2 User Plane) socket.
Definition: epc-x2.cc:370
virtual ~X2CellInfo(void)
Definition: epc-x2.cc:66
virtual void DoSendUeData(EpcX2SapProvider::UeDataParams params)
Definition: epc-x2.cc:734
virtual void DoSendUeContextRelease(EpcX2SapProvider::UeContextReleaseParams params)
Definition: epc-x2.cc:597
virtual void DoSendSnStatusTransfer(EpcX2SapProvider::SnStatusTransferParams params)
Definition: epc-x2.cc:549
uint16_t m_x2uUdpPort
Definition: epc-x2.h:161
virtual void DoSendResourceStatusUpdate(EpcX2SapProvider::ResourceStatusUpdateParams params)
Definition: epc-x2.cc:686
X2IfaceInfo & operator=(const X2IfaceInfo &)
Definition: epc-x2.cc:49
void RecvFromX2cSocket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the X2-C (X2 Control Plane) socket. ...
Definition: epc-x2.cc:170
Parameters of the HANDOVER PREPARATION FAILURE message.
Definition: epc-x2-sap.h:259
Ptr< Socket > m_localCtrlPlaneSocket
Definition: epc-x2.h:46
Ptr< SampleEmitter > s
Parameters of the SN STATUS TRANSFER message.
Definition: epc-x2-sap.h:273
virtual void DoSendHandoverRequestAck(EpcX2SapProvider::HandoverRequestAckParams params)
Definition: epc-x2.cc:452
std::map< uint16_t, Ptr< X2IfaceInfo > > m_x2InterfaceSockets
Map the targetCellId to the corresponding (sourceSocket, remoteIpAddr) to be used to send the X2 mess...
Definition: epc-x2.h:149
EpcX2()
Constructor.
Definition: epc-x2.cc:85
X2IfaceInfo(Ipv4Address remoteIpAddr, Ptr< Socket > localCtrlPlaneSocket, Ptr< Socket > localUserPlaneSocket)
Definition: epc-x2.cc:35
X2CellInfo(uint16_t localCellId, uint16_t remoteCellId)
Definition: epc-x2.cc:60
Parameters of the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:311
This entity is installed inside an eNB and provides the functionality for the X2 interface.
Definition: epc-x2.h:70
Parameters of the UE CONTEXT RELEASE message.
Definition: epc-x2-sap.h:287
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:243
These service primitives of this part of the X2 SAP are provided by the RRC entity and issued by the ...
Definition: epc-x2-sap.h:371
EpcX2SapUser * m_x2SapUser
Definition: epc-x2.h:139
virtual void DoSendHandoverPreparationFailure(EpcX2SapProvider::HandoverPreparationFailureParams params)
Definition: epc-x2.cc:501
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:38
EpcX2SapProvider * GetEpcX2SapProvider()
Definition: epc-x2.cc:125
void SetEpcX2SapUser(EpcX2SapUser *s)
Definition: epc-x2.cc:118
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:300
EpcX2SapProvider * m_x2SapProvider
Definition: epc-x2.h:140
std::map< Ptr< Socket >, Ptr< X2CellInfo > > m_x2InterfaceCellIds
Map the localSocket (the one receiving the X2 message) to the corresponding (sourceCellId, targetCellId) associated with the X2 interface.
Definition: epc-x2.h:155
a base class which provides memory management and object aggregation
Definition: object.h:64
void AddX2Interface(uint16_t enb1CellId, Ipv4Address enb1X2Address, uint16_t enb2CellId, Ipv4Address enb2X2Address)
Add an X2 interface to this EPC X2 entity.
Definition: epc-x2.cc:133
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: epc-x2.cc:100
Parameters of the UE DATA primitive.
Definition: epc-x2-sap.h:325
Ipv4Address m_remoteIpAddr
Definition: epc-x2.h:45
A template-based reference counting class.
a unique identifier for an interface.
Definition: type-id.h:49