A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ss-record.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008, 2009 INRIA, UDcast
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
8 */
9
10#include "ss-record.h"
11
12#include "service-flow.h"
13
14#include <stdint.h>
15
16namespace ns3
17{
18
23
25{
26 m_macAddress = macAddress;
27 Initialize();
28}
29
31{
32 m_macAddress = macAddress;
33 m_IPAddress = IPaddress;
34 Initialize();
35}
36
37void
58
60{
61 delete m_serviceFlows;
62 m_serviceFlows = nullptr;
63}
64
65void
67{
68 m_IPAddress = IPAddress;
69}
70
76
77void
79{
80 m_basicCid = basicCid;
81}
82
83Cid
85{
86 return m_basicCid;
87}
88
89void
91{
92 m_primaryCid = primaryCid;
93}
94
95Cid
97{
98 return m_primaryCid;
99}
100
101void
103{
104 m_macAddress = macAddress;
105}
106
109{
110 return m_macAddress;
111}
112
113uint8_t
118
119void
124
125void
130
131uint8_t
136
137void
142
143void
148
149void
151{
152 m_modulationType = modulationType;
153}
154
157{
158 return m_modulationType;
159}
160
161void
166
169{
170 return m_rangingStatus;
171}
172
173void
178
179void
184
185bool
187{
188 return m_pollForRanging;
189}
190
191void
196
197bool
202
203void
205{
206 m_pollMeBit = pollMeBit;
207}
208
209bool
211{
212 return m_pollMeBit;
213}
214
215void
217{
218 m_serviceFlows->push_back(serviceFlow);
219}
220
221std::vector<ServiceFlow*>
223{
224 std::vector<ServiceFlow*> tmpServiceFlows;
225 for (auto iter = m_serviceFlows->begin(); iter != m_serviceFlows->end(); ++iter)
226 {
227 if (((*iter)->GetSchedulingType() == schedulingType) ||
228 (schedulingType == ServiceFlow::SF_TYPE_ALL))
229 {
230 tmpServiceFlows.push_back(*iter);
231 }
232 }
233 return tmpServiceFlows;
234}
235
236void
237SSRecord::SetIsBroadcastSS(bool broadcast_enable)
238{
239 m_broadcast = broadcast_enable;
240}
241
242bool
244{
245 return m_broadcast;
246}
247
248bool
250{
251 for (auto iter = m_serviceFlows->begin(); iter != m_serviceFlows->end(); ++iter)
252 {
253 if ((*iter)->GetSchedulingType() == ServiceFlow::SF_TYPE_UGS)
254 {
255 return true;
256 }
257 }
258 return false;
259}
260
261bool
263{
264 for (auto iter = m_serviceFlows->begin(); iter != m_serviceFlows->end(); ++iter)
265 {
266 if ((*iter)->GetSchedulingType() == ServiceFlow::SF_TYPE_RTPS)
267 {
268 return true;
269 }
270 }
271 return false;
272}
273
274bool
276{
277 for (auto iter = m_serviceFlows->begin(); iter != m_serviceFlows->end(); ++iter)
278 {
279 if ((*iter)->GetSchedulingType() == ServiceFlow::SF_TYPE_NRTPS)
280 {
281 return true;
282 }
283 }
284 return false;
285}
286
287bool
289{
290 for (auto iter = m_serviceFlows->begin(); iter != m_serviceFlows->end(); ++iter)
291 {
292 if ((*iter)->GetSchedulingType() == ServiceFlow::SF_TYPE_BE)
293 {
294 return true;
295 }
296 }
297 return false;
298}
299
300void
301SSRecord::SetSfTransactionId(uint16_t sfTransactionId)
302{
303 m_sfTransactionId = sfTransactionId;
304}
305
306uint16_t
311
312void
313SSRecord::SetDsaRspRetries(uint8_t dsaRspRetries)
314{
315 m_dsaRspRetries = dsaRspRetries;
316}
317
318void
323
324uint8_t
326{
327 return m_dsaRspRetries;
328}
329
330void
332{
333 m_dsaRsp = dsaRsp;
334}
335
336DsaRsp
338{
339 return m_dsaRsp;
340}
341
342} // namespace ns3
Cid class.
Definition cid.h:26
This class implements the DSA-RSP message described by "IEEE Standard forLocal and metropolitan area ...
Ipv4 addresses are stored in host order in this class.
an EUI-48 address
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set modulation type.
Definition ss-record.cc:150
bool GetHasServiceFlowUgs() const
Check if at least one flow has scheduling type SF_TYPE_UGS.
Definition ss-record.cc:249
Cid GetBasicCid() const
Get basic CID.
Definition ss-record.cc:84
WimaxNetDevice::RangingStatus GetRangingStatus() const
Get ranging status.
Definition ss-record.cc:168
void SetMacAddress(Mac48Address macAddress)
Set MAC address.
Definition ss-record.cc:102
WimaxNetDevice::RangingStatus m_rangingStatus
ranging status
Definition ss-record.h:261
void SetDsaRspRetries(uint8_t dsaRspRetries)
Set DSA response retries.
Definition ss-record.cc:313
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow.
Definition ss-record.cc:216
Ipv4Address m_IPAddress
IP address.
Definition ss-record.h:251
void SetRangingStatus(WimaxNetDevice::RangingStatus rangingStatus)
Set ranging status.
Definition ss-record.cc:162
void SetPollMeBit(bool pollMeBit)
Set poll ME bit.
Definition ss-record.cc:204
uint8_t GetInvitedRangRetries() const
Get invited range retries.
Definition ss-record.cc:132
Mac48Address m_macAddress
MAC address.
Definition ss-record.h:250
void IncrementRangingCorrectionRetries()
Increment ranging correction retries.
Definition ss-record.cc:126
void IncrementDsaRspRetries()
Increment DAS response retries.
Definition ss-record.cc:319
bool GetPollForRanging() const
Get poll for ranging.
Definition ss-record.cc:186
DsaRsp GetDsaRsp() const
Get DSA response.
Definition ss-record.cc:337
uint16_t GetSfTransactionId() const
Get SF transaction ID.
Definition ss-record.cc:307
void SetDsaRsp(DsaRsp dsaRsp)
Set DSA response.
Definition ss-record.cc:331
Cid m_basicCid
basic CID
Definition ss-record.h:253
uint8_t GetRangingCorrectionRetries() const
Get ranging correction retries.
Definition ss-record.cc:114
void SetIsBroadcastSS(bool broadcast_enable)
Set is broadcast SS.
Definition ss-record.cc:237
void Initialize()
Initialize.
Definition ss-record.cc:38
bool GetHasServiceFlowRtps() const
Check if at least one flow has scheduling type SF_TYPE_RTPS.
Definition ss-record.cc:262
void EnablePollForRanging()
Enable poll for ranging function.
Definition ss-record.cc:174
void ResetRangingCorrectionRetries()
Reset ranging correction retries.
Definition ss-record.cc:120
void ResetInvitedRangingRetries()
Reset invited ranging retries.
Definition ss-record.cc:138
void SetPrimaryCid(Cid primaryCid)
Set primary CID.
Definition ss-record.cc:90
void SetBasicCid(Cid basicCid)
Set basic CID.
Definition ss-record.cc:78
uint8_t m_dsaRspRetries
DAS response retries.
Definition ss-record.h:271
void DisablePollForRanging()
Disable poll for ranging.
Definition ss-record.cc:180
uint8_t GetDsaRspRetries() const
Get DSA response retries.
Definition ss-record.cc:325
bool GetPollMeBit() const
Get poll ME bit.
Definition ss-record.cc:210
bool m_pollForRanging
poll for ranging
Definition ss-record.h:262
std::vector< ServiceFlow * > * m_serviceFlows
service flows
Definition ss-record.h:267
bool m_broadcast
broadcast?
Definition ss-record.h:265
bool m_pollMeBit
if PM (poll me) bit set for this SS
Definition ss-record.h:264
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Get service flows.
Definition ss-record.cc:222
uint8_t m_invitedRangingRetries
invited ranging retries
Definition ss-record.h:257
WimaxPhy::ModulationType m_modulationType
least robust burst profile (modulation type) for this SS
Definition ss-record.h:260
void SetIPAddress(Ipv4Address IPaddress)
Set IP address.
Definition ss-record.cc:66
bool GetAreServiceFlowsAllocated() const
Check if service flows are allocated.
Definition ss-record.cc:198
Cid m_primaryCid
primary CID
Definition ss-record.h:254
Mac48Address GetMacAddress() const
Get MAC address.
Definition ss-record.cc:108
void SetAreServiceFlowsAllocated(bool val)
Set are service flows allocated.
Definition ss-record.cc:192
bool GetIsBroadcastSS() const
Get is broadcast SS.
Definition ss-record.cc:243
Ipv4Address GetIPAddress()
Get IP address.
Definition ss-record.cc:72
bool m_areServiceFlowsAllocated
are service floes allowed
Definition ss-record.h:263
WimaxPhy::ModulationType GetModulationType() const
Get modulation type.
Definition ss-record.cc:156
void SetSfTransactionId(uint16_t sfTransactionId)
Set SF transaction ID.
Definition ss-record.cc:301
bool GetHasServiceFlowNrtps() const
Check if at least one flow has scheduling type SF_TYPE_NRTPS.
Definition ss-record.cc:275
void IncrementInvitedRangingRetries()
Increment invited ranging retries.
Definition ss-record.cc:144
Cid GetPrimaryCid() const
Get primary CID.
Definition ss-record.cc:96
uint16_t m_sfTransactionId
SF transaction ID.
Definition ss-record.h:270
bool GetHasServiceFlowBe() const
Check if at least one flow has scheduling type SF_TYPE_BE.
Definition ss-record.cc:288
uint8_t m_rangingCorrectionRetries
ranging correction retries
Definition ss-record.h:256
DsaRsp m_dsaRsp
DSA response.
Definition ss-record.h:272
This class implements service flows as described by the IEEE-802.16 standard.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
RangingStatus
RangingStatus enumeration.
ModulationType
ModulationType enumeration.
Definition wimax-phy.h:43
@ MODULATION_TYPE_BPSK_12
Definition wimax-phy.h:44
Every class exported by the ns3 library is enclosed in the ns3 namespace.