A Discrete-Event Network Simulator
API
ss-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 "ss-net-device.h"
29#include "ns3/event-id.h"
30#include "cid.h"
31#include "mac-messages.h"
32#include "ns3/nstime.h"
33
34namespace ns3 {
35
41class SSLinkManager : public Object
42{
43public:
48 static TypeId GetTypeId (void);
55 ~SSLinkManager (void);
56 void DoDispose (void);
57
62 void SetBsEirp (uint16_t bs_eirp);
67 void SetEirXPIrMax (uint16_t eir_x_p_ir_max);
72 void SetRangingIntervalFound (bool rangingIntervalFound);
77 bool GetRangingIntervalFound (void) const;
82 void SetNrRangingTransOpps (uint8_t nrRangingTransOpps);
87 void SetRangingCW (uint8_t rangingCW);
95
101 void PerformRanging (Cid cid, RngRsp rngrsp);
108 bool deleteParameters);
114 void SendRangingRequest (uint8_t uiuc, uint16_t allocationSize);
116 void StartContentionResolution (void);
118 void PerformBackoff (void);
123 bool IsUlChannelUsable (void);
131 void ScheduleScanningRestart (Time interval,
133 bool deleteUlParameters, EventId &eventId);
134private:
142
148 void EndScanning (bool status, uint64_t frequency);
150 void StartSynchronizing (void);
158 void SelectRandomBackoff (void);
160 void IncreaseRangingRequestCW (void);
162 void ResetRangingRequestCW (void);
164 void DeleteUplinkParameters (void);
169 void AdjustRangingParameters (const RngRsp &rngrsp);
171 void NegotiateBasicCapabilities (void);
176 uint16_t CalculateMaxIRSignalStrength (void);
181 uint16_t GetMinTransmitPowerLevel (void);
182
184
186 // initial ranging parameters obtained from DCD (in channel encodings)
187 uint16_t m_bsEirp;
188 uint16_t m_eirXPIrMax;
189 uint16_t m_pTxIrMax;
190
195
196 uint8_t m_dlChnlNr;
197 uint64_t m_frequency;
199
200 // stats members
204
205 uint8_t m_rangingCW;
206 uint8_t m_rangingBO;
210
213};
214
215} // namespace ns3
216
217#endif /* LINK_MANAGER_H */
Cid class.
Definition: cid.h:38
An identifier for simulation events.
Definition: event-id.h:54
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
EventType
EventType enumeration.
Definition: ss-net-device.h:69
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
a unique identifier for an interface.
Definition: type-id.h:59
RangingStatus
RangingStatus enumeration.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
channel
Definition: third.py:83