A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
34
namespace
ns3 {
35
41
class
SSLinkManager
:
public
Object
42
{
43
public
:
44
static
TypeId
GetTypeId
(
void
);
45
SSLinkManager
(
Ptr<SubscriberStationNetDevice>
ss);
46
~SSLinkManager
(
void
);
47
void
DoDispose
(
void
);
48
49
void
SetBsEirp
(uint16_t bs_eirp);
50
void
SetEirXPIrMax
(uint16_t eir_x_p_ir_max);
51
void
SetRangingIntervalFound
(
bool
rangingIntervalFound);
52
bool
GetRangingIntervalFound
(
void
)
const
;
53
void
SetNrRangingTransOpps
(uint8_t nrRangingTransOpps);
54
void
SetRangingCW
(uint8_t rangingCW);
55
void
IncrementNrInvitedPollsRecvd
(
void
);
56
EventId
GetDlMapSyncTimeoutEvent
(
void
);
57
58
void
PerformRanging
(
Cid
cid,
RngRsp
rngrsp);
59
void
StartScanning
(
SubscriberStationNetDevice::EventType
type,
60
bool
deleteParameters);
61
void
SendRangingRequest
(uint8_t uiuc, uint16_t allocationSize);
62
void
StartContentionResolution
(
void
);
63
void
PerformBackoff
(
void
);
64
bool
IsUlChannelUsable
(
void
);
65
void
ScheduleScanningRestart
(
Time
interval,
66
SubscriberStationNetDevice::EventType
eventType,
67
bool
deleteUlParameters,
EventId
&eventId);
68
private
:
69
SSLinkManager
(
const
SSLinkManager
&);
70
SSLinkManager
&
operator=
(
const
SSLinkManager
&);
71
72
void
EndScanning
(
bool
status, uint64_t frequency);
73
void
StartSynchronizing
(
void
);
74
bool
SearchForDlChannel
(uint8_t channel);
75
void
SelectRandomBackoff
(
void
);
76
void
IncreaseRangingRequestCW
(
void
);
77
void
ResetRangingRequestCW
(
void
);
78
void
DeleteUplinkParameters
(
void
);
79
void
AdjustRangingParameters
(
const
RngRsp
&rngrsp);
80
void
NegotiateBasicCapabilities
(
void
);
81
uint16_t
CalculateMaxIRSignalStrength
(
void
);
82
uint16_t
GetMinTransmitPowerLevel
(
void
);
83
84
Ptr<SubscriberStationNetDevice>
m_ss
;
85
86
WimaxNetDevice::RangingStatus
m_rangingStatus
;
87
// initial ranging parameters obtained from DCD (in channel encodings)
88
uint16_t
m_bsEirp
;
89
uint16_t
m_eirXPIrMax
;
// initial ranging maximum equivalent isotropic received power at BS
90
uint16_t
m_pTxIrMax
;
// maximum transmit signal strength for initial ranging calculated by SS
91
92
uint8_t
m_initRangOppNumber
;
// Initial Ranging opportunity (1–255) in which SS transmitted the RNG_REQ
93
uint8_t
m_contentionRangingRetries
;
94
uint32_t
m_rngReqFrameNumber
;
// frame number in which SS sent RNG_REQ message
95
RngReq
m_rngreq
;
96
97
uint8_t
m_dlChnlNr
;
// indicates the channel/frequency currently the SS is scanning
98
uint64_t
m_frequency
;
// frequency on which it is currently operating, i.e., where scanning was successful
99
bool
m_rangingIntervalFound
;
100
101
// stats members
102
uint16_t
m_nrRngReqsSent
;
103
uint16_t
m_nrRngRspsRecvd
;
104
uint16_t
m_nrInvitedPollsRecvd
;
105
106
uint8_t
m_rangingCW
;
107
uint8_t
m_rangingBO
;
108
uint8_t
m_nrRangingTransOpps
;
109
bool
m_isBackoffSet
;
110
uint8_t
m_rangingAnomalies
;
111
112
EventId
m_waitForRngRspEvent
,
m_dlMapSyncTimeoutEvent
;
113
};
114
115
}
// namespace ns3
116
117
#endif
/* LINK_MANAGER_H */
src
wimax
model
ss-link-manager.h
Generated on Tue May 14 2013 11:08:37 for ns-3 by
1.8.1.2