A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ss-record.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 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19 */
20
21#ifndef SS_RECORD_H
22#define SS_RECORD_H
23
24#include "service-flow.h"
25#include "wimax-connection.h"
26#include "wimax-net-device.h"
27#include "wimax-phy.h"
28
29#include "ns3/ipv4-address.h"
30#include "ns3/mac48-address.h"
31
32#include <ostream>
33#include <stdint.h>
34
35namespace ns3
36{
37
38class ServiceFlow;
39
40/**
41 * \ingroup wimax
42 * \brief This class is used by the base station to store some information related to subscriber
43 * station in the cell.
44 */
46{
47 public:
48 SSRecord();
49 /**
50 * Constructor
51 *
52 * \param macAddress MAC address
53 */
54 SSRecord(Mac48Address macAddress);
55 /**
56 * Constructor
57 *
58 * \param macAddress MAC address
59 * \param IPaddress IP address
60 */
61 SSRecord(Mac48Address macAddress, Ipv4Address IPaddress);
62 ~SSRecord();
63
64 /**
65 * Set basic CID
66 * \param basicCid the basic CID
67 */
68 void SetBasicCid(Cid basicCid);
69 /**
70 * Get basic CID
71 * \returns the basic CID
72 */
73 Cid GetBasicCid() const;
74
75 /**
76 * Set primary CID
77 * \param primaryCid priamry CID
78 */
79 void SetPrimaryCid(Cid primaryCid);
80 /**
81 * Get primary CID
82 * \returns the CID
83 */
84 Cid GetPrimaryCid() const;
85
86 /**
87 * Set MAC address
88 * \param macAddress the MAC address
89 */
90 void SetMacAddress(Mac48Address macAddress);
91 /**
92 * Get MAC address
93 * \returns the MAC address
94 */
96
97 /**
98 * Get ranging correction retries
99 * \returns the ranging correction retries
100 */
101 uint8_t GetRangingCorrectionRetries() const;
102 /// Reset ranging correction retries
104 /// Increment ranging correction retries
106 /**
107 * Get invited range retries
108 * \returns the invited range retries
109 */
110 uint8_t GetInvitedRangRetries() const;
111 /// Reset invited ranging retries
113 /// Increment invited ranging retries
115 /**
116 * Set modulation type
117 * \param modulationType the modulation type
118 */
119 void SetModulationType(WimaxPhy::ModulationType modulationType);
120 /**
121 * Get modulation type
122 * \returns the modulation type
123 */
125
126 /**
127 * Set ranging status
128 * \param rangingStatus the ranging status
129 */
131 /**
132 * Get ranging status
133 * \returns the ranging status
134 */
136
137 /// Enable poll for ranging function
139 /// Disable poll for ranging
141 /**
142 * Get poll for ranging
143 * \returns the poll for ranging flag
144 */
145 bool GetPollForRanging() const;
146
147 /**
148 * Check if service flows are allocated
149 * \returns true if service flows are allocated
150 */
151 bool GetAreServiceFlowsAllocated() const;
152
153 /**
154 * Set poll ME bit
155 * \param pollMeBit the poll me bit
156 */
157 void SetPollMeBit(bool pollMeBit);
158 /**
159 * Get poll ME bit
160 * \returns the poll me bit
161 */
162 bool GetPollMeBit() const;
163
164 /**
165 * Add service flow
166 * \param serviceFlow the service flow
167 */
168 void AddServiceFlow(ServiceFlow* serviceFlow);
169 /**
170 * Get service flows
171 * \param schedulingType the scheduling type
172 * \returns the service flow
173 */
174 std::vector<ServiceFlow*> GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const;
175 /**
176 * Check if at least one flow has scheduling type SF_TYPE_UGS
177 * \return true if at least one flow has scheduling type SF_TYPE_UGS
178 */
179 bool GetHasServiceFlowUgs() const;
180 /**
181 * Check if at least one flow has scheduling type SF_TYPE_RTPS
182 * \return true if at least one flow has scheduling type SF_TYPE_RTPS
183 */
184 bool GetHasServiceFlowRtps() const;
185 /**
186 * Check if at least one flow has scheduling type SF_TYPE_NRTPS
187 * \return true if at least one flow has scheduling type SF_TYPE_NRTPS
188 */
189 bool GetHasServiceFlowNrtps() const;
190 /**
191 * Check if at least one flow has scheduling type SF_TYPE_BE
192 * \return true if at least one flow has scheduling type SF_TYPE_BE
193 */
194 bool GetHasServiceFlowBe() const;
195
196 /**
197 * Set SF transaction ID
198 * \param sfTransactionId the SF transaction ID
199 */
200 void SetSfTransactionId(uint16_t sfTransactionId);
201 /**
202 * Get SF transaction ID
203 * \returns the SF transaction ID
204 */
205 uint16_t GetSfTransactionId() const;
206
207 /**
208 * Set DSA response retries
209 * \param dsaRspRetries the DSA response retries
210 */
211 void SetDsaRspRetries(uint8_t dsaRspRetries);
212 /// Increment DAS response retries
214 /**
215 * Get DSA response retries
216 * \returns the DSA response retries
217 */
218 uint8_t GetDsaRspRetries() const;
219
220 /**
221 * Set DSA response
222 * \param dsaRsp the DSA response
223 */
224 void SetDsaRsp(DsaRsp dsaRsp);
225 /**
226 * Get DSA response
227 * \returns the DSA response
228 */
229 DsaRsp GetDsaRsp() const;
230 /**
231 * Set is broadcast SS
232 * \param broadcast_enable the broadcast enable flag
233 */
234 void SetIsBroadcastSS(bool broadcast_enable);
235 /**
236 * Get is broadcast SS
237 * \returns the is broadcast SS flag
238 */
239 bool GetIsBroadcastSS() const;
240
241 /**
242 * Get IP address
243 * \returns the IP address
244 */
246 /**
247 * Set IP address
248 * \param IPaddress the IP address
249 */
250 void SetIPAddress(Ipv4Address IPaddress);
251 /**
252 * Set are service flows allocated
253 * \param val the service flows allocated flag
254 */
255 void SetAreServiceFlowsAllocated(bool val);
256
257 private:
258 /// Initialize
259 void Initialize();
260
261 Mac48Address m_macAddress; ///< MAC address
262 Ipv4Address m_IPAddress; ///< IP address
263
264 Cid m_basicCid; ///< basic CID
265 Cid m_primaryCid; ///< primary CID
266
267 uint8_t m_rangingCorrectionRetries; ///< ranging correction retries
268 uint8_t m_invitedRangingRetries; ///< invited ranging retries
269
271 m_modulationType; ///< least robust burst profile (modulation type) for this SS
273 bool m_pollForRanging; ///< poll for ranging
274 bool m_areServiceFlowsAllocated; ///< are service floes allowed
275 bool m_pollMeBit; ///< if PM (poll me) bit set for this SS
276 bool m_broadcast; ///< broadcast?
277
278 std::vector<ServiceFlow*>* m_serviceFlows; ///< service flows
279
280 // fields for service flow creation
281 uint16_t m_sfTransactionId; ///< SF transaction ID
282 uint8_t m_dsaRspRetries; ///< DAS response retries
283 DsaRsp m_dsaRsp; ///< DSA response
284};
285
286} // namespace ns3
287
288#endif /* SS_RECORD_H */
Cid class.
Definition: cid.h:37
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:490
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
an EUI-48 address
Definition: mac48-address.h:46
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:46
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set modulation type.
Definition: ss-record.cc:161
bool GetHasServiceFlowUgs() const
Check if at least one flow has scheduling type SF_TYPE_UGS.
Definition: ss-record.cc:260
Cid GetBasicCid() const
Get basic CID.
Definition: ss-record.cc:95
WimaxNetDevice::RangingStatus GetRangingStatus() const
Get ranging status.
Definition: ss-record.cc:179
void SetMacAddress(Mac48Address macAddress)
Set MAC address.
Definition: ss-record.cc:113
WimaxNetDevice::RangingStatus m_rangingStatus
ranging status
Definition: ss-record.h:272
void SetDsaRspRetries(uint8_t dsaRspRetries)
Set DSA response retries.
Definition: ss-record.cc:324
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow.
Definition: ss-record.cc:227
Ipv4Address m_IPAddress
IP address.
Definition: ss-record.h:262
void SetRangingStatus(WimaxNetDevice::RangingStatus rangingStatus)
Set ranging status.
Definition: ss-record.cc:173
void SetPollMeBit(bool pollMeBit)
Set poll ME bit.
Definition: ss-record.cc:215
uint8_t GetInvitedRangRetries() const
Get invited range retries.
Definition: ss-record.cc:143
Mac48Address m_macAddress
MAC address.
Definition: ss-record.h:261
void IncrementRangingCorrectionRetries()
Increment ranging correction retries.
Definition: ss-record.cc:137
void IncrementDsaRspRetries()
Increment DAS response retries.
Definition: ss-record.cc:330
bool GetPollForRanging() const
Get poll for ranging.
Definition: ss-record.cc:197
DsaRsp GetDsaRsp() const
Get DSA response.
Definition: ss-record.cc:348
uint16_t GetSfTransactionId() const
Get SF transaction ID.
Definition: ss-record.cc:318
void SetDsaRsp(DsaRsp dsaRsp)
Set DSA response.
Definition: ss-record.cc:342
Cid m_basicCid
basic CID
Definition: ss-record.h:264
uint8_t GetRangingCorrectionRetries() const
Get ranging correction retries.
Definition: ss-record.cc:125
void SetIsBroadcastSS(bool broadcast_enable)
Set is broadcast SS.
Definition: ss-record.cc:248
void Initialize()
Initialize.
Definition: ss-record.cc:49
bool GetHasServiceFlowRtps() const
Check if at least one flow has scheduling type SF_TYPE_RTPS.
Definition: ss-record.cc:273
void EnablePollForRanging()
Enable poll for ranging function.
Definition: ss-record.cc:185
void ResetRangingCorrectionRetries()
Reset ranging correction retries.
Definition: ss-record.cc:131
void ResetInvitedRangingRetries()
Reset invited ranging retries.
Definition: ss-record.cc:149
void SetPrimaryCid(Cid primaryCid)
Set primary CID.
Definition: ss-record.cc:101
void SetBasicCid(Cid basicCid)
Set basic CID.
Definition: ss-record.cc:89
uint8_t m_dsaRspRetries
DAS response retries.
Definition: ss-record.h:282
void DisablePollForRanging()
Disable poll for ranging.
Definition: ss-record.cc:191
uint8_t GetDsaRspRetries() const
Get DSA response retries.
Definition: ss-record.cc:336
bool GetPollMeBit() const
Get poll ME bit.
Definition: ss-record.cc:221
bool m_pollForRanging
poll for ranging
Definition: ss-record.h:273
std::vector< ServiceFlow * > * m_serviceFlows
service flows
Definition: ss-record.h:278
bool m_broadcast
broadcast?
Definition: ss-record.h:276
bool m_pollMeBit
if PM (poll me) bit set for this SS
Definition: ss-record.h:275
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Get service flows.
Definition: ss-record.cc:233
uint8_t m_invitedRangingRetries
invited ranging retries
Definition: ss-record.h:268
WimaxPhy::ModulationType m_modulationType
least robust burst profile (modulation type) for this SS
Definition: ss-record.h:271
void SetIPAddress(Ipv4Address IPaddress)
Set IP address.
Definition: ss-record.cc:77
bool GetAreServiceFlowsAllocated() const
Check if service flows are allocated.
Definition: ss-record.cc:209
Cid m_primaryCid
primary CID
Definition: ss-record.h:265
Mac48Address GetMacAddress() const
Get MAC address.
Definition: ss-record.cc:119
void SetAreServiceFlowsAllocated(bool val)
Set are service flows allocated.
Definition: ss-record.cc:203
bool GetIsBroadcastSS() const
Get is broadcast SS.
Definition: ss-record.cc:254
Ipv4Address GetIPAddress()
Get IP address.
Definition: ss-record.cc:83
bool m_areServiceFlowsAllocated
are service floes allowed
Definition: ss-record.h:274
WimaxPhy::ModulationType GetModulationType() const
Get modulation type.
Definition: ss-record.cc:167
void SetSfTransactionId(uint16_t sfTransactionId)
Set SF transaction ID.
Definition: ss-record.cc:312
bool GetHasServiceFlowNrtps() const
Check if at least one flow has scheduling type SF_TYPE_NRTPS.
Definition: ss-record.cc:286
void IncrementInvitedRangingRetries()
Increment invited ranging retries.
Definition: ss-record.cc:155
Cid GetPrimaryCid() const
Get primary CID.
Definition: ss-record.cc:107
uint16_t m_sfTransactionId
SF transaction ID.
Definition: ss-record.h:281
bool GetHasServiceFlowBe() const
Check if at least one flow has scheduling type SF_TYPE_BE.
Definition: ss-record.cc:299
uint8_t m_rangingCorrectionRetries
ranging correction retries
Definition: ss-record.h:267
DsaRsp m_dsaRsp
DSA response.
Definition: ss-record.h:283
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:62
RangingStatus
RangingStatus enumeration.
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:54
Every class exported by the ns3 library is enclosed in the ns3 namespace.