A Discrete-Event Network Simulator
API
bs-link-manager.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007,2008,2009 INRIA, UDcast
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  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19  * <amine.ismail@UDcast.com>
20  */
21 
22 #ifndef LINK_MANAGER_H
23 #define LINK_MANAGER_H
24 
25 #include "bs-net-device.h"
26 #include "cid.h"
27 #include "mac-messages.h"
28 #include "wimax-net-device.h"
29 
30 #include "ns3/event-id.h"
31 
32 #include <stdint.h>
33 
34 namespace ns3
35 {
36 
42 class BSLinkManager : public Object
43 {
44  public:
49  static TypeId GetTypeId();
56  ~BSLinkManager() override;
57 
58  // Delete copy constructor and assignment operator to avoid misuse
59  BSLinkManager(const BSLinkManager&) = delete;
61 
69  uint64_t SelectDlChannel();
76  void ProcessRangingRequest(Cid cid, RngReq rngreq);
83  void VerifyInvitedRanging(Cid cid, uint8_t uiuc);
84 
85  private:
91  void PerformRanging(Cid cid, RngReq rngreq);
98  void PerformInitialRanging(Cid cid, RngReq* rngreq, RngRsp* rngrsp);
104  void PerformInvitedRanging(Cid cid, RngRsp* rngrsp);
105 
110  void SetParametersToAdjust(RngRsp* rngrsp);
118  void AbortRanging(Cid cid, RngRsp* rngrsp, SSRecord* ssRecord, bool isNewSS);
125  void AcceptRanging(Cid cid, RngRsp* rngrsp, SSRecord* ssRecord);
132  void ContinueRanging(Cid cid, RngRsp* rngrsp, SSRecord* ssRecord);
138  void ScheduleRngRspMessage(Cid cid, RngRsp* rngrsp);
143  void DeallocateCids(Cid cid);
144 
149  bool ChangeDlChannel();
154  uint32_t GetNewDlChannel();
159  uint8_t GetSignalQuality();
164  bool IsRangingAcceptable();
165 
167 
168  // ranging parameters
169  uint32_t m_signalQuality;
171  int tries;
173 };
174 
175 } // namespace ns3
176 
177 #endif /* LINK_MANAGER_H */
Cid class.
Definition: cid.h:37
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...
Definition: mac-messages.h:664
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Definition: mac-messages.h:125
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:46
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.