satellite-ut-handover-module.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2018 CNES
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: Mathias Ettinger <mettinger@toulouse.viveris.fr>
19  */
20 
21 #ifndef SATELLITE_UT_HANDOVER_MODULE_H
22 #define SATELLITE_UT_HANDOVER_MODULE_H
23 
25 
26 #include <ns3/callback.h>
27 #include <ns3/nstime.h>
28 #include <ns3/object.h>
29 #include <ns3/ptr.h>
30 
31 namespace ns3
32 {
33 
38 class SatUtHandoverModule : public Object
39 {
40  public:
45  typedef Callback<void, uint32_t> HandoverRequestCallback;
46 
50  static TypeId GetTypeId(void);
51 
55  virtual TypeId GetInstanceTypeId(void) const;
56 
60  virtual void DoDispose();
61 
66 
71  SatUtHandoverModule(Ptr<SatAntennaGainPatternContainer> agpContainer);
72 
77 
83 
88  uint32_t GetAskedBeamId();
89 
97  bool CheckForHandoverRecommendation(uint32_t satId, uint32_t beamId);
98 
99  private:
101 
102  Ptr<SatAntennaGainPatternContainer> m_antennaGainPatterns;
103 
107  uint32_t m_askedBeamId;
108 
109  TracedCallback<double> m_antennaGainTrace;
110 };
111 
112 } // namespace ns3
113 
114 #endif /* SATELLITE_UT_HANDOVER_MODULE_H */
Callback< void, uint32_t > HandoverRequestCallback
Handover recommendation message sending callback.
void SetHandoverRequestCallback(SatUtHandoverModule::HandoverRequestCallback cb)
Set the handover recommendation message sending callback.
~SatUtHandoverModule()
Destroy a SatUtHandoverModule.
bool CheckForHandoverRecommendation(uint32_t satId, uint32_t beamId)
Inspect whether or not the given beam is still suitable for the underlying mobility model.
virtual void DoDispose()
Dispose of this class instance.
SatUtHandoverModule()
Default constructor, which is not used.
HandoverRequestCallback m_handoverCallback
Ptr< SatAntennaGainPatternContainer > m_antennaGainPatterns
uint32_t GetAskedBeamId()
Get the best beam ID.
static TypeId GetTypeId(void)
Derived from Object.
TracedCallback< double > m_antennaGainTrace
virtual TypeId GetInstanceTypeId(void) const
Derived from Object.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.