A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 {
270 public:
271  DsaReq ();
272  ~DsaReq ();
273  DsaReq (ServiceFlow sf);
274  void SetTransactionId (uint16_t transactionId);
279  void SetSfid (uint32_t sfid);
284  void SetCid (Cid cid);
289  void SetServiceFlow (ServiceFlow sf);
293  ServiceFlow GetServiceFlow (void) const;
294  uint16_t GetTransactionId (void) const;
298  uint32_t GetSfid (void) const;
302  Cid GetCid (void) const;
303  std::string GetName (void) const;
304  static TypeId GetTypeId (void);
305  virtual TypeId GetInstanceTypeId (void) const;
306  void Print (std::ostream &os) const;
307  uint32_t GetSerializedSize (void) const;
308  void Serialize (Buffer::Iterator start) const;
309  uint32_t Deserialize (Buffer::Iterator start);
310 
311 private:
312  uint16_t m_transactionId;
313  // TLV Encoded Information
314  uint32_t m_sfid;
317 };
318 
319 } // namespace ns3
320 
321 #endif /* DSA_REQ_H */
322 
323 // ----------------------------------------------------------------------------------------------------------
324 
325 #ifndef DSA_RSP_H
326 #define DSA_RSP_H
327 
328 #include <stdint.h>
329 #include "ns3/header.h"
330 #include "ns3/buffer.h"
331 #include "cid.h"
332 
333 namespace ns3 {
334 
335 class DsaRsp : public Header
336 {
343 public:
344  DsaRsp (void);
345  ~DsaRsp (void);
346 
347  void SetTransactionId (uint16_t transactionId);
348  uint16_t GetTransactionId (void) const;
349 
350  void SetConfirmationCode (uint16_t confirmationCode);
351  uint16_t GetConfirmationCode (void) const;
356  void SetSfid (uint32_t sfid);
360  uint32_t GetSfid (void) const;
365  void SetCid (Cid cid);
369  Cid GetCid (void) const;
374  void SetServiceFlow (ServiceFlow sf);
378  ServiceFlow GetServiceFlow (void) const;
379 
380  std::string GetName (void) const;
381  static TypeId GetTypeId (void);
382  virtual TypeId GetInstanceTypeId (void) const;
383  void Print (std::ostream &os) const;
384  uint32_t GetSerializedSize (void) const;
385  void Serialize (Buffer::Iterator start) const;
386  uint32_t Deserialize (Buffer::Iterator start);
387 private:
388  uint16_t m_transactionId;
390  // TLV Encoded Information
392  uint32_t m_sfid;
394 
395 };
396 
397 } // namespace ns3
398 
399 #endif /* DSA_RSP_H */
400 
401 // ----------------------------------------------------------------------------------------------------------
402 
403 #ifndef DSA_ACK_H
404 #define DSA_ACK_H
405 
406 #include <stdint.h>
407 #include "ns3/header.h"
408 #include "ns3/buffer.h"
409 
410 namespace ns3 {
411 
412 class DsaAck : public Header
413 {
414 
420 public:
421  DsaAck (void);
422  ~DsaAck (void);
423 
424  void SetTransactionId (uint16_t transactionId);
425  uint16_t GetTransactionId (void) const;
426 
427  void SetConfirmationCode (uint16_t confirmationCode);
428  uint16_t GetConfirmationCode (void) const;
429 
430  std::string GetName (void) const;
431  static TypeId GetTypeId (void);
432  virtual TypeId GetInstanceTypeId (void) const;
433  void Print (std::ostream &os) const;
434  uint32_t GetSerializedSize (void) const;
435  void Serialize (Buffer::Iterator start) const;
436  uint32_t Deserialize (Buffer::Iterator start);
437 private:
438  uint16_t m_transactionId;
440 };
441 
442 } // namespace ns3
443 
444 #endif /* DSA_ACK_H */
445 
446 // ----------------------------------------------------------------------------------------------------------
447 
448 #ifndef RNG_REQ_H
449 #define RNG_REQ_H
450 
451 #include <stdint.h>
452 #include "ns3/header.h"
453 #include "ns3/mac48-address.h"
454 #include "service-flow.h"
455 
456 namespace ns3 {
457 
458 class RngReq : public Header
459 {
466 public:
467  RngReq (void);
468  virtual ~RngReq (void);
469 
470  void SetReqDlBurstProfile (uint8_t reqDlBurstProfile);
471  void SetMacAddress (Mac48Address macAddress);
472  void SetRangingAnomalies (uint8_t rangingAnomalies);
473 
474  uint8_t GetReqDlBurstProfile (void) const;
475  Mac48Address GetMacAddress (void) const;
476  uint8_t GetRangingAnomalies (void) const;
477 
478  std::string GetName (void) const;
479  static TypeId GetTypeId (void);
480  virtual TypeId GetInstanceTypeId (void) const;
481  void Print (std::ostream &os) const;
482  void PrintDebug (void) const;
483  uint32_t GetSerializedSize (void) const;
484  void Serialize (Buffer::Iterator start) const;
485  uint32_t Deserialize (Buffer::Iterator start);
486 private:
487  uint8_t m_reserved; // changed as per the amendment 802.16e-2005
488 
489  // TLV Encoded Information
493 };
494 
495 } // namespace ns3
496 
497 #endif /* RNG_REQ_H */
498 
Protocol header serialization and deserialization.
Definition: header.h:42
uint32_t GetSerializedSize(void) const
Doxygen introspection did not find any typical Config paths.
Definition: mac-messages.h:335
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...
Doxygen introspection did not find any typical Config paths.
Definition: mac-messages.h:412
uint8_t GetRangSubchnl(void) const
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
Doxygen 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:439
Doxygen introspection did not find any typical Config paths.
Definition: mac-messages.h:41
virtual TypeId GetInstanceTypeId(void) const
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:438
Mac48Address m_macAddress
Definition: mac-messages.h:491
virtual TypeId GetInstanceTypeId(void) const
Definition: mac-messages.cc:76
ServiceFlow GetServiceFlow(void) const
ServiceFlow m_serviceFlow
Definition: mac-messages.h:316
uint32_t GetSfid(void) const
uint16_t GetConfirmationCode(void) const
Doxygen introspection did not find any typical Config paths.
Definition: mac-messages.h:458
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:389
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:487
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 metropoli...
iterator in a Buffer instance
Definition: buffer.h:98
uint32_t m_sfid
Definition: mac-messages.h:314
uint16_t GetConfirmationCode(void) const
virtual TypeId GetInstanceTypeId(void) const
uint16_t m_transactionId
Definition: mac-messages.h:312
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:492
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
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
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:41
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:392
uint32_t GetSerializedSize(void) const
Definition: mac-messages.cc:88
std::string GetName(void) const
uint16_t m_transactionId
Definition: mac-messages.h:388
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:490
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
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 area...
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...
Doxygen 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:49
ServiceFlow m_serviceFlow
Definition: mac-messages.h:391
std::string GetName(void) const
void Serialize(Buffer::Iterator start) const
Definition: mac-messages.cc:94
uint16_t GetTransactionId(void) const
void Print(std::ostream &os) const
Definition: mac-messages.cc:82
virtual TypeId GetInstanceTypeId(void) const
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