A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ss-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 "cid.h"
26#include "mac-messages.h"
27#include "ss-net-device.h"
28#include "wimax-net-device.h"
29
30#include "ns3/event-id.h"
31#include "ns3/nstime.h"
32
33#include <stdint.h>
34
35namespace ns3
36{
37
43class SSLinkManager : public Object
44{
45 public:
50 static TypeId GetTypeId();
57 ~SSLinkManager() override;
58 void DoDispose() override;
59
64 void SetBsEirp(uint16_t bs_eirp);
69 void SetEirXPIrMax(uint16_t eir_x_p_ir_max);
74 void SetRangingIntervalFound(bool rangingIntervalFound);
79 bool GetRangingIntervalFound() const;
84 void SetNrRangingTransOpps(uint8_t nrRangingTransOpps);
89 void SetRangingCW(uint8_t rangingCW);
97
103 void PerformRanging(Cid cid, RngRsp rngrsp);
109 void StartScanning(SubscriberStationNetDevice::EventType type, bool deleteParameters);
115 void SendRangingRequest(uint8_t uiuc, uint16_t allocationSize);
119 void PerformBackoff();
124 bool IsUlChannelUsable();
132 void ScheduleScanningRestart(Time interval,
134 bool deleteUlParameters,
135 EventId& eventId);
136
137 private:
145
151 void EndScanning(bool status, uint64_t frequency);
153 void StartSynchronizing();
159 bool SearchForDlChannel(uint8_t channel);
161 void SelectRandomBackoff();
172 void AdjustRangingParameters(const RngRsp& rngrsp);
184 uint16_t GetMinTransmitPowerLevel();
185
187
189 // initial ranging parameters obtained from DCD (in channel encodings)
190 uint16_t m_bsEirp;
191 uint16_t m_eirXPIrMax;
192 uint16_t m_pTxIrMax;
193
199
200 uint8_t m_dlChnlNr;
201 uint64_t m_frequency;
204
205 // stats members
209
210 uint8_t m_rangingCW;
211 uint8_t m_rangingBO;
215
218};
219
220} // namespace ns3
221
222#endif /* LINK_MANAGER_H */
Cid class.
Definition: cid.h:37
An identifier for simulation events.
Definition: event-id.h:55
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:78
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
EventType
EventType enumeration.
Definition: ss-net-device.h:70
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
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.