A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
epc-x2.h
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
42
X2IfaceInfo
& operator= (
const
X2IfaceInfo
&);
43
44
public
:
45
Ipv4Address
m_remoteIpAddr;
46
Ptr<Socket>
m_localCtrlPlaneSocket;
47
Ptr<Socket>
m_localUserPlaneSocket;
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
57
X2CellInfo
& operator= (
const
X2CellInfo
&);
58
59
public
:
60
uint16_t m_localCellId;
61
uint16_t m_remoteCellId;
62
};
63
64
70
class
EpcX2
:
public
Object
71
{
72
friend
class
EpcX2SpecificEpcX2SapProvider
<EpcX2>;
73
74
public
:
78
EpcX2
();
79
83
virtual
~EpcX2
(
void
);
84
85
static
TypeId
GetTypeId (
void
);
86
virtual
void
DoDispose
(
void
);
87
88
92
void
SetEpcX2SapUser
(
EpcX2SapUser
* s);
93
97
EpcX2SapProvider
*
GetEpcX2SapProvider
();
98
99
103
void
AddX2Interface
(uint16_t enb1CellId,
Ipv4Address
enb1X2Address, uint16_t enb2CellId,
Ipv4Address
enb2X2Address);
104
105
112
void
RecvFromX2cSocket
(
Ptr<Socket>
socket);
113
120
void
RecvFromX2uSocket
(
Ptr<Socket>
socket);
121
122
123
protected
:
124
// Interface provided by EpcX2SapProvider
125
virtual
void
DoSendHandoverRequest (
EpcX2SapProvider::HandoverRequestParams
params);
126
virtual
void
DoSendHandoverRequestAck (
EpcX2SapProvider::HandoverRequestAckParams
params);
127
virtual
void
DoSendHandoverPreparationFailure (
EpcX2SapProvider::HandoverPreparationFailureParams
params);
128
virtual
void
DoSendSnStatusTransfer (
EpcX2SapProvider::SnStatusTransferParams
params);
129
virtual
void
DoSendUeContextRelease (
EpcX2SapProvider::UeContextReleaseParams
params);
130
virtual
void
DoSendLoadInformation (
EpcX2SapProvider::LoadInformationParams
params);
131
virtual
void
DoSendResourceStatusUpdate (
EpcX2SapProvider::ResourceStatusUpdateParams
params);
132
virtual
void
DoSendUeData (
EpcX2SapProvider::UeDataParams
params);
133
134
EpcX2SapUser
* m_x2SapUser;
135
EpcX2SapProvider
* m_x2SapProvider;
136
137
138
private
:
139
144
std::map < uint16_t, Ptr<X2IfaceInfo> >
m_x2InterfaceSockets
;
145
150
std::map < Ptr<Socket>,
Ptr<X2CellInfo>
>
m_x2InterfaceCellIds
;
151
155
uint16_t
m_x2cUdpPort
;
156
uint16_t m_x2uUdpPort;
157
158
};
159
160
}
//namespace ns3
161
162
#endif // EPC_X2_H
ns3::EpcX2::~EpcX2
virtual ~EpcX2(void)
Definition:
epc-x2.cc:94
ns3::X2IfaceInfo
Definition:
epc-x2.h:36
ns3::Ptr< Socket >
ns3::EpcX2SapProvider
Definition:
epc-x2-sap.h:340
ns3::EpcX2Sap::HandoverRequestParams
Parameters of the HANDOVER REQUEST message.
Definition:
epc-x2-sap.h:225
ns3::EpcX2::m_x2cUdpPort
uint16_t m_x2cUdpPort
Definition:
epc-x2.h:155
ns3::X2CellInfo
Definition:
epc-x2.h:51
ns3::EpcX2::RecvFromX2uSocket
void RecvFromX2uSocket(Ptr< Socket > socket)
Definition:
epc-x2.cc:370
ns3::EpcX2::RecvFromX2cSocket
void RecvFromX2cSocket(Ptr< Socket > socket)
Definition:
epc-x2.cc:170
ns3::EpcX2Sap::HandoverPreparationFailureParams
Parameters of the HANDOVER PREPARATION FAILURE message.
Definition:
epc-x2-sap.h:259
ns3::EpcX2Sap::SnStatusTransferParams
Parameters of the SN STATUS TRANSFER message.
Definition:
epc-x2-sap.h:273
ns3::EpcX2::m_x2InterfaceSockets
std::map< uint16_t, Ptr< X2IfaceInfo > > m_x2InterfaceSockets
Definition:
epc-x2.h:144
ns3::EpcX2::EpcX2
EpcX2()
Definition:
epc-x2.cc:85
ns3::EpcX2Sap::ResourceStatusUpdateParams
Parameters of the RESOURCE STATUS UPDATE message.
Definition:
epc-x2-sap.h:311
ns3::EpcX2
Definition:
epc-x2.h:70
ns3::EpcX2Sap::UeContextReleaseParams
Parameters of the UE CONTEXT RELEASE message.
Definition:
epc-x2-sap.h:287
ns3::EpcX2Sap::HandoverRequestAckParams
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Definition:
epc-x2-sap.h:243
ns3::EpcX2SapUser
Definition:
epc-x2-sap.h:371
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:38
ns3::EpcX2::GetEpcX2SapProvider
EpcX2SapProvider * GetEpcX2SapProvider()
Definition:
epc-x2.cc:125
ns3::EpcX2::SetEpcX2SapUser
void SetEpcX2SapUser(EpcX2SapUser *s)
Definition:
epc-x2.cc:118
ns3::EpcX2SpecificEpcX2SapProvider
Definition:
epc-x2-sap.h:400
ns3::EpcX2Sap::LoadInformationParams
Parameters of the LOAD INFORMATION message.
Definition:
epc-x2-sap.h:300
ns3::EpcX2::m_x2InterfaceCellIds
std::map< Ptr< Socket >, Ptr< X2CellInfo > > m_x2InterfaceCellIds
Definition:
epc-x2.h:150
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::EpcX2::AddX2Interface
void AddX2Interface(uint16_t enb1CellId, Ipv4Address enb1X2Address, uint16_t enb2CellId, Ipv4Address enb2X2Address)
Definition:
epc-x2.cc:133
ns3::EpcX2::DoDispose
virtual void DoDispose(void)
Definition:
epc-x2.cc:100
ns3::EpcX2Sap::UeDataParams
Parameters of the UE DATA primitive.
Definition:
epc-x2-sap.h:325
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:63
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:44
src
lte
model
epc-x2.h
Generated on Sun Mar 16 2014 11:25:05 for ns-3 by
1.8.6