A Discrete-Event Network Simulator
API
ss-record.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  * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20  */
21 
22 #ifndef SS_RECORD_H
23 #define SS_RECORD_H
24 
25 #include <stdint.h>
26 #include <ostream>
27 #include "ns3/mac48-address.h"
28 #include "wimax-connection.h"
29 #include "wimax-phy.h"
30 #include "wimax-net-device.h"
31 #include "ns3/ipv4-address.h"
32 #include <stdint.h>
33 #include "service-flow.h"
34 
35 namespace ns3 {
36 
37 class ServiceFlow;
38 
43 class SSRecord
44 {
45 public:
46  SSRecord (void);
52  SSRecord (Mac48Address macAddress);
59  SSRecord (Mac48Address macAddress, Ipv4Address IPaddress);
60  ~SSRecord (void);
61 
66  void SetBasicCid (Cid basicCid);
71  Cid GetBasicCid (void) const;
72 
77  void SetPrimaryCid (Cid primaryCid);
82  Cid GetPrimaryCid (void) const;
83 
88  void SetMacAddress (Mac48Address macAddress);
93  Mac48Address GetMacAddress (void) const;
94 
99  uint8_t GetRangingCorrectionRetries (void) const;
101  void ResetRangingCorrectionRetries (void);
108  uint8_t GetInvitedRangRetries (void) const;
110  void ResetInvitedRangingRetries (void);
112  void IncrementInvitedRangingRetries (void);
117  void SetModulationType (WimaxPhy::ModulationType modulationType);
123 
128  void SetRangingStatus (WimaxNetDevice::RangingStatus rangingStatus);
134 
136  void EnablePollForRanging (void);
138  void DisablePollForRanging (void);
143  bool GetPollForRanging (void) const;
144 
149  bool GetAreServiceFlowsAllocated (void) const;
150 
155  void SetPollMeBit (bool pollMeBit);
160  bool GetPollMeBit (void) const;
161 
166  void AddServiceFlow (ServiceFlow *serviceFlow);
172  std::vector<ServiceFlow*> GetServiceFlows (enum ServiceFlow::SchedulingType schedulingType) const;
177  bool GetHasServiceFlowUgs (void) const;
182  bool GetHasServiceFlowRtps (void) const;
187  bool GetHasServiceFlowNrtps (void) const;
192  bool GetHasServiceFlowBe (void) const;
193 
198  void SetSfTransactionId (uint16_t sfTransactionId);
203  uint16_t GetSfTransactionId (void) const;
204 
209  void SetDsaRspRetries (uint8_t dsaRspRetries);
211  void IncrementDsaRspRetries (void);
216  uint8_t GetDsaRspRetries (void) const;
217 
222  void SetDsaRsp (DsaRsp dsaRsp);
227  DsaRsp GetDsaRsp (void) const;
232  void SetIsBroadcastSS (bool broadcast_enable);
237  bool GetIsBroadcastSS (void);
238 
243  Ipv4Address GetIPAddress (void);
248  void SetIPAddress (Ipv4Address IPaddress);
253  void SetAreServiceFlowsAllocated (bool val);
254 private:
256  void Initialize (void);
257 
260 
263 
266 
271  bool m_pollMeBit;
272  bool m_broadcast;
273 
274  std::vector<ServiceFlow*> *m_serviceFlows;
275 
276  // fields for service flow creation
277  uint16_t m_sfTransactionId;
278  uint8_t m_dsaRspRetries;
280 };
281 
282 } // namespace ns3
283 
284 #endif /* SS_RECORD_H */
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow.
Definition: ss-record.cc:224
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ...
Definition: mac-messages.h:474
~SSRecord(void)
Definition: ss-record.cc:68
void IncrementRangingCorrectionRetries(void)
Increment ranging correction retries.
Definition: ss-record.cc:134
bool GetHasServiceFlowNrtps(void) const
Check if at least one flow has scheduling type SF_TYPE_NRTPS.
Definition: ss-record.cc:281
WimaxPhy::ModulationType m_modulationType
least robust burst profile (modulation type) for this SS
Definition: ss-record.h:267
void SetPrimaryCid(Cid primaryCid)
Set primary CID.
Definition: ss-record.cc:98
WimaxPhy::ModulationType GetModulationType(void) const
Get modulation type.
Definition: ss-record.cc:164
void IncrementDsaRspRetries(void)
Increment DAS response retries.
Definition: ss-record.cc:324
std::vector< ServiceFlow * > GetServiceFlows(enum ServiceFlow::SchedulingType schedulingType) const
Get service flows.
Definition: ss-record.cc:229
Ipv4Address m_IPAddress
IP address.
Definition: ss-record.h:259
Ipv4Address GetIPAddress(void)
Get IP address.
Definition: ss-record.cc:80
uint8_t GetRangingCorrectionRetries(void) const
Get ranging correction retries.
Definition: ss-record.cc:122
bool m_pollForRanging
poll for ranging
Definition: ss-record.h:269
void SetDsaRspRetries(uint8_t dsaRspRetries)
Set DSA response retries.
Definition: ss-record.cc:318
void SetIsBroadcastSS(bool broadcast_enable)
Set is broadcast SS.
Definition: ss-record.cc:243
void DisablePollForRanging(void)
Disable poll for ranging.
Definition: ss-record.cc:188
Cid m_primaryCid
primary CID
Definition: ss-record.h:262
bool GetPollForRanging(void) const
Get poll for ranging.
Definition: ss-record.cc:194
uint8_t m_rangingCorrectionRetries
ranging correction retries
Definition: ss-record.h:264
bool GetHasServiceFlowUgs(void) const
Check if at least one flow has scheduling type SF_TYPE_UGS.
Definition: ss-record.cc:255
void SetDsaRsp(DsaRsp dsaRsp)
Set DSA response.
Definition: ss-record.cc:336
DsaRsp GetDsaRsp(void) const
Get DSA response.
Definition: ss-record.cc:342
std::vector< ServiceFlow * > * m_serviceFlows
service flows
Definition: ss-record.h:274
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set modulation type.
Definition: ss-record.cc:158
void SetRangingStatus(WimaxNetDevice::RangingStatus rangingStatus)
Set ranging status.
Definition: ss-record.cc:170
void Initialize(void)
Initialize.
Definition: ss-record.cc:47
void ResetInvitedRangingRetries(void)
Reset invited ranging retries.
Definition: ss-record.cc:146
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:58
SSRecord(void)
Definition: ss-record.cc:28
void SetSfTransactionId(uint16_t sfTransactionId)
Set SF transaction ID.
Definition: ss-record.cc:307
void ResetRangingCorrectionRetries(void)
Reset ranging correction retries.
Definition: ss-record.cc:128
uint8_t GetDsaRspRetries(void) const
Get DSA response retries.
Definition: ss-record.cc:330
void SetBasicCid(Cid basicCid)
Set basic CID.
Definition: ss-record.cc:86
bool GetAreServiceFlowsAllocated(void) const
Check if service flows are allocated.
Definition: ss-record.cc:206
void EnablePollForRanging(void)
Enable poll for ranging function.
Definition: ss-record.cc:182
Cid GetPrimaryCid(void) const
Get primary CID.
Definition: ss-record.cc:104
bool m_broadcast
broadcast?
Definition: ss-record.h:272
void SetPollMeBit(bool pollMeBit)
Set poll ME bit.
Definition: ss-record.cc:212
bool GetPollMeBit(void) const
Get poll ME bit.
Definition: ss-record.cc:218
DsaRsp m_dsaRsp
DSA response.
Definition: ss-record.h:279
Cid m_basicCid
basic CID
Definition: ss-record.h:261
WimaxNetDevice::RangingStatus m_rangingStatus
ranging status
Definition: ss-record.h:268
Mac48Address GetMacAddress(void) const
Get MAC address.
Definition: ss-record.cc:116
uint8_t GetInvitedRangRetries(void) const
Get invited range retries.
Definition: ss-record.cc:140
bool GetHasServiceFlowBe(void) const
Check if at least one flow has scheduling type SF_TYPE_BE.
Definition: ss-record.cc:294
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void IncrementInvitedRangingRetries(void)
Increment invited ranging retries.
Definition: ss-record.cc:152
void SetAreServiceFlowsAllocated(bool val)
Set are service flows allocated.
Definition: ss-record.cc:200
Cid class.
Definition: cid.h:37
uint8_t m_dsaRspRetries
DAS response retries.
Definition: ss-record.h:278
bool GetHasServiceFlowRtps(void) const
Check if at least one flow has scheduling type SF_TYPE_RTPS.
Definition: ss-record.cc:268
an EUI-48 address
Definition: mac48-address.h:43
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
bool m_pollMeBit
if PM (poll me) bit set for this SS
Definition: ss-record.h:271
uint16_t GetSfTransactionId(void) const
Get SF transaction ID.
Definition: ss-record.cc:312
WimaxNetDevice::RangingStatus GetRangingStatus(void) const
Get ranging status.
Definition: ss-record.cc:176
bool m_areServiceFlowsAllocated
are service floes allowed
Definition: ss-record.h:270
bool GetIsBroadcastSS(void)
Get is broadcast SS.
Definition: ss-record.cc:249
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:49
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
Mac48Address m_macAddress
MAC address.
Definition: ss-record.h:258
void SetIPAddress(Ipv4Address IPaddress)
Set IP address.
Definition: ss-record.cc:75
uint8_t m_invitedRangingRetries
invited ranging retries
Definition: ss-record.h:265
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:43
Cid GetBasicCid(void) const
Get basic CID.
Definition: ss-record.cc:92
void SetMacAddress(Mac48Address macAddress)
Set MAC address.
Definition: ss-record.cc:110
RangingStatus
RangingStatus enumeration.
uint16_t m_sfTransactionId
SF transaction ID.
Definition: ss-record.h:277