A Discrete-Event Network Simulator
API
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 "eps-bearer.h"
24 
25 #include "ns3/ipv4-address.h"
26 #include "ns3/packet.h"
27 
28 #include <bitset>
29 
30 namespace ns3
31 {
32 
33 class Node;
34 
49 class EpcX2Sap
50 {
51  public:
52  virtual ~EpcX2Sap();
53 
60  {
61  uint16_t erabId;
63  bool dlForwarding;
65  uint32_t gtpTeid;
66 
68  };
69 
76  {
77  uint16_t erabId;
78  uint32_t ulGtpTeid;
79  uint32_t dlGtpTeid;
80  };
81 
88  {
89  uint16_t erabId;
90  uint16_t cause;
91  };
92 
98  static const uint16_t m_maxPdcpSn = 4096;
99 
102  {
103  uint16_t erabId;
104  std::bitset<m_maxPdcpSn> receiveStatusOfUlPdcpSdus;
105  uint16_t ulPdcpSn;
106  uint32_t ulHfn;
107  uint16_t dlPdcpSn;
108  uint32_t dlHfn;
109  };
110 
117  {
121  };
122 
129  {
130  uint16_t targetCellId;
131  std::vector<bool>
133  };
134 
144  {
145  std::vector<bool> rntpPerPrbList;
146  int16_t rntpThreshold{INT16_MIN};
147  uint16_t antennaPorts{UINT16_MAX};
148  uint16_t pB{UINT16_MAX};
149  uint16_t pdcchInterferenceImpact{UINT16_MAX};
150  };
151 
158  {
159  uint16_t sourceCellId;
160  std::vector<UlInterferenceOverloadIndicationItem>
162  std::vector<UlHighInterferenceInformationItem>
165  };
166 
173  {
177  Overload
178  };
179 
186  {
188  uint16_t capacityValue;
189  };
190 
197  {
198  uint16_t sourceCellId;
199 
202 
205 
206  uint16_t dlGbrPrbUsage;
207  uint16_t ulGbrPrbUsage;
208  uint16_t dlNonGbrPrbUsage;
209  uint16_t ulNonGbrPrbUsage;
210  uint16_t dlTotalPrbUsage;
211  uint16_t ulTotalPrbUsage;
212 
215  };
216 
218  enum IdCause
219  {
222  };
223 
230  {
231  uint16_t oldEnbUeX2apId;
232  uint16_t cause;
233  uint16_t sourceCellId;
234  uint16_t targetCellId;
235  uint32_t mmeUeS1apId;
238  std::vector<ErabToBeSetupItem> bearers;
240  };
241 
248  {
249  uint16_t oldEnbUeX2apId;
250  uint16_t newEnbUeX2apId;
251  uint16_t sourceCellId;
252  uint16_t targetCellId;
253  std::vector<ErabAdmittedItem> admittedBearers;
254  std::vector<ErabNotAdmittedItem> notAdmittedBearers;
256  };
257 
264  {
265  uint16_t oldEnbUeX2apId;
266  uint16_t sourceCellId;
267  uint16_t targetCellId;
268  uint16_t cause;
270  };
271 
278  {
279  uint16_t oldEnbUeX2apId;
280  uint16_t newEnbUeX2apId;
281  uint16_t sourceCellId;
282  uint16_t targetCellId;
283  std::vector<ErabsSubjectToStatusTransferItem>
285  };
286 
293  {
294  uint16_t oldEnbUeX2apId;
295  uint16_t newEnbUeX2apId;
296  uint16_t sourceCellId;
297  uint16_t targetCellId;
298  };
299 
306  {
307  uint16_t targetCellId{UINT16_MAX};
308  std::vector<CellInformationItem> cellInformationList;
309  };
310 
317  {
318  uint16_t targetCellId;
319  uint16_t enb1MeasurementId;
320  uint16_t enb2MeasurementId;
321  std::vector<CellMeasurementResultItem>
323  };
324 
332  {
333  uint16_t sourceCellId;
334  uint16_t targetCellId;
335  uint32_t gtpTeid;
337  };
338 
345  {
346  uint16_t oldEnbUeX2apId;
347  uint16_t newEnbUeX2apId;
348  uint16_t sourceCellId;
349  uint16_t targetCellId;
350  uint16_t cause;
351  };
352 };
353 
359 {
360  public:
361  ~EpcX2SapProvider() override;
362 
363  //
364  // Service primitives
365  //
366 
372 
378 
384 
390 
396 
402 
408 
413  virtual void SendUeData(UeDataParams params) = 0;
414 
420 };
421 
426 class EpcX2SapUser : public EpcX2Sap
427 {
428  public:
429  ~EpcX2SapUser() override;
430 
431  /*
432  * Service primitives
433  */
434 
440 
446 
452 
458 
464 
470 
476 
481  virtual void RecvUeData(UeDataParams params) = 0;
482 
489 };
490 
492 
496 template <class C>
498 {
499  public:
506 
507  // Delete default constructor to avoid misuse
509 
510  //
511  // Interface implemented from EpcX2SapProvider
512  //
513 
519 
525 
531 
537 
543 
549 
555 
560  void SendUeData(UeDataParams params) override;
561 
567 
568  private:
569  C* m_x2;
570 };
571 
572 template <class C>
574  : m_x2(x2)
575 {
576 }
577 
578 template <class C>
579 void
581 {
582  m_x2->DoSendHandoverRequest(params);
583 }
584 
585 template <class C>
586 void
588 {
589  m_x2->DoSendHandoverRequestAck(params);
590 }
591 
592 template <class C>
593 void
596 {
597  m_x2->DoSendHandoverPreparationFailure(params);
598 }
599 
600 template <class C>
601 void
603 {
604  m_x2->DoSendSnStatusTransfer(params);
605 }
606 
607 template <class C>
608 void
610 {
611  m_x2->DoSendUeContextRelease(params);
612 }
613 
614 template <class C>
615 void
617 {
618  m_x2->DoSendLoadInformation(params);
619 }
620 
621 template <class C>
622 void
624 {
625  m_x2->DoSendResourceStatusUpdate(params);
626 }
627 
628 template <class C>
629 void
631 {
632  m_x2->DoSendUeData(params);
633 }
634 
635 template <class C>
636 void
638 {
639  m_x2->DoSendHandoverCancel(params);
640 }
641 
645 template <class C>
647 {
648  public:
655 
656  // Delete default constructor to avoid misuse
658 
659  //
660  // Interface implemented from EpcX2SapUser
661  //
662 
668 
674 
680 
686 
692 
698 
704 
709  void RecvUeData(UeDataParams params) override;
710 
717 
718  private:
719  C* m_rrc;
720 };
721 
722 template <class C>
724  : m_rrc(rrc)
725 {
726 }
727 
728 template <class C>
729 void
731 {
732  m_rrc->DoRecvHandoverRequest(params);
733 }
734 
735 template <class C>
736 void
738 {
739  m_rrc->DoRecvHandoverRequestAck(params);
740 }
741 
742 template <class C>
743 void
746 {
747  m_rrc->DoRecvHandoverPreparationFailure(params);
748 }
749 
750 template <class C>
751 void
753 {
754  m_rrc->DoRecvSnStatusTransfer(params);
755 }
756 
757 template <class C>
758 void
760 {
761  m_rrc->DoRecvUeContextRelease(params);
762 }
763 
764 template <class C>
765 void
767 {
768  m_rrc->DoRecvLoadInformation(params);
769 }
770 
771 template <class C>
772 void
774 {
775  m_rrc->DoRecvResourceStatusUpdate(params);
776 }
777 
778 template <class C>
779 void
781 {
782  m_rrc->DoRecvUeData(params);
783 }
784 
785 template <class C>
786 void
788 {
789  m_rrc->DoRecvHandoverCancel(params);
790 }
791 
792 } // namespace ns3
793 
794 #endif // EPC_X2_SAP_H
The X2 SAP defines the service between the X2 entity and the RRC entity.
Definition: epc-x2-sap.h:50
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:98
UlInterferenceOverloadIndicationItem
UL Interference OverloadIndication as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:117
LoadIndicator
Load Indicator as it is used in the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:173
virtual ~EpcX2Sap()
Definition: epc-x2-sap.cc:25
IdCause
Cause ID enumeration.
Definition: epc-x2-sap.h:219
@ TimeCriticalHandover
Definition: epc-x2-sap.h:221
@ HandoverDesirableForRadioReason
Definition: epc-x2-sap.h:220
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:359
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:427
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:498
void SendHandoverCancel(HandoverCancelParams params) override
Send handover Cancel to the target eNB.
Definition: epc-x2-sap.h:637
void SendUeData(UeDataParams params) override
Send UE data function.
Definition: epc-x2-sap.h:630
void SendUeContextRelease(UeContextReleaseParams params) override
Send UE context release function.
Definition: epc-x2-sap.h:609
void SendHandoverPreparationFailure(HandoverPreparationFailureParams params) override
Send handover preparation failure function.
Definition: epc-x2-sap.h:594
void SendSnStatusTransfer(SnStatusTransferParams params) override
Send SN status transfer function.
Definition: epc-x2-sap.h:602
void SendHandoverRequest(HandoverRequestParams params) override
Send handover request function.
Definition: epc-x2-sap.h:580
void SendHandoverRequestAck(HandoverRequestAckParams params) override
Send handover request ack function.
Definition: epc-x2-sap.h:587
void SendResourceStatusUpdate(ResourceStatusUpdateParams params) override
Send resource status update function.
Definition: epc-x2-sap.h:623
void SendLoadInformation(LoadInformationParams params) override
Send load information function.
Definition: epc-x2-sap.h:616
EpcX2SpecificEpcX2SapUser.
Definition: epc-x2-sap.h:647
void RecvUeContextRelease(UeContextReleaseParams params) override
Receive UE context release function.
Definition: epc-x2-sap.h:759
void RecvHandoverRequest(HandoverRequestParams params) override
Receive handover request function.
Definition: epc-x2-sap.h:730
void RecvLoadInformation(LoadInformationParams params) override
Receive load information function.
Definition: epc-x2-sap.h:766
void RecvHandoverPreparationFailure(HandoverPreparationFailureParams params) override
Receive handover preparation failure function.
Definition: epc-x2-sap.h:744
void RecvResourceStatusUpdate(ResourceStatusUpdateParams params) override
Receive resource status update function.
Definition: epc-x2-sap.h:773
void RecvHandoverCancel(HandoverCancelParams params) override
Receive handover cancel function.
Definition: epc-x2-sap.h:787
void RecvSnStatusTransfer(SnStatusTransferParams params) override
Receive SN status transfer function.
Definition: epc-x2-sap.h:752
void RecvUeData(UeDataParams params) override
Receive UE data function.
Definition: epc-x2-sap.h:780
void RecvHandoverRequestAck(HandoverRequestAckParams params) override
Receive handover request ack function.
Definition: epc-x2-sap.h:737
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:42
Every class exported by the ns3 library is enclosed in the ns3 namespace.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Cell Information Item as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:158
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:159
std::vector< UlHighInterferenceInformationItem > ulHighInterferenceInformationList
UL high interference information list.
Definition: epc-x2-sap.h:163
RelativeNarrowbandTxBand relativeNarrowbandTxBand
relative narrow transmit band
Definition: epc-x2-sap.h:164
std::vector< UlInterferenceOverloadIndicationItem > ulInterferenceOverloadIndicationList
UL interference overload indication list.
Definition: epc-x2-sap.h:161
Cell Measurement Result Item as it is used in the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:197
uint16_t ulTotalPrbUsage
UL Total PRB usage.
Definition: epc-x2-sap.h:211
LoadIndicator ulHardwareLoadIndicator
UL hardware load indicator.
Definition: epc-x2-sap.h:201
LoadIndicator dlHardwareLoadIndicator
DL hardware load indicator.
Definition: epc-x2-sap.h:200
uint16_t sourceCellId
source cell id
Definition: epc-x2-sap.h:198
uint16_t ulGbrPrbUsage
UL GBR PRB usage.
Definition: epc-x2-sap.h:207
uint16_t dlTotalPrbUsage
DL Total PRB usage.
Definition: epc-x2-sap.h:210
LoadIndicator dlS1TnlLoadIndicator
DL S1 TNL load indicator.
Definition: epc-x2-sap.h:203
uint16_t ulNonGbrPrbUsage
UL Non GBR PRB usage.
Definition: epc-x2-sap.h:209
CompositeAvailCapacity dlCompositeAvailableCapacity
DL composite available capacity.
Definition: epc-x2-sap.h:213
CompositeAvailCapacity ulCompositeAvailableCapacity
UL composite available capacity.
Definition: epc-x2-sap.h:214
uint16_t dlGbrPrbUsage
DL GBR PRB usage.
Definition: epc-x2-sap.h:206
LoadIndicator ulS1TnlLoadIndicator
UL S1 TNL load indicator.
Definition: epc-x2-sap.h:204
uint16_t dlNonGbrPrbUsage
DL Non GBR PRB usage.
Definition: epc-x2-sap.h:208
Composite Available Capacity as it is used in the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:186
uint16_t cellCapacityClassValue
cell capacity class value
Definition: epc-x2-sap.h:187
uint16_t capacityValue
capacity value
Definition: epc-x2-sap.h:188
E-RABs admitted item as it is used in the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:76
uint32_t dlGtpTeid
downlink GTP TEID
Definition: epc-x2-sap.h:79
uint32_t ulGtpTeid
uplink GTP TEID
Definition: epc-x2-sap.h:78
uint16_t erabId
E-RAB ID.
Definition: epc-x2-sap.h:77
E-RABs not admitted item as it is used in the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:88
E-RABs to be setup item as it is used in the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:60
bool dlForwarding
DL forwarding.
Definition: epc-x2-sap.h:63
Ipv4Address transportLayerAddress
transport layer address
Definition: epc-x2-sap.h:64
EpsBearer erabLevelQosParameters
E-RAB level QOS parameters.
Definition: epc-x2-sap.h:62
ErabsSubjectToStatusTransferItem structure.
Definition: epc-x2-sap.h:102
std::bitset< m_maxPdcpSn > receiveStatusOfUlPdcpSdus
receive status of UL PDCP SDUs
Definition: epc-x2-sap.h:104
Parameters of the HANDOVER CANCEL message.
Definition: epc-x2-sap.h:345
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:346
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:349
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:347
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:348
Parameters of the HANDOVER PREPARATION FAILURE message.
Definition: epc-x2-sap.h:264
uint16_t criticalityDiagnostics
criticality diagnostics
Definition: epc-x2-sap.h:269
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:265
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:248
std::vector< ErabNotAdmittedItem > notAdmittedBearers
not admitted bearers
Definition: epc-x2-sap.h:254
std::vector< ErabAdmittedItem > admittedBearers
admitted bearers
Definition: epc-x2-sap.h:253
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:251
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:250
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:252
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:249
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:255
Parameters of the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:230
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:231
uint64_t ueAggregateMaxBitRateDownlink
UE aggregate max bit rate downlink.
Definition: epc-x2-sap.h:236
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:233
uint64_t ueAggregateMaxBitRateUplink
UE aggregate max bit rate uplink.
Definition: epc-x2-sap.h:237
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:234
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:239
uint32_t mmeUeS1apId
MME UE S1 AP ID.
Definition: epc-x2-sap.h:235
std::vector< ErabToBeSetupItem > bearers
bearers
Definition: epc-x2-sap.h:238
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:306
std::vector< CellInformationItem > cellInformationList
cell information list
Definition: epc-x2-sap.h:308
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:307
Relative Narrowband Tx Power (RNTP) as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:144
int16_t rntpThreshold
RNTP threshold.
Definition: epc-x2-sap.h:146
uint16_t antennaPorts
antenna ports
Definition: epc-x2-sap.h:147
std::vector< bool > rntpPerPrbList
RNTP per prb list.
Definition: epc-x2-sap.h:145
uint16_t pdcchInterferenceImpact
PDC channel interference list.
Definition: epc-x2-sap.h:149
Parameters of the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:317
uint16_t enb2MeasurementId
ENB2 measurement ID.
Definition: epc-x2-sap.h:320
uint16_t enb1MeasurementId
ENB1 measurement ID.
Definition: epc-x2-sap.h:319
std::vector< CellMeasurementResultItem > cellMeasurementResultList
cell measurement result list
Definition: epc-x2-sap.h:322
Parameters of the SN STATUS TRANSFER message.
Definition: epc-x2-sap.h:278
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:280
std::vector< ErabsSubjectToStatusTransferItem > erabsSubjectToStatusTransferList
ERABs subject to status transfer list.
Definition: epc-x2-sap.h:284
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:279
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:282
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:281
Parameters of the UE CONTEXT RELEASE message.
Definition: epc-x2-sap.h:293
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:295
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:294
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:296
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:297
Parameters of the UE DATA primitive.
Definition: epc-x2-sap.h:332
Ptr< Packet > ueData
UE data.
Definition: epc-x2-sap.h:336
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:333
uint32_t gtpTeid
GTP TEID.
Definition: epc-x2-sap.h:335
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:334
UL High Interference Information as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:129
std::vector< bool > ulHighInterferenceIndicationList
UL high interference indication list.
Definition: epc-x2-sap.h:132