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 
44 {
45 public:
48  {
60  };
61 
62  ManagementMessageType (void);
68  ManagementMessageType (uint8_t type);
69  virtual ~ManagementMessageType (void);
74  void SetType (uint8_t type);
79  uint8_t GetType (void) const;
80 
82  std::string GetName (void) const;
87  static TypeId GetTypeId (void);
88  virtual TypeId GetInstanceTypeId (void) const;
89  void Print (std::ostream &os) const;
90  uint32_t GetSerializedSize (void) const;
91  void Serialize (Buffer::Iterator start) const;
93 private:
94  uint8_t m_type;
95 };
96 
97 } // namespace ns3
98 
99 #endif /* MANAGEMENT_MESSAGE_TYPE_H */
100 
101 
102 // ---------------------------------------------------------------------
103 
104 #ifndef RNG_RSP_H
105 #define RNG_RSP_H
106 
107 #include <stdint.h>
108 #include "ns3/header.h"
109 #include "ns3/mac48-address.h"
110 #include "service-flow.h"
111 #include "cid.h"
112 
113 namespace ns3 {
114 
121 class RngRsp : public Header
122 {
123 public:
124  RngRsp (void);
125  virtual ~RngRsp (void);
131  void SetTimingAdjust (uint32_t timingAdjust);
139  void SetPowerLevelAdjust (uint8_t powerLevelAdjust);
145  void SetOffsetFreqAdjust (uint32_t offsetFreqAdjust);
150  void SetRangStatus (uint8_t rangStatus);
155  void SetDlFreqOverride (uint32_t dlFreqOverride);
160  void SetUlChnlIdOverride (uint8_t ulChnlIdOverride);
165  void SetDlOperBurstProfile (uint16_t dlOperBurstProfile);
170  void SetMacAddress (Mac48Address macAddress);
171 
176  void SetBasicCid (Cid basicCid);
181  void SetPrimaryCid (Cid primaryCid);
182 
187  void SetAasBdcastPermission (uint8_t aasBdcastPermission);
192  void SetFrameNumber (uint32_t frameNumber);
197  void SetInitRangOppNumber (uint8_t initRangOppNumber);
202  void SetRangSubchnl (uint8_t rangSubchnl);
207  uint32_t GetTimingAdjust (void) const;
214  uint8_t GetPowerLevelAdjust (void) const;
219  uint32_t GetOffsetFreqAdjust (void) const;
223  uint8_t GetRangStatus (void) const;
227  uint32_t GetDlFreqOverride (void) const;
231  uint8_t GetUlChnlIdOverride (void) const;
235  uint16_t GetDlOperBurstProfile (void) const;
239  Mac48Address GetMacAddress (void) const;
243  Cid GetBasicCid (void) const;
247  Cid GetPrimaryCid (void) const;
251  uint8_t GetAasBdcastPermission (void) const;
255  uint32_t GetFrameNumber (void) const;
259  uint8_t GetInitRangOppNumber (void) const;
263  uint8_t GetRangSubchnl (void) const;
264 
268  std::string GetName (void) const;
273  static TypeId GetTypeId (void);
274  virtual TypeId GetInstanceTypeId (void) const;
275  void Print (std::ostream &os) const;
276  uint32_t GetSerializedSize (void) const;
277  void Serialize (Buffer::Iterator start) const;
279 private:
280  uint8_t m_reserved;
281 
282  // TLV Encoded Information
283 
288  uint32_t m_timingAdjust;
289 
297 
303 
307  uint8_t m_rangStatus;
308 
311 
317 
324 
329 
334  uint32_t m_frameNumber;
335 
341 
346  uint8_t m_rangSubchnl;
347 };
348 
349 } // namespace ns3
350 
351 #endif /* RNG_RSP_H */
352 
353 // ---------------------------------------------------------------------
354 
355 #ifndef DSA_REQ_H
356 #define DSA_REQ_H
357 
358 #include <stdint.h>
359 #include "ns3/header.h"
360 #include "ns3/buffer.h"
361 #include "cid.h"
362 #include "service-flow.h"
363 
364 namespace ns3 {
365 class serviceFlow;
366 
373 class DsaReq : public Header
374 {
375 public:
376  DsaReq ();
377  ~DsaReq ();
383  DsaReq (ServiceFlow sf);
388  void SetTransactionId (uint16_t transactionId);
393  void SetSfid (uint32_t sfid);
398  void SetCid (Cid cid);
403  void SetServiceFlow (ServiceFlow sf);
407  ServiceFlow GetServiceFlow (void) const;
411  uint16_t GetTransactionId (void) const;
415  uint32_t GetSfid (void) const;
419  Cid GetCid (void) const;
423  std::string GetName (void) const;
428  static TypeId GetTypeId (void);
429  virtual TypeId GetInstanceTypeId (void) const;
430  void Print (std::ostream &os) const;
431  uint32_t GetSerializedSize (void) const;
432  void Serialize (Buffer::Iterator start) const;
434 
435 private:
436  uint16_t m_transactionId;
437  // TLV Encoded Information
438  uint32_t m_sfid;
441 };
442 
443 } // namespace ns3
444 
445 #endif /* DSA_REQ_H */
446 
447 // ---------------------------------------------------------------------
448 
449 #ifndef DSA_RSP_H
450 #define DSA_RSP_H
451 
452 #include <stdint.h>
453 #include "ns3/header.h"
454 #include "ns3/buffer.h"
455 #include "cid.h"
456 
457 namespace ns3 {
458 
474 class DsaRsp : public Header
475 {
476 public:
477  DsaRsp (void);
478  ~DsaRsp (void);
479 
484  void SetTransactionId (uint16_t transactionId);
488  uint16_t GetTransactionId (void) const;
489 
494  void SetConfirmationCode (uint16_t confirmationCode);
498  uint16_t GetConfirmationCode (void) const;
503  void SetSfid (uint32_t sfid);
507  uint32_t GetSfid (void) const;
512  void SetCid (Cid cid);
516  Cid GetCid (void) const;
521  void SetServiceFlow (ServiceFlow sf);
525  ServiceFlow GetServiceFlow (void) const;
526 
530  std::string GetName (void) const;
535  static TypeId GetTypeId (void);
536  virtual TypeId GetInstanceTypeId (void) const;
537  void Print (std::ostream &os) const;
538  uint32_t GetSerializedSize (void) const;
539  void Serialize (Buffer::Iterator start) const;
541 private:
542  uint16_t m_transactionId;
544  // TLV Encoded Information
546  uint32_t m_sfid;
548 
549 };
550 
551 } // namespace ns3
552 
553 #endif /* DSA_RSP_H */
554 
555 // ---------------------------------------------------------------------
556 
557 #ifndef DSA_ACK_H
558 #define DSA_ACK_H
559 
560 #include <stdint.h>
561 #include "ns3/header.h"
562 #include "ns3/buffer.h"
563 
564 namespace ns3 {
565 
572 class DsaAck : public Header
573 {
574 
575 public:
576  DsaAck (void);
577  ~DsaAck (void);
578 
583  void SetTransactionId (uint16_t transactionId);
588  uint16_t GetTransactionId (void) const;
589 
594  void SetConfirmationCode (uint16_t confirmationCode);
599  uint16_t GetConfirmationCode (void) const;
600 
605  std::string GetName (void) const;
610  static TypeId GetTypeId (void);
611  virtual TypeId GetInstanceTypeId (void) const;
612  void Print (std::ostream &os) const;
613  uint32_t GetSerializedSize (void) const;
614  void Serialize (Buffer::Iterator start) const;
616 private:
617  uint16_t m_transactionId;
619 };
620 
621 } // namespace ns3
622 
623 #endif /* DSA_ACK_H */
624 
625 // ---------------------------------------------------------------------
626 
627 #ifndef RNG_REQ_H
628 #define RNG_REQ_H
629 
630 #include <stdint.h>
631 #include "ns3/header.h"
632 #include "ns3/mac48-address.h"
633 #include "service-flow.h"
634 
635 namespace ns3 {
636 
642 class RngReq : public Header
643 {
644 public:
645  RngReq (void);
646  virtual ~RngReq (void);
647 
652  void SetReqDlBurstProfile (uint8_t reqDlBurstProfile);
657  void SetMacAddress (Mac48Address macAddress);
662  void SetRangingAnomalies (uint8_t rangingAnomalies);
663 
668  uint8_t GetReqDlBurstProfile (void) const;
673  Mac48Address GetMacAddress (void) const;
678  uint8_t GetRangingAnomalies (void) const;
679 
684  std::string GetName (void) const;
689  static TypeId GetTypeId (void);
690  virtual TypeId GetInstanceTypeId (void) const;
691  void Print (std::ostream &os) const;
693  void PrintDebug (void) const;
694  uint32_t GetSerializedSize (void) const;
695  void Serialize (Buffer::Iterator start) const;
697 private:
698  uint8_t m_reserved;
699 
700  // TLV Encoded Information
704 };
705 
706 } // namespace ns3
707 
708 #endif /* RNG_REQ_H */
709 
uint8_t GetAasBdcastPermission(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Protocol header serialization and deserialization.
Definition: header.h:42
uint8_t GetReqDlBurstProfile(void) const
Get request DL burst profile field.
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ...
Definition: mac-messages.h:474
uint32_t GetSerializedSize(void) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void SetMacAddress(Mac48Address macAddress)
Set MAC address field.
Mac48Address m_macAddress
MAC address.
Definition: mac-messages.h:325
static TypeId GetTypeId(void)
Get the type ID.
Cid GetCid(void) const
void SetReqDlBurstProfile(uint8_t reqDlBurstProfile)
Set request DL burst profile field.
void SetPowerLevelAdjust(uint8_t powerLevelAdjust)
set the relative change in transmission power level that the SS should make in order that transmissio...
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:572
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Definition: mac-messages.h:121
uint8_t m_reserved
changed as per the amendment 802.16e-2005
Definition: mac-messages.h:280
uint8_t m_confirmationCode
confirmation code
Definition: mac-messages.h:618
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43...
Definition: mac-messages.h:43
void Serialize(Buffer::Iterator start) const
void Print(std::ostream &os) const
Definition: mac-messages.cc:86
void SetMacAddress(Mac48Address macAddress)
set the MAC address
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:617
Mac48Address m_macAddress
MAC address.
Definition: mac-messages.h:702
ServiceFlow m_serviceFlow
service flow
Definition: mac-messages.h:440
def start()
Definition: core.py:1844
uint16_t GetTransactionId(void) const
std::string GetName(void) const
ServiceFlow GetServiceFlow(void) const
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...
Definition: mac-messages.h:642
Mac48Address GetMacAddress(void) const
Get MAC address field.
uint8_t m_confirmationCode
confirmation code
Definition: mac-messages.h:543
virtual ~RngReq(void)
uint32_t GetTimingAdjust(void) const
uint8_t m_powerLevelAdjust
Specifies the relative change in transmission power level that the SS is to make in order that transm...
Definition: mac-messages.h:296
uint32_t GetSerializedSize(void) const
void SetDlOperBurstProfile(uint16_t dlOperBurstProfile)
set the DL oper burst profile
uint32_t Deserialize(Buffer::Iterator start)
uint32_t GetSerializedSize(void) const
uint8_t m_reserved
changed as per the amendment 802.16e-2005
Definition: mac-messages.h:698
Cid GetPrimaryCid(void) const
uint32_t Deserialize(Buffer::Iterator start)
uint8_t GetRangSubchnl(void) const
iterator in a Buffer instance
Definition: buffer.h:98
uint32_t m_sfid
SFID.
Definition: mac-messages.h:438
uint8_t GetUlChnlIdOverride(void) const
Cid GetBasicCid(void) const
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:436
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
static TypeId GetTypeId(void)
Get the type ID.
std::string GetName(void) const
Get name field.
void SetTransactionId(uint16_t transactionId)
set the transaction ID
void SetRangStatus(uint8_t rangStatus)
set the range status.
Cid m_cid
CID.
Definition: mac-messages.h:547
void Print(std::ostream &os) const
uint8_t m_initRangOppNumber
Initial Ranging opportunity (1–255) in which the associated RNG_REQ message was detected by the BS...
Definition: mac-messages.h:340
void PrintDebug(void) const
Print debug function.
void SetAasBdcastPermission(uint8_t aasBdcastPermission)
set AAS broadcast permission.
uint32_t GetSerializedSize(void) const
uint8_t m_rangingAnomalies
ranging anomalies
Definition: mac-messages.h:703
uint32_t GetDlFreqOverride(void) const
uint32_t Deserialize(Buffer::Iterator start)
uint32_t Deserialize(Buffer::Iterator start)
uint32_t Deserialize(Buffer::Iterator start)
void SetTimingAdjust(uint32_t timingAdjust)
set the Tx timing offset adjustment (signed 32-bit).
virtual ~RngRsp(void)
uint16_t GetConfirmationCode(void) const
uint16_t GetTransactionId(void) const
uint32_t m_timingAdjust
Tx timing offset adjustment (signed 32-bit).
Definition: mac-messages.h:288
uint32_t m_frameNumber
Frame number where the associated RNG_REQ message was detected by the BS.
Definition: mac-messages.h:334
std::string GetName(void) const
Get name field.
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)
Get the type ID.
uint8_t m_rangSubchnl
Used to indicate the OFDM subchannel reference that was used to transmit the initial ranging message ...
Definition: mac-messages.h:346
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mac-messages.cc:80
void SetCid(Cid cid)
set the connection identifier
uint8_t m_rangStatus
range status.
Definition: mac-messages.h:307
uint8_t GetType(void) const
Get type field.
Definition: mac-messages.cc:56
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t m_dlOperBurstProfile
This parameter is sent in response to the RNG-REQ Requested Downlink Burst Profile parameter...
Definition: mac-messages.h:323
void Serialize(Buffer::Iterator start) const
Cid class.
Definition: cid.h:37
void SetDlFreqOverride(uint32_t dlFreqOverride)
set the Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging...
uint32_t GetOffsetFreqAdjust(void) const
static TypeId GetTypeId(void)
Get the type ID.
Definition: mac-messages.cc:68
uint32_t GetFrameNumber(void) 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
uint8_t GetInitRangOppNumber(void) const
uint32_t GetSfid(void) const
uint32_t GetSerializedSize(void) const
Definition: mac-messages.cc:92
uint16_t GetTransactionId(void) const
Get transaction ID field.
void SetInitRangOppNumber(uint8_t initRangOppNumber)
set initial range opp number.
virtual ~ManagementMessageType(void)
Definition: mac-messages.cc:45
std::string GetName(void) const
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)
set the transaction ID
void SetConfirmationCode(uint16_t confirmationCode)
set the confirmation code
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Cid m_cid
CID.
Definition: mac-messages.h:439
std::string GetName(void) const
uint8_t m_aasBdcastPermission
AAS broadcast permission.
Definition: mac-messages.h:328
uint32_t m_sfid
SFID.
Definition: mac-messages.h:546
Mac48Address GetMacAddress(void) const
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:542
void SetRangSubchnl(uint8_t rangSubchnl)
set range sub channel.
void SetFrameNumber(uint32_t frameNumber)
set frame number.
void SetSfid(uint32_t sfid)
set the service flow identifier
ServiceFlow GetServiceFlow(void) const
void SetTransactionId(uint16_t transactionId)
Set transaction ID field.
void Print(std::ostream &os) const
void SetPrimaryCid(Cid primaryCid)
set primary CID.
uint16_t GetDlOperBurstProfile(void) const
uint8_t m_ulChnlIdOverride
Licensed bands: The identifier of the uplink channel with which the SS is to redo initial ranging (no...
Definition: mac-messages.h:316
void SetBasicCid(Cid basicCid)
set basic CID.
void Serialize(Buffer::Iterator start) const
uint8_t m_reqDlBurstProfile
request DL burst profile
Definition: mac-messages.h:701
void Print(std::ostream &os) const
static TypeId GetTypeId(void)
Get the type ID.
void SetSfid(uint32_t sfid)
set the service flow identifier
std::string GetName(void) const
Definition: mac-messages.cc:62
uint32_t Deserialize(Buffer::Iterator start)
Cid m_basicCid
basic CID
Definition: mac-messages.h:326
void SetType(uint8_t type)
Set type field.
Definition: mac-messages.cc:50
static TypeId GetTypeId(void)
Register this type.
uint32_t m_dlFreqOverride
Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging...
Definition: mac-messages.h:310
void Serialize(Buffer::Iterator start) const
Definition: mac-messages.cc:98
void SetCid(Cid cid)
set the connection identifier
MessageType
Message type enumeration.
Definition: mac-messages.h:47
void Serialize(Buffer::Iterator start) const
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:373
Cid m_primaryCid
primary CID
Definition: mac-messages.h:327
void Print(std::ostream &os) const
uint32_t GetSfid(void) const
uint8_t GetRangingAnomalies(void) const
Get ranging anomalies field.
uint32_t m_offsetFreqAdjust
Specifies the relative change in transmission frequency that the SS is to make in order to better mat...
Definition: mac-messages.h:302
a unique identifier for an interface.
Definition: type-id.h:58
ServiceFlow m_serviceFlow
service flow
Definition: mac-messages.h:545
Cid GetCid(void) const
void Serialize(Buffer::Iterator start) const
uint8_t GetRangStatus(void) const
void Print(std::ostream &os) const
uint16_t GetConfirmationCode(void) const
Get confirmation code field.
void SetRangingAnomalies(uint8_t rangingAnomalies)
Set ranging anomalies field.
void SetConfirmationCode(uint16_t confirmationCode)
Set confirmation code field.
uint8_t GetPowerLevelAdjust(void) const
uint32_t GetSerializedSize(void) const