A Discrete-Event Network Simulator
API
bs-link-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007,2008,2009 INRIA, UDcast
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  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20  * <amine.ismail@UDcast.com>
21  */
22 
23 #ifndef LINK_MANAGER_H
24 #define LINK_MANAGER_H
25 
26 #include <stdint.h>
27 #include "wimax-net-device.h"
28 #include "bs-net-device.h"
29 #include "ns3/event-id.h"
30 #include "cid.h"
31 #include "mac-messages.h"
32 
33 namespace ns3 {
34 
40 class BSLinkManager : public Object
41 {
42 public:
47  static TypeId GetTypeId (void);
54  ~BSLinkManager (void);
58  uint8_t CalculateRangingOppsToAllocate (void);
62  uint64_t SelectDlChannel (void);
69  void ProcessRangingRequest (Cid cid, RngReq rngreq);
75  void VerifyInvitedRanging (Cid cid, uint8_t uiuc);
76 private:
84 
90  void PerformRanging (Cid cid, RngReq rngreq);
97  void PerformInitialRanging (Cid cid, RngReq *rngreq, RngRsp *rngrsp);
103  void PerformInvitedRanging (Cid cid, RngRsp *rngrsp);
104 
109  void SetParametersToAdjust (RngRsp *rngrsp);
117  void AbortRanging (Cid cid, RngRsp *rngrsp, SSRecord *ssRecord, bool isNewSS);
124  void AcceptRanging (Cid cid, RngRsp *rngrsp, SSRecord *ssRecord);
131  void ContinueRanging (Cid cid, RngRsp *rngrsp, SSRecord *ssRecord);
137  void ScheduleRngRspMessage (Cid cid, RngRsp *rngrsp);
142  void DeallocateCids (Cid cid);
143 
148  bool ChangeDlChannel (void);
153  uint32_t GetNewDlChannel (void);
158  uint8_t GetSignalQuality (void);
163  bool IsRangingAcceptable (void);
164 
166 
167  // ranging parameters
168  uint32_t m_signalQuality;
170  int tries;
171 };
172 
173 } // namespace ns3
174 
175 #endif /* LINK_MANAGER_H */
Cid class.
Definition: cid.h:38
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...
Definition: mac-messages.h:643
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Definition: mac-messages.h:122
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:44
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.