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 * 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#ifndef SS_RECORD_H
11#define SS_RECORD_H
12
13#include "service-flow.h"
14#include "wimax-connection.h"
15#include "wimax-net-device.h"
16#include "wimax-phy.h"
17
18#include "ns3/ipv4-address.h"
19#include "ns3/mac48-address.h"
20
21#include <ostream>
22#include <stdint.h>
23
24namespace ns3
25{
26
27class ServiceFlow;
28
29/**
30 * \ingroup wimax
31 * \brief This class is used by the base station to store some information related to subscriber
32 * station in the cell.
33 */
35{
36 public:
37 SSRecord();
38 /**
39 * Constructor
40 *
41 * \param macAddress MAC address
42 */
43 SSRecord(Mac48Address macAddress);
44 /**
45 * Constructor
46 *
47 * \param macAddress MAC address
48 * \param IPaddress IP address
49 */
50 SSRecord(Mac48Address macAddress, Ipv4Address IPaddress);
51 ~SSRecord();
52
53 /**
54 * Set basic CID
55 * \param basicCid the basic CID
56 */
57 void SetBasicCid(Cid basicCid);
58 /**
59 * Get basic CID
60 * \returns the basic CID
61 */
62 Cid GetBasicCid() const;
63
64 /**
65 * Set primary CID
66 * \param primaryCid priamry CID
67 */
68 void SetPrimaryCid(Cid primaryCid);
69 /**
70 * Get primary CID
71 * \returns the CID
72 */
73 Cid GetPrimaryCid() const;
74
75 /**
76 * Set MAC address
77 * \param macAddress the MAC address
78 */
79 void SetMacAddress(Mac48Address macAddress);
80 /**
81 * Get MAC address
82 * \returns the MAC address
83 */
85
86 /**
87 * Get ranging correction retries
88 * \returns the ranging correction retries
89 */
90 uint8_t GetRangingCorrectionRetries() const;
91 /// Reset ranging correction retries
93 /// Increment ranging correction retries
95 /**
96 * Get invited range retries
97 * \returns the invited range retries
98 */
99 uint8_t GetInvitedRangRetries() const;
100 /// Reset invited ranging retries
102 /// Increment invited ranging retries
104 /**
105 * Set modulation type
106 * \param modulationType the modulation type
107 */
108 void SetModulationType(WimaxPhy::ModulationType modulationType);
109 /**
110 * Get modulation type
111 * \returns the modulation type
112 */
114
115 /**
116 * Set ranging status
117 * \param rangingStatus the ranging status
118 */
120 /**
121 * Get ranging status
122 * \returns the ranging status
123 */
125
126 /// Enable poll for ranging function
128 /// Disable poll for ranging
130 /**
131 * Get poll for ranging
132 * \returns the poll for ranging flag
133 */
134 bool GetPollForRanging() const;
135
136 /**
137 * Check if service flows are allocated
138 * \returns true if service flows are allocated
139 */
140 bool GetAreServiceFlowsAllocated() const;
141
142 /**
143 * Set poll ME bit
144 * \param pollMeBit the poll me bit
145 */
146 void SetPollMeBit(bool pollMeBit);
147 /**
148 * Get poll ME bit
149 * \returns the poll me bit
150 */
151 bool GetPollMeBit() const;
152
153 /**
154 * Add service flow
155 * \param serviceFlow the service flow
156 */
157 void AddServiceFlow(ServiceFlow* serviceFlow);
158 /**
159 * Get service flows
160 * \param schedulingType the scheduling type
161 * \returns the service flow
162 */
163 std::vector<ServiceFlow*> GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const;
164 /**
165 * Check if at least one flow has scheduling type SF_TYPE_UGS
166 * \return true if at least one flow has scheduling type SF_TYPE_UGS
167 */
168 bool GetHasServiceFlowUgs() const;
169 /**
170 * Check if at least one flow has scheduling type SF_TYPE_RTPS
171 * \return true if at least one flow has scheduling type SF_TYPE_RTPS
172 */
173 bool GetHasServiceFlowRtps() const;
174 /**
175 * Check if at least one flow has scheduling type SF_TYPE_NRTPS
176 * \return true if at least one flow has scheduling type SF_TYPE_NRTPS
177 */
178 bool GetHasServiceFlowNrtps() const;
179 /**
180 * Check if at least one flow has scheduling type SF_TYPE_BE
181 * \return true if at least one flow has scheduling type SF_TYPE_BE
182 */
183 bool GetHasServiceFlowBe() const;
184
185 /**
186 * Set SF transaction ID
187 * \param sfTransactionId the SF transaction ID
188 */
189 void SetSfTransactionId(uint16_t sfTransactionId);
190 /**
191 * Get SF transaction ID
192 * \returns the SF transaction ID
193 */
194 uint16_t GetSfTransactionId() const;
195
196 /**
197 * Set DSA response retries
198 * \param dsaRspRetries the DSA response retries
199 */
200 void SetDsaRspRetries(uint8_t dsaRspRetries);
201 /// Increment DAS response retries
203 /**
204 * Get DSA response retries
205 * \returns the DSA response retries
206 */
207 uint8_t GetDsaRspRetries() const;
208
209 /**
210 * Set DSA response
211 * \param dsaRsp the DSA response
212 */
213 void SetDsaRsp(DsaRsp dsaRsp);
214 /**
215 * Get DSA response
216 * \returns the DSA response
217 */
218 DsaRsp GetDsaRsp() const;
219 /**
220 * Set is broadcast SS
221 * \param broadcast_enable the broadcast enable flag
222 */
223 void SetIsBroadcastSS(bool broadcast_enable);
224 /**
225 * Get is broadcast SS
226 * \returns the is broadcast SS flag
227 */
228 bool GetIsBroadcastSS() const;
229
230 /**
231 * Get IP address
232 * \returns the IP address
233 */
235 /**
236 * Set IP address
237 * \param IPaddress the IP address
238 */
239 void SetIPAddress(Ipv4Address IPaddress);
240 /**
241 * Set are service flows allocated
242 * \param val the service flows allocated flag
243 */
244 void SetAreServiceFlowsAllocated(bool val);
245
246 private:
247 /// Initialize
248 void Initialize();
249
250 Mac48Address m_macAddress; ///< MAC address
251 Ipv4Address m_IPAddress; ///< IP address
252
253 Cid m_basicCid; ///< basic CID
254 Cid m_primaryCid; ///< primary CID
255
256 uint8_t m_rangingCorrectionRetries; ///< ranging correction retries
257 uint8_t m_invitedRangingRetries; ///< invited ranging retries
258
260 m_modulationType; ///< least robust burst profile (modulation type) for this SS
262 bool m_pollForRanging; ///< poll for ranging
263 bool m_areServiceFlowsAllocated; ///< are service floes allowed
264 bool m_pollMeBit; ///< if PM (poll me) bit set for this SS
265 bool m_broadcast; ///< broadcast?
266
267 std::vector<ServiceFlow*>* m_serviceFlows; ///< service flows
268
269 // fields for service flow creation
270 uint16_t m_sfTransactionId; ///< SF transaction ID
271 uint8_t m_dsaRspRetries; ///< DAS response retries
272 DsaRsp m_dsaRsp; ///< DSA response
273};
274
275} // namespace ns3
276
277#endif /* SS_RECORD_H */
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
This class is used by the base station to store some information related to subscriber station in the...
Definition ss-record.h:35
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.