A Discrete-Event Network Simulator
API
epc-x2-sap.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_SAP_H
22 #define EPC_X2_SAP_H
23 
24 #include "ns3/packet.h"
25 #include "ns3/eps-bearer.h"
26 #include "ns3/ipv4-address.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> ulHighInterferenceIndicationList;
132  };
133 
143  {
144  std::vector <bool> rntpPerPrbList;
145  int16_t rntpThreshold;
146  uint16_t antennaPorts;
147  uint16_t pB;
149  };
150 
157  {
158  uint16_t sourceCellId;
159  std::vector <UlInterferenceOverloadIndicationItem> ulInterferenceOverloadIndicationList;
160  std::vector <UlHighInterferenceInformationItem> ulHighInterferenceInformationList;
162  };
163 
170  {
175  };
176 
183  {
185  uint16_t capacityValue;
186  };
187 
194  {
195  uint16_t sourceCellId;
196 
199 
202 
203  uint16_t dlGbrPrbUsage;
204  uint16_t ulGbrPrbUsage;
205  uint16_t dlNonGbrPrbUsage;
206  uint16_t ulNonGbrPrbUsage;
207  uint16_t dlTotalPrbUsage;
208  uint16_t ulTotalPrbUsage;
209 
212  };
213 
214 
216  enum IdCause
217  {
220  };
221 
222 
229  {
230  uint16_t oldEnbUeX2apId;
231  uint16_t cause;
232  uint16_t sourceCellId;
233  uint16_t targetCellId;
234  uint32_t mmeUeS1apId;
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> erabsSubjectToStatusTransferList;
283  };
284 
291  {
292  uint16_t oldEnbUeX2apId;
293  uint16_t newEnbUeX2apId;
294  uint16_t sourceCellId;
295  uint16_t targetCellId;
296  };
297 
304  {
305  uint16_t targetCellId;
306  std::vector <CellInformationItem> cellInformationList;
307  };
308 
315  {
316  uint16_t targetCellId;
317  uint16_t enb1MeasurementId;
318  uint16_t enb2MeasurementId;
319  std::vector <CellMeasurementResultItem> cellMeasurementResultList;
320  };
321 
329  {
330  uint16_t sourceCellId;
331  uint16_t targetCellId;
332  uint32_t gtpTeid;
334  };
335 
336 };
337 
338 
344 {
345 public:
346  virtual ~EpcX2SapProvider ();
347 
348  //
349  // Service primitives
350  //
351 
356  virtual void SendHandoverRequest (HandoverRequestParams params) = 0;
357 
362  virtual void SendHandoverRequestAck (HandoverRequestAckParams params) = 0;
363 
369 
374  virtual void SendSnStatusTransfer (SnStatusTransferParams params) = 0;
375 
380  virtual void SendUeContextRelease (UeContextReleaseParams params) = 0;
381 
386  virtual void SendLoadInformation (LoadInformationParams params) = 0;
387 
392  virtual void SendResourceStatusUpdate (ResourceStatusUpdateParams params) = 0;
393 
398  virtual void SendUeData (UeDataParams params) = 0;
399 };
400 
401 
406 class EpcX2SapUser : public EpcX2Sap
407 {
408 public:
409  virtual ~EpcX2SapUser ();
410 
411  /*
412  * Service primitives
413  */
414 
419  virtual void RecvHandoverRequest (HandoverRequestParams params) = 0;
420 
425  virtual void RecvHandoverRequestAck (HandoverRequestAckParams params) = 0;
426 
432 
437  virtual void RecvSnStatusTransfer (SnStatusTransferParams params) = 0;
438 
443  virtual void RecvUeContextRelease (UeContextReleaseParams params) = 0;
444 
449  virtual void RecvLoadInformation (LoadInformationParams params) = 0;
450 
455  virtual void RecvResourceStatusUpdate (ResourceStatusUpdateParams params) = 0;
456 
461  virtual void RecvUeData (UeDataParams params) = 0;
462 };
463 
465 
469 template <class C>
471 {
472 public:
479 
480  //
481  // Interface implemented from EpcX2SapProvider
482  //
483 
488  virtual void SendHandoverRequest (HandoverRequestParams params);
489 
494  virtual void SendHandoverRequestAck (HandoverRequestAckParams params);
495 
501 
506  virtual void SendSnStatusTransfer (SnStatusTransferParams params);
507 
512  virtual void SendUeContextRelease (UeContextReleaseParams params);
513 
518  virtual void SendLoadInformation (LoadInformationParams params);
519 
525 
530  virtual void SendUeData (UeDataParams params);
531 
532 private:
534  C* m_x2;
535 };
536 
537 template <class C>
539  : m_x2 (x2)
540 {
541 }
542 
543 template <class C>
545 {
546 }
547 
548 template <class C>
549 void
551 {
552  m_x2->DoSendHandoverRequest (params);
553 }
554 
555 template <class C>
556 void
558 {
559  m_x2->DoSendHandoverRequestAck (params);
560 }
561 
562 template <class C>
563 void
565 {
566  m_x2->DoSendHandoverPreparationFailure (params);
567 }
568 
569 template <class C>
570 void
572 {
573  m_x2->DoSendSnStatusTransfer (params);
574 }
575 
576 template <class C>
577 void
579 {
580  m_x2->DoSendUeContextRelease (params);
581 }
582 
583 template <class C>
584 void
586 {
587  m_x2->DoSendLoadInformation (params);
588 }
589 
590 template <class C>
591 void
593 {
594  m_x2->DoSendResourceStatusUpdate (params);
595 }
596 
597 template <class C>
598 void
600 {
601  m_x2->DoSendUeData (params);
602 }
603 
607 template <class C>
609 {
610 public:
616  EpcX2SpecificEpcX2SapUser (C* rrc);
617 
618  //
619  // Interface implemented from EpcX2SapUser
620  //
621 
626  virtual void RecvHandoverRequest (HandoverRequestParams params);
627 
632  virtual void RecvHandoverRequestAck (HandoverRequestAckParams params);
633 
639 
644  virtual void RecvSnStatusTransfer (SnStatusTransferParams params);
645 
650  virtual void RecvUeContextRelease (UeContextReleaseParams params);
651 
656  virtual void RecvLoadInformation (LoadInformationParams params);
657 
663 
668  virtual void RecvUeData (UeDataParams params);
669 
670 private:
672  C* m_rrc;
673 };
674 
675 template <class C>
677  : m_rrc (rrc)
678 {
679 }
680 
681 template <class C>
683 {
684 }
685 
686 template <class C>
687 void
689 {
690  m_rrc->DoRecvHandoverRequest (params);
691 }
692 
693 template <class C>
694 void
696 {
697  m_rrc->DoRecvHandoverRequestAck (params);
698 }
699 
700 template <class C>
701 void
703 {
704  m_rrc->DoRecvHandoverPreparationFailure (params);
705 }
706 
707 template <class C>
708 void
710 {
711  m_rrc->DoRecvSnStatusTransfer (params);
712 }
713 
714 template <class C>
715 void
717 {
718  m_rrc->DoRecvUeContextRelease (params);
719 }
720 
721 template <class C>
722 void
724 {
725  m_rrc->DoRecvLoadInformation (params);
726 }
727 
728 template <class C>
729 void
731 {
732  m_rrc->DoRecvResourceStatusUpdate (params);
733 }
734 
735 template <class C>
736 void
738 {
739  m_rrc->DoRecvUeData (params);
740 }
741 
742 } // namespace ns3
743 
744 #endif // EPC_X2_SAP_H
uint16_t ulGbrPrbUsage
UL GBR PRB usage.
Definition: epc-x2-sap.h:204
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:330
RelativeNarrowbandTxBand relativeNarrowbandTxBand
relative narrow transmit band
Definition: epc-x2-sap.h:161
uint16_t sourceCellId
source cell id
Definition: epc-x2-sap.h:195
uint32_t mmeUeS1apId
MME UE S1 AP ID.
Definition: epc-x2-sap.h:234
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:343
E-RABs admitted item as it is used in the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:75
uint16_t dlGbrPrbUsage
DL GBR PRB usage.
Definition: epc-x2-sap.h:203
EpcX2SpecificEpcX2SapUser.
Definition: epc-x2-sap.h:608
ErabsSubjectToStatusTransferItem structure.
Definition: epc-x2-sap.h:101
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:250
uint16_t erabId
E-RAB ID.
Definition: epc-x2-sap.h:77
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:233
uint16_t erabId
E-RAB ID.
Definition: epc-x2-sap.h:61
std::vector< CellMeasurementResultItem > cellMeasurementResultList
cell measurement result list
Definition: epc-x2-sap.h:319
virtual void RecvUeContextRelease(UeContextReleaseParams params)=0
Receive UE context release function.
Parameters of the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:228
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:295
virtual void SendResourceStatusUpdate(ResourceStatusUpdateParams params)
Send resource status update function.
Definition: epc-x2-sap.h:592
uint16_t cellCapacityClassValue
cell capacity class value
Definition: epc-x2-sap.h:184
virtual void RecvSnStatusTransfer(SnStatusTransferParams params)=0
Receive SN status transfer function.
virtual void RecvHandoverRequest(HandoverRequestParams params)=0
Receive handover request function.
virtual void SendHandoverPreparationFailure(HandoverPreparationFailureParams params)=0
Send handover preparation failure function.
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:249
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:292
std::vector< UlInterferenceOverloadIndicationItem > ulInterferenceOverloadIndicationList
UL interference overload indication list.
Definition: epc-x2-sap.h:159
virtual ~EpcX2SapUser()
Definition: epc-x2-sap.cc:39
Ipv4Address transportLayerAddress
transport layer address
Definition: epc-x2-sap.h:64
LoadIndicator dlHardwareLoadIndicator
DL hardware load indicator.
Definition: epc-x2-sap.h:197
virtual void SendHandoverRequest(HandoverRequestParams params)=0
Send handover request function.
uint64_t ueAggregateMaxBitRateUplink
UE aggregrate max bit rate uplink.
Definition: epc-x2-sap.h:236
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:293
uint16_t pdcchInterferenceImpact
PDC channel interference list.
Definition: epc-x2-sap.h:148
virtual void RecvSnStatusTransfer(SnStatusTransferParams params)
Receive SN status transfer function.
Definition: epc-x2-sap.h:709
CompositeAvailCapacity dlCompositeAvailableCapacity
DL composite available capacity.
Definition: epc-x2-sap.h:210
virtual void SendUeContextRelease(UeContextReleaseParams params)
Send UE context release function.
Definition: epc-x2-sap.h:578
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:254
LoadIndicator ulS1TnlLoadIndicator
UL S1 TNL load indicator.
Definition: epc-x2-sap.h:201
virtual void SendSnStatusTransfer(SnStatusTransferParams params)
Send SN status transfer function.
Definition: epc-x2-sap.h:571
virtual void RecvHandoverRequest(HandoverRequestParams params)
Receive handover request function.
Definition: epc-x2-sap.h:688
virtual void RecvHandoverPreparationFailure(HandoverPreparationFailureParams params)
Receive handover preparation failure function.
Definition: epc-x2-sap.h:702
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
virtual void SendUeContextRelease(UeContextReleaseParams params)=0
Send UE context release function.
virtual void SendHandoverRequest(HandoverRequestParams params)
Send handover request function.
Definition: epc-x2-sap.h:550
uint16_t ulTotalPrbUsage
UL Total PRB usage.
Definition: epc-x2-sap.h:208
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:248
uint64_t ueAggregateMaxBitRateDownlink
UE aggregrate max bit rate downlink.
Definition: epc-x2-sap.h:235
virtual void RecvLoadInformation(LoadInformationParams params)
Receive load information function.
Definition: epc-x2-sap.h:723
UlInterferenceOverloadIndicationItem
UL Interference OverloadIndication as it is used in the LOAD INFORMATION message. ...
Definition: epc-x2-sap.h:116
virtual void SendLoadInformation(LoadInformationParams params)=0
Send load information function.
LoadIndicator ulHardwareLoadIndicator
UL hardware load indicator.
Definition: epc-x2-sap.h:198
Parameters of the HANDOVER PREPARATION FAILURE message.
Definition: epc-x2-sap.h:262
virtual ~EpcX2Sap()
Definition: epc-x2-sap.cc:26
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:305
uint32_t dlGtpTeid
downlink GTP TEID
Definition: epc-x2-sap.h:79
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
uint16_t enb2MeasurementId
ENB2 measurement ID.
Definition: epc-x2-sap.h:318
std::vector< ErabAdmittedItem > admittedBearers
admitted bearers
Definition: epc-x2-sap.h:252
std::vector< CellInformationItem > cellInformationList
cell information list
Definition: epc-x2-sap.h:306
Parameters of the SN STATUS TRANSFER message.
Definition: epc-x2-sap.h:276
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:264
std::vector< UlHighInterferenceInformationItem > ulHighInterferenceInformationList
UL high interference information list.
Definition: epc-x2-sap.h:160
virtual void RecvHandoverPreparationFailure(HandoverPreparationFailureParams params)=0
Receive handover preparation failure function.
virtual void SendUeData(UeDataParams params)
Send UE data function.
Definition: epc-x2-sap.h:599
virtual void RecvHandoverRequestAck(HandoverRequestAckParams params)
Receive handover request ack function.
Definition: epc-x2-sap.h:695
Ptr< Packet > rrcContext
RRC context.
Definition: epc-x2-sap.h:238
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:281
std::bitset< m_maxPdcpSn > receiveStatusOfUlPdcpSdus
receive status of UL PDCP SDUs
Definition: epc-x2-sap.h:104
E-RABs to be setup item as it is used in the HANDOVER REQUEST message.
Definition: epc-x2-sap.h:59
uint32_t gtpTeid
GTP TEID.
Definition: epc-x2-sap.h:332
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters of the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:314
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:278
virtual void SendHandoverRequestAck(HandoverRequestAckParams params)=0
Send handover request ack function.
virtual void RecvUeData(UeDataParams params)
Receive UE data function.
Definition: epc-x2-sap.h:737
virtual void SendResourceStatusUpdate(ResourceStatusUpdateParams params)=0
Send resource status update function.
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:251
uint16_t dlTotalPrbUsage
DL Total PRB usage.
Definition: epc-x2-sap.h:207
Parameters of the UE CONTEXT RELEASE message.
Definition: epc-x2-sap.h:290
EpsBearer erabLevelQosParameters
E-RAB level QOS parameters.
Definition: epc-x2-sap.h:62
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:294
E-RABs not admitted item as it is used in the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:87
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Definition: epc-x2-sap.h:246
std::vector< bool > ulHighInterferenceIndicationList
UL high interference indication list.
Definition: epc-x2-sap.h:131
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:406
virtual void RecvUeData(UeDataParams params)=0
Receive UE data function.
virtual void RecvResourceStatusUpdate(ResourceStatusUpdateParams params)
Receive resource status update function.
Definition: epc-x2-sap.h:730
std::vector< ErabToBeSetupItem > bearers
bearers
Definition: epc-x2-sap.h:237
uint32_t ulGtpTeid
uplink GTP TEID
Definition: epc-x2-sap.h:78
uint16_t oldEnbUeX2apId
old ENB UE X2 AP ID
Definition: epc-x2-sap.h:230
std::vector< bool > rntpPerPrbList
RNTP per prb list.
Definition: epc-x2-sap.h:144
LoadIndicator dlS1TnlLoadIndicator
DL S1 TNL load indicator.
Definition: epc-x2-sap.h:200
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:280
virtual void SendHandoverRequestAck(HandoverRequestAckParams params)
Send handover request ack function.
Definition: epc-x2-sap.h:557
uint16_t capacityValue
capacity value
Definition: epc-x2-sap.h:185
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
uint16_t enb1MeasurementId
ENB1 measurement ID.
Definition: epc-x2-sap.h:317
virtual ~EpcX2SapProvider()
Definition: epc-x2-sap.cc:35
uint16_t dlNonGbrPrbUsage
DL Non GBR PRB usage.
Definition: epc-x2-sap.h:205
std::vector< ErabNotAdmittedItem > notAdmittedBearers
not admitted bearers
Definition: epc-x2-sap.h:253
EpcX2SpecificEpcX2SapProvider.
Definition: epc-x2-sap.h:470
uint16_t newEnbUeX2apId
new ENB UE X2 AP ID
Definition: epc-x2-sap.h:279
virtual void SendHandoverPreparationFailure(HandoverPreparationFailureParams params)
Send handover preparation failure function.
Definition: epc-x2-sap.h:564
int16_t rntpThreshold
RNTP threshold.
Definition: epc-x2-sap.h:145
LoadIndicator
Load Indicator as it is used in the RESOURCE STATUS UPDATE message.
Definition: epc-x2-sap.h:169
IdCause
Cause ID enumeration.
Definition: epc-x2-sap.h:216
Cell Measurement Result Item as it is used in the RESOURCE STATUS UPDATE message. ...
Definition: epc-x2-sap.h:193
Parameters of the LOAD INFORMATION message.
Definition: epc-x2-sap.h:303
uint16_t criticalityDiagnostics
criticality diagnostics
Definition: epc-x2-sap.h:268
The X2 SAP defines the service between the X2 entity and the RRC entity.
Definition: epc-x2-sap.h:49
Cell Information Item as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:156
Composite Available Capacity as it is used in the RESOURCE STATUS UPDATE message. ...
Definition: epc-x2-sap.h:182
Ptr< Packet > ueData
UE data.
Definition: epc-x2-sap.h:333
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:158
Relative Narrowband Tx Power (RNTP) as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:142
bool dlForwarding
DL forwarding.
Definition: epc-x2-sap.h:63
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:331
virtual void RecvLoadInformation(LoadInformationParams params)=0
Receive load information function.
virtual void SendLoadInformation(LoadInformationParams params)
Send load information function.
Definition: epc-x2-sap.h:585
uint16_t targetCellId
target cell ID
Definition: epc-x2-sap.h:316
virtual void RecvHandoverRequestAck(HandoverRequestAckParams params)=0
Receive handover request ack function.
Parameters of the UE DATA primitive.
Definition: epc-x2-sap.h:328
std::vector< ErabsSubjectToStatusTransferItem > erabsSubjectToStatusTransferList
ERABs subject to status transfer list.
Definition: epc-x2-sap.h:282
UL High Interference Information as it is used in the LOAD INFORMATION message.
Definition: epc-x2-sap.h:128
virtual void SendUeData(UeDataParams params)=0
Send UE data function.
uint16_t sourceCellId
source cell ID
Definition: epc-x2-sap.h:232
uint16_t ulNonGbrPrbUsage
UL Non GBR PRB usage.
Definition: epc-x2-sap.h:206
virtual void SendSnStatusTransfer(SnStatusTransferParams params)=0
Send SN status transfer function.
virtual void RecvResourceStatusUpdate(ResourceStatusUpdateParams params)=0
Receive resource status update function.
CompositeAvailCapacity ulCompositeAvailableCapacity
UL composite available capacity.
Definition: epc-x2-sap.h:211
virtual void RecvUeContextRelease(UeContextReleaseParams params)
Receive UE context release function.
Definition: epc-x2-sap.h:716
uint16_t antennaPorts
antenna ports
Definition: epc-x2-sap.h:146