A Discrete-Event Network Simulator
API
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 
35 namespace ns3
36 {
37 
38 class ServiceFlow;
39 
45 class SSRecord
46 {
47  public:
48  SSRecord();
54  SSRecord(Mac48Address macAddress);
61  SSRecord(Mac48Address macAddress, Ipv4Address IPaddress);
62  ~SSRecord();
63 
68  void SetBasicCid(Cid basicCid);
73  Cid GetBasicCid() const;
74 
79  void SetPrimaryCid(Cid primaryCid);
84  Cid GetPrimaryCid() const;
85 
90  void SetMacAddress(Mac48Address macAddress);
96 
101  uint8_t GetRangingCorrectionRetries() const;
110  uint8_t GetInvitedRangRetries() const;
119  void SetModulationType(WimaxPhy::ModulationType modulationType);
125 
136 
138  void EnablePollForRanging();
140  void DisablePollForRanging();
145  bool GetPollForRanging() const;
146 
151  bool GetAreServiceFlowsAllocated() const;
152 
157  void SetPollMeBit(bool pollMeBit);
162  bool GetPollMeBit() const;
163 
168  void AddServiceFlow(ServiceFlow* serviceFlow);
174  std::vector<ServiceFlow*> GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const;
179  bool GetHasServiceFlowUgs() const;
184  bool GetHasServiceFlowRtps() const;
189  bool GetHasServiceFlowNrtps() const;
194  bool GetHasServiceFlowBe() const;
195 
200  void SetSfTransactionId(uint16_t sfTransactionId);
205  uint16_t GetSfTransactionId() const;
206 
211  void SetDsaRspRetries(uint8_t dsaRspRetries);
213  void IncrementDsaRspRetries();
218  uint8_t GetDsaRspRetries() const;
219 
224  void SetDsaRsp(DsaRsp dsaRsp);
229  DsaRsp GetDsaRsp() const;
234  void SetIsBroadcastSS(bool broadcast_enable);
239  bool GetIsBroadcastSS() const;
240 
250  void SetIPAddress(Ipv4Address IPaddress);
255  void SetAreServiceFlowsAllocated(bool val);
256 
257  private:
259  void Initialize();
260 
263 
266 
269 
275  bool m_pollMeBit;
276  bool m_broadcast;
277 
278  std::vector<ServiceFlow*>* m_serviceFlows;
279 
280  // fields for service flow creation
281  uint16_t m_sfTransactionId;
282  uint8_t m_dsaRspRetries;
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 area...
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.