A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
epc-x2-sap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Manuel Requena <manuel.requena@cttc.es>
18 */
19
20#ifndef EPC_X2_SAP_H
21#define EPC_X2_SAP_H
22
23#include "ns3/eps-bearer.h"
24#include "ns3/ipv4-address.h"
25#include "ns3/packet.h"
26
27#include <bitset>
28
29namespace ns3
30{
31
32class Node;
33
49{
50 public:
51 virtual ~EpcX2Sap();
52
59 {
60 uint16_t erabId;
65
67 };
68
75 {
76 uint16_t erabId;
79 };
80
87 {
88 uint16_t erabId;
89 uint16_t cause;
90 };
91
97 static const uint16_t m_maxPdcpSn = 4096;
98
101 {
102 uint16_t erabId;
103 std::bitset<m_maxPdcpSn> receiveStatusOfUlPdcpSdus;
104 uint16_t ulPdcpSn;
106 uint16_t dlPdcpSn;
108 };
109
116 {
120 };
121
128 {
129 uint16_t targetCellId;
130 std::vector<bool>
132 };
133
143 {
144 std::vector<bool> rntpPerPrbList;
145 int16_t rntpThreshold{INT16_MIN};
146 uint16_t antennaPorts{UINT16_MAX};
147 uint16_t pB{UINT16_MAX};
148 uint16_t pdcchInterferenceImpact{UINT16_MAX};
149 };
150
157 {
158 uint16_t sourceCellId;
159 std::vector<UlInterferenceOverloadIndicationItem>
161 std::vector<UlHighInterferenceInformationItem>
164 };
165
172 {
177 };
178
185 {
187 uint16_t capacityValue;
188 };
189
196 {
197 uint16_t sourceCellId;
198
201
204
205 uint16_t dlGbrPrbUsage;
206 uint16_t ulGbrPrbUsage;
211
214 };
215
218 {
221 };
222
229 {
230 uint16_t oldEnbUeX2apId;
231 uint16_t cause;
232 uint16_t sourceCellId;
233 uint16_t targetCellId;
237 std::vector<ErabToBeSetupItem> bearers;
239 };
240
247 {
248 uint16_t oldEnbUeX2apId;
249 uint16_t newEnbUeX2apId;
250 uint16_t sourceCellId;
251 uint16_t targetCellId;
252 std::vector<ErabAdmittedItem> admittedBearers;
253 std::vector<ErabNotAdmittedItem> notAdmittedBearers;
255 };
256
263 {
264 uint16_t oldEnbUeX2apId;
265 uint16_t sourceCellId;
266 uint16_t targetCellId;
267 uint16_t cause;
269 };
270
277 {
278 uint16_t oldEnbUeX2apId;
279 uint16_t newEnbUeX2apId;
280 uint16_t sourceCellId;
281 uint16_t targetCellId;
282 std::vector<ErabsSubjectToStatusTransferItem>
284 };
285
292 {
293 uint16_t oldEnbUeX2apId;
294 uint16_t newEnbUeX2apId;
295 uint16_t sourceCellId;
296 uint16_t targetCellId;
297 };
298
305 {
306 uint16_t targetCellId{UINT16_MAX};
307 std::vector<CellInformationItem> cellInformationList;
308 };
309
316 {
317 uint16_t targetCellId;
320 std::vector<CellMeasurementResultItem>
322 };
323
331 {
332 uint16_t sourceCellId;
333 uint16_t targetCellId;
336 };
337
344 {
345 uint16_t oldEnbUeX2apId;
346 uint16_t newEnbUeX2apId;
347 uint16_t sourceCellId;
348 uint16_t targetCellId;
349 uint16_t cause;
350 };
351};
352
358{
359 public:
360 ~EpcX2SapProvider() override;
361
362 //
363 // Service primitives
364 //
365
371
377
383
389
395
401
407
412 virtual void SendUeData(UeDataParams params) = 0;
413
418 virtual void SendHandoverCancel(HandoverCancelParams params) = 0;
419};
420
425class EpcX2SapUser : public EpcX2Sap
426{
427 public:
428 ~EpcX2SapUser() override;
429
430 /*
431 * Service primitives
432 */
433
439
445
451
457
463
469
475
480 virtual void RecvUeData(UeDataParams params) = 0;
481
487 virtual void RecvHandoverCancel(HandoverCancelParams params) = 0;
488};
489
491
495template <class C>
497{
498 public:
505
506 // Delete default constructor to avoid misuse
508
509 //
510 // Interface implemented from EpcX2SapProvider
511 //
512
517 void SendHandoverRequest(HandoverRequestParams params) override;
518
524
530
535 void SendSnStatusTransfer(SnStatusTransferParams params) override;
536
541 void SendUeContextRelease(UeContextReleaseParams params) override;
542
547 void SendLoadInformation(LoadInformationParams params) override;
548
554
559 void SendUeData(UeDataParams params) override;
560
565 void SendHandoverCancel(HandoverCancelParams params) override;
566
567 private:
568 C* m_x2;
569};
570
571template <class C>
573 : m_x2(x2)
574{
575}
576
577template <class C>
578void
580{
581 m_x2->DoSendHandoverRequest(params);
582}
583
584template <class C>
585void
587{
588 m_x2->DoSendHandoverRequestAck(params);
589}
590
591template <class C>
592void
595{
596 m_x2->DoSendHandoverPreparationFailure(params);
597}
598
599template <class C>
600void
602{
603 m_x2->DoSendSnStatusTransfer(params);
604}
605
606template <class C>
607void
609{
610 m_x2->DoSendUeContextRelease(params);
611}
612
613template <class C>
614void
616{
617 m_x2->DoSendLoadInformation(params);
618}
619
620template <class C>
621void
623{
624 m_x2->DoSendResourceStatusUpdate(params);
625}
626
627template <class C>
628void
630{
631 m_x2->DoSendUeData(params);
632}
633
634template <class C>
635void
637{
638 m_x2->DoSendHandoverCancel(params);
639}
640
644template <class C>
646{
647 public:
654
655 // Delete default constructor to avoid misuse
657
658 //
659 // Interface implemented from EpcX2SapUser
660 //
661
666 void RecvHandoverRequest(HandoverRequestParams params) override;
667
673
679
684 void RecvSnStatusTransfer(SnStatusTransferParams params) override;
685
690 void RecvUeContextRelease(UeContextReleaseParams params) override;
691
696 void RecvLoadInformation(LoadInformationParams params) override;
697
703
708 void RecvUeData(UeDataParams params) override;
709
715 void RecvHandoverCancel(HandoverCancelParams params) override;
716
717 private:
718 C* m_rrc;
719};
720
721template <class C>
723 : m_rrc(rrc)
724{
725}
726
727template <class C>
728void
730{
731 m_rrc->DoRecvHandoverRequest(params);
732}
733
734template <class C>
735void
737{
738 m_rrc->DoRecvHandoverRequestAck(params);
739}
740
741template <class C>
742void
745{
746 m_rrc->DoRecvHandoverPreparationFailure(params);
747}
748
749template <class C>
750void
752{
753 m_rrc->DoRecvSnStatusTransfer(params);
754}
755
756template <class C>
757void
759{
760 m_rrc->DoRecvUeContextRelease(params);
761}
762
763template <class C>
764void
766{
767 m_rrc->DoRecvLoadInformation(params);
768}
769
770template <class C>
771void
773{
774 m_rrc->DoRecvResourceStatusUpdate(params);
775}
776
777template <class C>
778void
780{
781 m_rrc->DoRecvUeData(params);
782}
783
784template <class C>
785void
787{
788 m_rrc->DoRecvHandoverCancel(params);
789}
790
791} // namespace ns3
792
793#endif // EPC_X2_SAP_H
The X2 SAP defines the service between the X2 entity and the RRC entity.
Definition: epc-x2-sap.h:49
static const uint16_t m_maxPdcpSn
E-RABs subject to status transfer item as it is used in the SN STATUS TRANSFER message.
Definition: epc-x2-sap.h:97
UlInterferenceOverloadIndicationItem
UL Interference OverloadIndication as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:116
LoadIndicator
Load Indicator as it is used in the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:172
virtual ~EpcX2Sap()
Definition: epc-x2-sap.cc:25
IdCause
Cause ID enumeration.
Definition: epc-x2-sap.h:218
@ TimeCriticalHandover
Definition: epc-x2-sap.h:220
@ HandoverDesirableForRadioReason
Definition: epc-x2-sap.h:219
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:358
virtual void SendHandoverRequestAck(HandoverRequestAckParams params)=0
Send handover request ack function.
~EpcX2SapProvider() override
Definition: epc-x2-sap.cc:34
virtual void SendHandoverRequest(HandoverRequestParams params)=0
Send handover request function.
virtual void SendResourceStatusUpdate(ResourceStatusUpdateParams params)=0
Send resource status update function.
virtual void SendSnStatusTransfer(SnStatusTransferParams params)=0
Send SN status transfer function.
virtual void SendHandoverPreparationFailure(HandoverPreparationFailureParams params)=0
Send handover preparation failure function.
virtual void SendHandoverCancel(HandoverCancelParams params)=0
Send handover Cancel to the target eNB.
virtual void SendUeContextRelease(UeContextReleaseParams params)=0
Send UE context release function.
virtual void SendLoadInformation(LoadInformationParams params)=0
Send load information function.
virtual void SendUeData(UeDataParams params)=0
Send UE data function.
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:426
virtual void RecvUeData(UeDataParams params)=0
Receive UE data function.
virtual void RecvUeContextRelease(UeContextReleaseParams params)=0
Receive UE context release function.
virtual void RecvHandoverCancel(HandoverCancelParams params)=0
Receive handover cancel function.
virtual void RecvSnStatusTransfer(SnStatusTransferParams params)=0
Receive SN status transfer function.
virtual void RecvLoadInformation(LoadInformationParams params)=0
Receive load information function.
virtual void RecvHandoverRequestAck(HandoverRequestAckParams params)=0
Receive handover request ack function.
virtual void RecvResourceStatusUpdate(ResourceStatusUpdateParams params)=0
Receive resource status update function.
virtual void RecvHandoverPreparationFailure(HandoverPreparationFailureParams params)=0
Receive handover preparation failure function.
~EpcX2SapUser() override
Definition: epc-x2-sap.cc:38
virtual void RecvHandoverRequest(HandoverRequestParams params)=0
Receive handover request function.
EpcX2SpecificEpcX2SapProvider.
Definition: epc-x2-sap.h:497
void SendHandoverCancel(HandoverCancelParams params) override
Send handover Cancel to the target eNB.
Definition: epc-x2-sap.h:636
void SendUeData(UeDataParams params) override
Send UE data function.
Definition: epc-x2-sap.h:629
void SendUeContextRelease(UeContextReleaseParams params) override
Send UE context release function.
Definition: epc-x2-sap.h:608
void SendHandoverPreparationFailure(HandoverPreparationFailureParams params) override
Send handover preparation failure function.
Definition: epc-x2-sap.h:593
void SendSnStatusTransfer(SnStatusTransferParams params) override
Send SN status transfer function.
Definition: epc-x2-sap.h:601
void SendHandoverRequest(HandoverRequestParams params) override
Send handover request function.
Definition: epc-x2-sap.h:579
void SendHandoverRequestAck(HandoverRequestAckParams params) override
Send handover request ack function.
Definition: epc-x2-sap.h:586
void SendResourceStatusUpdate(ResourceStatusUpdateParams params) override
Send resource status update function.
Definition: epc-x2-sap.h:622
void SendLoadInformation(LoadInformationParams params) override
Send load information function.
Definition: epc-x2-sap.h:615
EpcX2SpecificEpcX2SapUser.
Definition: epc-x2-sap.h:646
void RecvUeContextRelease(UeContextReleaseParams params) override
Receive UE context release function.
Definition: epc-x2-sap.h:758
void RecvHandoverRequest(HandoverRequestParams params) override
Receive handover request function.
Definition: epc-x2-sap.h:729
void RecvLoadInformation(LoadInformationParams params) override
Receive load information function.
Definition: epc-x2-sap.h:765
void RecvHandoverPreparationFailure(HandoverPreparationFailureParams params) override
Receive handover preparation failure function.
Definition: epc-x2-sap.h:743
void RecvResourceStatusUpdate(ResourceStatusUpdateParams params) override
Receive resource status update function.
Definition: epc-x2-sap.h:772
void RecvHandoverCancel(HandoverCancelParams params) override
Receive handover cancel function.
Definition: epc-x2-sap.h:786
void RecvSnStatusTransfer(SnStatusTransferParams params) override
Receive SN status transfer function.
Definition: epc-x2-sap.h:751
void RecvUeData(UeDataParams params) override
Receive UE data function.
Definition: epc-x2-sap.h:779
void RecvHandoverRequestAck(HandoverRequestAckParams params) override
Receive handover request ack function.
Definition: epc-x2-sap.h:736
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Cell Information Item as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:157
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:158
std::vector< UlHighInterferenceInformationItem > ulHighInterferenceInformationList
UL high interference information list.
Definition: epc-x2-sap.h:162
RelativeNarrowbandTxBand relativeNarrowbandTxBand
relative narrow transmit band
Definition: epc-x2-sap.h:163
std::vector< UlInterferenceOverloadIndicationItem > ulInterferenceOverloadIndicationList
UL interference overload indication list.
Definition: epc-x2-sap.h:160
Cell Measurement Result Item as it is used in the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:196
uint16_t ulTotalPrbUsage
UL Total PRB usage.
Definition: epc-x2-sap.h:210
LoadIndicator ulHardwareLoadIndicator
UL hardware load indicator.
Definition: epc-x2-sap.h:200
LoadIndicator dlHardwareLoadIndicator
DL hardware load indicator.
Definition: epc-x2-sap.h:199
uint16_t sourceCellId
source cell id
Definition: epc-x2-sap.h:197
uint16_t ulGbrPrbUsage
UL GBR PRB usage.
Definition: epc-x2-sap.h:206
uint16_t dlTotalPrbUsage
DL Total PRB usage.
Definition: epc-x2-sap.h:209
LoadIndicator dlS1TnlLoadIndicator
DL S1 TNL load indicator.
Definition: epc-x2-sap.h:202
uint16_t ulNonGbrPrbUsage
UL Non GBR PRB usage.
Definition: epc-x2-sap.h:208
CompositeAvailCapacity dlCompositeAvailableCapacity
DL composite available capacity.
Definition: epc-x2-sap.h:212
CompositeAvailCapacity ulCompositeAvailableCapacity
UL composite available capacity.
Definition: epc-x2-sap.h:213
uint16_t dlGbrPrbUsage
DL GBR PRB usage.
Definition: epc-x2-sap.h:205
LoadIndicator ulS1TnlLoadIndicator
UL S1 TNL load indicator.
Definition: epc-x2-sap.h:203
uint16_t dlNonGbrPrbUsage
DL Non GBR PRB usage.
Definition: epc-x2-sap.h:207
Composite Available Capacity as it is used in the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:185
uint16_t cellCapacityClassValue
cell capacity class value
Definition: epc-x2-sap.h:186
uint16_t capacityValue
capacity value
Definition: epc-x2-sap.h:187
E-RABs admitted item as it is used in the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:75
uint32_t dlGtpTeid
downlink GTP TEID
Definition: epc-x2-sap.h:78
uint32_t ulGtpTeid
uplink GTP TEID
Definition: epc-x2-sap.h:77
uint16_t erabId
E-RAB ID.
Definition: epc-x2-sap.h:76
E-RABs not admitted item as it is used in the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:87
E-RABs to be setup item as it is used in the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:59
bool dlForwarding
DL forwarding.
Definition: epc-x2-sap.h:62
Ipv4Address transportLayerAddress
transport layer address
Definition: epc-x2-sap.h:63
EpsBearer erabLevelQosParameters
E-RAB level QOS parameters.
Definition: epc-x2-sap.h:61
ErabsSubjectToStatusTransferItem structure.
Definition: epc-x2-sap.h:101
std::bitset< m_maxPdcpSn > receiveStatusOfUlPdcpSdus
receive status of UL PDCP SDUs
Definition: epc-x2-sap.h:103
Parameters of the HANDOVER CANCEL message.
Definition: epc-x2-sap.h:344
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:345
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:348
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:346
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:347
Parameters of the HANDOVER PREPARATION FAILURE message.
Definition: epc-x2-sap.h:263
uint16_t criticalityDiagnostics
criticality diagnostics
Definition: epc-x2-sap.h:268
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:264
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:247
std::vector< ErabNotAdmittedItem > notAdmittedBearers
not admitted bearers
Definition: epc-x2-sap.h:253
std::vector< ErabAdmittedItem > admittedBearers
admitted bearers
Definition: epc-x2-sap.h:252
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:250
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:249
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:251
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:248
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:254
Parameters of the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:229
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:230
uint64_t ueAggregateMaxBitRateDownlink
UE aggregate max bit rate downlink.
Definition: epc-x2-sap.h:235
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:232
uint64_t ueAggregateMaxBitRateUplink
UE aggregate max bit rate uplink.
Definition: epc-x2-sap.h:236
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:233
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:238
uint32_t mmeUeS1apId
MME UE S1 AP ID.
Definition: epc-x2-sap.h:234
std::vector< ErabToBeSetupItem > bearers
bearers
Definition: epc-x2-sap.h:237
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:305
std::vector< CellInformationItem > cellInformationList
cell information list
Definition: epc-x2-sap.h:307
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:306
Relative Narrowband Tx Power (RNTP) as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:143
int16_t rntpThreshold
RNTP threshold.
Definition: epc-x2-sap.h:145
uint16_t antennaPorts
antenna ports
Definition: epc-x2-sap.h:146
std::vector< bool > rntpPerPrbList
RNTP per prb list.
Definition: epc-x2-sap.h:144
uint16_t pdcchInterferenceImpact
PDC channel interference list.
Definition: epc-x2-sap.h:148
Parameters of the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:316
uint16_t enb2MeasurementId
ENB2 measurement ID.
Definition: epc-x2-sap.h:319
uint16_t enb1MeasurementId
ENB1 measurement ID.
Definition: epc-x2-sap.h:318
std::vector< CellMeasurementResultItem > cellMeasurementResultList
cell measurement result list
Definition: epc-x2-sap.h:321
Parameters of the SN STATUS TRANSFER message.
Definition: epc-x2-sap.h:277
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:279
std::vector< ErabsSubjectToStatusTransferItem > erabsSubjectToStatusTransferList
ERABs subject to status transfer list.
Definition: epc-x2-sap.h:283
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:278
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:281
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:280
Parameters of the UE CONTEXT RELEASE message.
Definition: epc-x2-sap.h:292
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:294
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:293
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:295
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:296
Parameters of the UE DATA primitive.
Definition: epc-x2-sap.h:331
Ptr< Packet > ueData
UE data.
Definition: epc-x2-sap.h:335
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:332
uint32_t gtpTeid
GTP TEID.
Definition: epc-x2-sap.h:334
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:333
UL High Interference Information as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:128
std::vector< bool > ulHighInterferenceIndicationList
UL high interference indication list.
Definition: epc-x2-sap.h:131