A Discrete-Event Network Simulator
API
mac-messages.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  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20  * <amine.ismail@UDcast.com>
21  */
22 
23 
24 /*
25  *This file does not contain all MAC messages, the rest of MAC messages have
26  *This been categorized as DL and UL messages and are placed in
27  *This dl-mac-messages.h and ul-mac-messages.h files.
28  */
29 
30 #ifndef MANAGEMENT_MESSAGE_TYPE_H
31 #define MANAGEMENT_MESSAGE_TYPE_H
32 
33 #include <stdint.h>
34 #include "ns3/header.h"
35 
36 namespace ns3 {
37 
42 {
43 public:
44  /*
45  * Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43
46  */
48  {
60  };
61 
62  ManagementMessageType (void);
63  ManagementMessageType (uint8_t type);
64  virtual ~ManagementMessageType (void);
65  void SetType (uint8_t type);
66  uint8_t GetType (void) const;
67 
68  std::string GetName (void) const;
69  static TypeId GetTypeId (void);
70  virtual TypeId GetInstanceTypeId (void) const;
71  void Print (std::ostream &os) const;
72  uint32_t GetSerializedSize (void) const;
73  void Serialize (Buffer::Iterator start) const;
75 private:
76  uint8_t m_type;
77 };
78 
79 } // namespace ns3
80 
81 #endif /* MANAGEMENT_MESSAGE_TYPE_H */
82 
83 
84 // ---------------------------------------------------------------------
85 
86 #ifndef RNG_RSP_H
87 #define RNG_RSP_H
88 
89 #include <stdint.h>
90 #include "ns3/header.h"
91 #include "ns3/mac48-address.h"
92 #include "service-flow.h"
93 #include "cid.h"
94 
95 namespace ns3 {
96 
97 class RngRsp : public Header
98 {
106 public:
107  RngRsp (void);
108  virtual ~RngRsp (void);
114  void SetTimingAdjust (uint32_t timingAdjust);
122  void SetPowerLevelAdjust (uint8_t powerLevelAdjust);
128  void SetOffsetFreqAdjust (uint32_t offsetFreqAdjust);
129  void SetRangStatus (uint8_t rangStatus);
134  void SetDlFreqOverride (uint32_t dlFreqOverride);
139  void SetUlChnlIdOverride (uint8_t ulChnlIdOverride);
140  void SetDlOperBurstProfile (uint16_t dlOperBurstProfile);
141  void SetMacAddress (Mac48Address macAddress);
142 
143  void SetBasicCid (Cid basicCid);
144  void SetPrimaryCid (Cid primaryCid);
145 
146  void SetAasBdcastPermission (uint8_t aasBdcastPermission);
147  void SetFrameNumber (uint32_t frameNumber);
148  void SetInitRangOppNumber (uint8_t initRangOppNumber);
149  void SetRangSubchnl (uint8_t rangSubchnl);
154  uint32_t GetTimingAdjust (void) const;
161  uint8_t GetPowerLevelAdjust (void) const;
166  uint32_t GetOffsetFreqAdjust (void) const;
167  uint8_t GetRangStatus (void) const;
171  uint32_t GetDlFreqOverride (void) const;
175  uint8_t GetUlChnlIdOverride (void) const;
179  uint16_t GetDlOperBurstProfile (void) const;
180  Mac48Address GetMacAddress (void) const;
181  Cid GetBasicCid (void) const;
182  Cid GetPrimaryCid (void) const;
183  uint8_t GetAasBdcastPermission (void) const;
184  uint32_t GetFrameNumber (void) const;
185  uint8_t GetInitRangOppNumber (void) const;
186  uint8_t GetRangSubchnl (void) const;
187 
188  std::string GetName (void) const;
189  static TypeId GetTypeId (void);
190  virtual TypeId GetInstanceTypeId (void) const;
191  void Print (std::ostream &os) const;
192  uint32_t GetSerializedSize (void) const;
193  void Serialize (Buffer::Iterator start) const;
194  uint32_t Deserialize (Buffer::Iterator start);
195 private:
196  uint8_t m_reserved; // changed as per the amendment 802.16e-2005
197 
198  // TLV Encoded Information
199 
200  // Tx timing offset adjustment (signed 32-bit). The time required to advance SS transmission so frames
201  // arrive at the expected time instance at the BS.
202  uint32_t m_timingAdjust;
203 
204  // Specifies the relative change in transmission power level that the SS is to make in order that
205  // transmissions arrive at the BS at the desired power. When subchannelization is employed, the
206  // subscriber shall interpret the power offset adjustment as a required change to the transmitted power
207  // density.
209 
210  // Specifies the relative change in transmission frequency that the SS is to make in order to better match
211  // the BS. This is fine-frequency adjustment within a channel, not reassignment to a different channel.
213  uint8_t m_rangStatus;
214 
215  // Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
217 
218  // Licensed bands: The identifier of the uplink channel with which the SS is to redo initial ranging (not
219  // used with PHYs without channelized uplinks).
221 
222  // This parameter is sent in response to the RNG-REQ Requested Downlink Burst Profile parameter.
223  // Byte 0: Specifies the least robust DIUC that may be used by the BS for transmissions to the SS.
224  // Byte 1: Configuration Change Count value of DCD defining the burst profile associated with DIUC.
226 
231 
232  // Frame number where the associated RNG_REQ message was detected by the BS. Usage is mutually
233  // exclusive with SS MAC Address
234  uint32_t m_frameNumber;
235 
236  // Initial Ranging opportunity (1–255) in which the associated RNG_REQ message was detected by the BS.
237  // Usage is mutually exclusive with SS MAC Address
239 
240  // Used to indicate the OFDM subchannel reference that was used to transmit the initial ranging message
241  // (OFDM with subchannelization).
242  uint8_t m_rangSubchnl;
243 };
244 
245 } // namespace ns3
246 
247 #endif /* RNG_RSP_H */
248 
249 // ---------------------------------------------------------------------
250 
251 #ifndef DSA_REQ_H
252 #define DSA_REQ_H
253 
254 #include <stdint.h>
255 #include "ns3/header.h"
256 #include "ns3/buffer.h"
257 #include "cid.h"
258 #include "service-flow.h"
259 
260 namespace ns3 {
261 class serviceFlow;
262 class DsaReq : public Header
263 {
279 public:
280  DsaReq ();
281  ~DsaReq ();
282  DsaReq (ServiceFlow sf);
283  void SetTransactionId (uint16_t transactionId);
288  void SetSfid (uint32_t sfid);
293  void SetCid (Cid cid);
298  void SetServiceFlow (ServiceFlow sf);
302  ServiceFlow GetServiceFlow (void) const;
303  uint16_t GetTransactionId (void) const;
307  uint32_t GetSfid (void) const;
311  Cid GetCid (void) const;
312  std::string GetName (void) const;
313  static TypeId GetTypeId (void);
314  virtual TypeId GetInstanceTypeId (void) const;
315  void Print (std::ostream &os) const;
316  uint32_t GetSerializedSize (void) const;
317  void Serialize (Buffer::Iterator start) const;
318  uint32_t Deserialize (Buffer::Iterator start);
319 
320 private:
321  uint16_t m_transactionId;
322  // TLV Encoded Information
323  uint32_t m_sfid;
326 };
327 
328 } // namespace ns3
329 
330 #endif /* DSA_REQ_H */
331 
332 // ---------------------------------------------------------------------
333 
334 #ifndef DSA_RSP_H
335 #define DSA_RSP_H
336 
337 #include <stdint.h>
338 #include "ns3/header.h"
339 #include "ns3/buffer.h"
340 #include "cid.h"
341 
342 namespace ns3 {
343 
344 class DsaRsp : public Header
345 {
361 public:
362  DsaRsp (void);
363  ~DsaRsp (void);
364 
365  void SetTransactionId (uint16_t transactionId);
366  uint16_t GetTransactionId (void) const;
367 
368  void SetConfirmationCode (uint16_t confirmationCode);
369  uint16_t GetConfirmationCode (void) const;
374  void SetSfid (uint32_t sfid);
378  uint32_t GetSfid (void) const;
383  void SetCid (Cid cid);
387  Cid GetCid (void) const;
392  void SetServiceFlow (ServiceFlow sf);
396  ServiceFlow GetServiceFlow (void) const;
397 
398  std::string GetName (void) const;
399  static TypeId GetTypeId (void);
400  virtual TypeId GetInstanceTypeId (void) const;
401  void Print (std::ostream &os) const;
402  uint32_t GetSerializedSize (void) const;
403  void Serialize (Buffer::Iterator start) const;
404  uint32_t Deserialize (Buffer::Iterator start);
405 private:
406  uint16_t m_transactionId;
408  // TLV Encoded Information
410  uint32_t m_sfid;
412 
413 };
414 
415 } // namespace ns3
416 
417 #endif /* DSA_RSP_H */
418 
419 // ---------------------------------------------------------------------
420 
421 #ifndef DSA_ACK_H
422 #define DSA_ACK_H
423 
424 #include <stdint.h>
425 #include "ns3/header.h"
426 #include "ns3/buffer.h"
427 
428 namespace ns3 {
429 
430 class DsaAck : public Header
431 {
432 
438 public:
439  DsaAck (void);
440  ~DsaAck (void);
441 
442  void SetTransactionId (uint16_t transactionId);
443  uint16_t GetTransactionId (void) const;
444 
445  void SetConfirmationCode (uint16_t confirmationCode);
446  uint16_t GetConfirmationCode (void) const;
447 
448  std::string GetName (void) const;
449  static TypeId GetTypeId (void);
450  virtual TypeId GetInstanceTypeId (void) const;
451  void Print (std::ostream &os) const;
452  uint32_t GetSerializedSize (void) const;
453  void Serialize (Buffer::Iterator start) const;
454  uint32_t Deserialize (Buffer::Iterator start);
455 private:
456  uint16_t m_transactionId;
458 };
459 
460 } // namespace ns3
461 
462 #endif /* DSA_ACK_H */
463 
464 // ---------------------------------------------------------------------
465 
466 #ifndef RNG_REQ_H
467 #define RNG_REQ_H
468 
469 #include <stdint.h>
470 #include "ns3/header.h"
471 #include "ns3/mac48-address.h"
472 #include "service-flow.h"
473 
474 namespace ns3 {
475 
476 class RngReq : public Header
477 {
484 public:
485  RngReq (void);
486  virtual ~RngReq (void);
487 
488  void SetReqDlBurstProfile (uint8_t reqDlBurstProfile);
489  void SetMacAddress (Mac48Address macAddress);
490  void SetRangingAnomalies (uint8_t rangingAnomalies);
491 
492  uint8_t GetReqDlBurstProfile (void) const;
493  Mac48Address GetMacAddress (void) const;
494  uint8_t GetRangingAnomalies (void) const;
495 
496  std::string GetName (void) const;
497  static TypeId GetTypeId (void);
498  virtual TypeId GetInstanceTypeId (void) const;
499  void Print (std::ostream &os) const;
500  void PrintDebug (void) const;
501  uint32_t GetSerializedSize (void) const;
502  void Serialize (Buffer::Iterator start) const;
503  uint32_t Deserialize (Buffer::Iterator start);
504 private:
505  uint8_t m_reserved; // changed as per the amendment 802.16e-2005
506 
507  // TLV Encoded Information
511 };
512 
513 } // namespace ns3
514 
515 #endif /* RNG_REQ_H */
516 
Protocol header serialization and deserialization.
Definition: header.h:42
uint32_t GetSerializedSize(void) const
Introspection did not find any typical Config paths.
Definition: mac-messages.h:344
void SetMacAddress(Mac48Address macAddress)
Mac48Address m_macAddress
Definition: mac-messages.h:227
static TypeId GetTypeId(void)
uint8_t GetRangingAnomalies(void) const
Cid GetCid(void) const
void SetReqDlBurstProfile(uint8_t reqDlBurstProfile)
void Print(std::ostream &os) const
void SetPowerLevelAdjust(uint8_t powerLevelAdjust)
set the relative change in transmission power level that the SS should make in order that transmissio...
Introspection did not find any typical Config paths.
Definition: mac-messages.h:430
uint8_t GetRangSubchnl(void) const
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
Introspection did not find any typical Config paths.
Definition: mac-messages.h:97
uint8_t m_reserved
Definition: mac-messages.h:196
uint8_t m_confirmationCode
Definition: mac-messages.h:457
Introspection did not find any typical Config paths.
Definition: mac-messages.h:41
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint8_t GetReqDlBurstProfile(void) const
void SetMacAddress(Mac48Address macAddress)
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
uint16_t m_transactionId
Definition: mac-messages.h:456
Mac48Address m_macAddress
Definition: mac-messages.h:509
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mac-messages.cc:80
ServiceFlow GetServiceFlow(void) const
ServiceFlow m_serviceFlow
Definition: mac-messages.h:325
def start()
Definition: core.py:1482
uint32_t GetSfid(void) const
uint16_t GetConfirmationCode(void) const
Introspection did not find any typical Config paths.
Definition: mac-messages.h:476
ServiceFlow GetServiceFlow(void) const
std::string GetName(void) const
Definition: mac-messages.cc:62
Mac48Address GetMacAddress(void) const
uint8_t m_confirmationCode
Definition: mac-messages.h:407
uint32_t GetSfid(void) const
virtual ~RngReq(void)
Cid GetCid(void) const
uint8_t m_powerLevelAdjust
Definition: mac-messages.h:208
std::string GetName(void) const
uint32_t GetDlFreqOverride(void) const
uint32_t GetSerializedSize(void) const
void SetDlOperBurstProfile(uint16_t dlOperBurstProfile)
uint32_t Deserialize(Buffer::Iterator start)
uint8_t GetType(void) const
Definition: mac-messages.cc:56
uint8_t GetInitRangOppNumber(void) const
uint8_t m_reserved
Definition: mac-messages.h:505
uint32_t Deserialize(Buffer::Iterator start)
uint32_t GetTimingAdjust(void) const
DsaReq()
This class implements the ranging request message described by "IEEE Standard for Local and metropo...
iterator in a Buffer instance
Definition: buffer.h:98
uint32_t m_sfid
Definition: mac-messages.h:323
uint16_t GetConfirmationCode(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t m_transactionId
Definition: mac-messages.h:321
static TypeId GetTypeId(void)
void SetTransactionId(uint16_t transactionId)
void SetRangStatus(uint8_t rangStatus)
std::string GetName(void) const
uint8_t m_initRangOppNumber
Definition: mac-messages.h:238
void Serialize(Buffer::Iterator start) const
void SetAasBdcastPermission(uint8_t aasBdcastPermission)
uint8_t m_rangingAnomalies
Definition: mac-messages.h:510
uint32_t Deserialize(Buffer::Iterator start)
uint16_t GetDlOperBurstProfile(void) const
uint32_t Deserialize(Buffer::Iterator start)
uint32_t Deserialize(Buffer::Iterator start)
Cid GetBasicCid(void) const
void SetTimingAdjust(uint32_t timingAdjust)
set the Tx timing offset adjustment (signed 32-bit).
void Print(std::ostream &os) const
virtual ~RngRsp(void)
void PrintDebug(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint32_t m_timingAdjust
Definition: mac-messages.h:202
uint32_t m_frameNumber
Definition: mac-messages.h:234
uint32_t GetSerializedSize(void) const
void Print(std::ostream &os) const
void SetUlChnlIdOverride(uint8_t ulChnlIdOverride)
set the identifier of the uplink channel with which the SS is to redo initial ranging ...
static TypeId GetTypeId(void)
uint8_t m_rangSubchnl
Definition: mac-messages.h:242
void SetCid(Cid cid)
set the connection identifier
uint8_t GetRangStatus(void) const
uint8_t m_rangStatus
Definition: mac-messages.h:213
uint8_t GetAasBdcastPermission(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetFrameNumber(void) const
void Serialize(Buffer::Iterator start) const
uint16_t m_dlOperBurstProfile
Definition: mac-messages.h:225
Definition: cid.h:35
void SetDlFreqOverride(uint32_t dlFreqOverride)
set the Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging...
static TypeId GetTypeId(void)
Definition: mac-messages.cc:68
Mac48Address GetMacAddress(void) const
void Serialize(Buffer::Iterator start) const
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
void SetInitRangOppNumber(uint8_t initRangOppNumber)
std::string GetName(void) const
virtual ~ManagementMessageType(void)
Definition: mac-messages.cc:45
void SetOffsetFreqAdjust(uint32_t offsetFreqAdjust)
set the relative change in transmission frequency that the SS should take in order to better match th...
void SetTransactionId(uint16_t transactionId)
void SetConfirmationCode(uint16_t confirmationCode)
uint8_t GetPowerLevelAdjust(void) const
void Print(std::ostream &os) const
uint8_t m_aasBdcastPermission
Definition: mac-messages.h:230
void Print(std::ostream &os) const
uint32_t m_sfid
Definition: mac-messages.h:410
uint32_t GetSerializedSize(void) const
Definition: mac-messages.cc:92
std::string GetName(void) const
uint16_t m_transactionId
Definition: mac-messages.h:406
void SetRangSubchnl(uint8_t rangSubchnl)
RngReq(void)
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
void SetFrameNumber(uint32_t frameNumber)
void SetSfid(uint32_t sfid)
set the service flow identifier
void SetTransactionId(uint16_t transactionId)
void SetPrimaryCid(Cid primaryCid)
uint8_t m_ulChnlIdOverride
Definition: mac-messages.h:220
void SetBasicCid(Cid basicCid)
uint16_t GetTransactionId(void) const
uint32_t GetSerializedSize(void) const
uint8_t m_reqDlBurstProfile
Definition: mac-messages.h:508
uint16_t GetTransactionId(void) const
static TypeId GetTypeId(void)
uint32_t GetSerializedSize(void) const
Cid GetPrimaryCid(void) const
void SetSfid(uint32_t sfid)
set the service flow identifier
uint32_t GetOffsetFreqAdjust(void) const
uint8_t GetUlChnlIdOverride(void) const
uint32_t Deserialize(Buffer::Iterator start)
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void SetType(uint8_t type)
Definition: mac-messages.cc:50
static TypeId GetTypeId(void)
uint32_t m_dlFreqOverride
Definition: mac-messages.h:216
DsaRsp(void)
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
void SetCid(Cid cid)
set the connection identifier
RngRsp(void)
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Introspection did not find any typical Config paths.
Definition: mac-messages.h:262
void Serialize(Buffer::Iterator start) const
uint32_t m_offsetFreqAdjust
Definition: mac-messages.h:212
a unique identifier for an interface.
Definition: type-id.h:58
ServiceFlow m_serviceFlow
Definition: mac-messages.h:409
std::string GetName(void) const
void Serialize(Buffer::Iterator start) const
Definition: mac-messages.cc:98
uint16_t GetTransactionId(void) const
void Print(std::ostream &os) const
Definition: mac-messages.cc:86
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void SetRangingAnomalies(uint8_t rangingAnomalies)
void SetConfirmationCode(uint16_t confirmationCode)
DsaAck(void)
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
void Serialize(Buffer::Iterator start) const