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 
38 class BSLinkManager : public Object
39 {
40 public:
45  static TypeId GetTypeId (void);
52  ~BSLinkManager (void);
56  uint8_t CalculateRangingOppsToAllocate (void);
60  uint64_t SelectDlChannel (void);
67  void ProcessRangingRequest (Cid cid, RngReq rngreq);
73  void VerifyInvitedRanging (Cid cid, uint8_t uiuc);
74 private:
76  BSLinkManager (const BSLinkManager &);
82 
88  void PerformRanging (Cid cid, RngReq rngreq);
95  void PerformInitialRanging (Cid cid, RngReq *rngreq, RngRsp *rngrsp);
101  void PerformInvitedRanging (Cid cid, RngRsp *rngrsp);
102 
107  void SetParametersToAdjust (RngRsp *rngrsp);
115  void AbortRanging (Cid cid, RngRsp *rngrsp, SSRecord *ssRecord, bool isNewSS);
122  void AcceptRanging (Cid cid, RngRsp *rngrsp, SSRecord *ssRecord);
129  void ContinueRanging (Cid cid, RngRsp *rngrsp, SSRecord *ssRecord);
135  void ScheduleRngRspMessage (Cid cid, RngRsp *rngrsp);
140  void DeallocateCids (Cid cid);
141 
146  bool ChangeDlChannel (void);
151  uint32_t GetNewDlChannel (void);
156  uint8_t GetSignalQuality (void);
161  bool IsRangingAcceptable (void);
162 
164 
165  // ranging parameters
166  uint32_t m_signalQuality;
168  int tries;
169 };
170 
171 } // namespace ns3
172 
173 #endif /* LINK_MANAGER_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Definition: mac-messages.h:121
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...
Definition: mac-messages.h:642
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Cid class.
Definition: cid.h:37
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:43
A base class which provides memory management and object aggregation.
Definition: object.h:87
a unique identifier for an interface.
Definition: type-id.h:58