A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-handover-algorithm.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013 Budiarto Herman
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Budiarto Herman <budiarto.herman@magister.fi>
7 *
8 */
9
10#ifndef LTE_HANDOVER_ALGORITHM_H
11#define LTE_HANDOVER_ALGORITHM_H
12
13#include "lte-rrc-sap.h"
14
15#include <ns3/object.h>
16
17namespace ns3
18{
19
20class LteHandoverManagementSapUser;
21class LteHandoverManagementSapProvider;
22
23/**
24 * \brief The abstract base class of a handover algorithm that operates using
25 * the Handover Management SAP interface.
26 *
27 * Handover algorithm receives measurement reports from an eNodeB RRC instance
28 * and tells the eNodeB RRC instance when to do a handover.
29 *
30 * This class is an abstract class intended to be inherited by subclasses that
31 * implement its virtual methods. By inheriting from this abstract class, the
32 * subclasses gain the benefits of being compatible with the LteEnbNetDevice
33 * class, being accessible using namespace-based access through ns-3 Config
34 * subsystem, and being installed and configured by LteHelper class (see
35 * LteHelper::SetHandoverAlgorithmType and
36 * LteHelper::SetHandoverAlgorithmAttribute methods).
37 *
38 * The communication with the eNodeB RRC instance is done through the *Handover
39 * Management SAP* interface. The handover algorithm instance corresponds to the
40 * "provider" part of this interface, while the eNodeB RRC instance takes the
41 * role of the "user" part. The following code skeleton establishes the
42 * connection between both instances:
43 *
44 * Ptr<LteEnbRrc> u = ...;
45 * Ptr<LteHandoverAlgorithm> p = ...;
46 * u->SetLteHandoverManagementSapProvider (p->GetLteHandoverManagementSapProvider ());
47 * p->SetLteHandoverManagementSapUser (u->GetLteHandoverManagementSapUser ());
48 *
49 * However, user rarely needs to use the above code, since it has already been
50 * taken care by LteHelper::InstallEnbDevice.
51 *
52 * \sa LteHandoverManagementSapProvider, LteHandoverManagementSapUser
53 */
55{
56 public:
58 ~LteHandoverAlgorithm() override;
59
60 /**
61 * \brief Get the type ID.
62 * \return the object TypeId
63 */
64 static TypeId GetTypeId();
65
66 /**
67 * \brief Set the "user" part of the Handover Management SAP interface that
68 * this handover algorithm instance will interact with.
69 * \param s a reference to the "user" part of the interface, typically a
70 * member of an LteEnbRrc instance
71 */
73
74 /**
75 * \brief Export the "provider" part of the Handover Management SAP interface.
76 * \return the reference to the "provider" part of the interface, typically to
77 * be kept by an LteEnbRrc instance
78 */
80
81 protected:
82 // inherited from Object
83 void DoDispose() override;
84
85 // HANDOVER MANAGEMENT SAP PROVIDER IMPLEMENTATION
86
87 /**
88 * \brief Implementation of LteHandoverManagementSapProvider::ReportUeMeas.
89 * \param rnti Radio Network Temporary Identity, an integer identifying the UE
90 * where the report originates from
91 * \param measResults a single report of one measurement identity
92 */
93 virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults) = 0;
94
95}; // end of class LteHandoverAlgorithm
96
97} // end of namespace ns3
98
99#endif /* LTE_HANDOVER_ALGORITHM_H */
The abstract base class of a handover algorithm that operates using the Handover Management SAP inter...
virtual void SetLteHandoverManagementSapUser(LteHandoverManagementSapUser *s)=0
Set the "user" part of the Handover Management SAP interface that this handover algorithm instance wi...
void DoDispose() override
Destructor implementation.
virtual void DoReportUeMeas(uint16_t rnti, LteRrcSap::MeasResults measResults)=0
Implementation of LteHandoverManagementSapProvider::ReportUeMeas.
static TypeId GetTypeId()
Get the type ID.
virtual LteHandoverManagementSapProvider * GetLteHandoverManagementSapProvider()=0
Export the "provider" part of the Handover Management SAP interface.
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance.
Service Access Point (SAP) offered by the eNodeB RRC instance to the handover algorithm instance.
A base class which provides memory management and object aggregation.
Definition object.h:78
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
MeasResults structure.