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
36namespace ns3 {
37
44{
45public:
48 {
60 };
61
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;
93private:
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
113namespace ns3 {
114
121class RngRsp : public Header
122{
123public:
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;
279private:
280 uint8_t m_reserved;
281
282 // TLV Encoded Information
283
289
297
303
308
311
317
324
329
335
341
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
364namespace ns3 {
365class serviceFlow;
366
373class DsaReq : public Header
374{
375public:
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
435private:
437 // TLV Encoded Information
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
457namespace ns3 {
458
474class DsaRsp : public Header
475{
476public:
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;
541private:
544 // TLV Encoded Information
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
564namespace ns3 {
565
572class DsaAck : public Header
573{
574
575public:
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;
616private:
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
635namespace ns3 {
636
642class RngReq : public Header
643{
644public:
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;
697private:
698 uint8_t m_reserved;
699
700 // TLV Encoded Information
704};
705
706} // namespace ns3
707
708#endif /* RNG_REQ_H */
709
iterator in a Buffer instance
Definition: buffer.h:99
Cid class.
Definition: cid.h:38
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:573
uint16_t GetConfirmationCode(void) const
Get confirmation code field.
void SetConfirmationCode(uint16_t confirmationCode)
Set confirmation code field.
void Serialize(Buffer::Iterator start) const
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void SetTransactionId(uint16_t transactionId)
Set transaction ID field.
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:617
uint32_t GetSerializedSize(void) const
static TypeId GetTypeId(void)
Get the type ID.
uint16_t GetTransactionId(void) const
Get transaction ID field.
void Print(std::ostream &os) const
uint32_t Deserialize(Buffer::Iterator start)
std::string GetName(void) const
Get name field.
uint8_t m_confirmationCode
confirmation code
Definition: mac-messages.h:618
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:374
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void SetTransactionId(uint16_t transactionId)
set the transaction ID
void Print(std::ostream &os) const
static TypeId GetTypeId(void)
Get the type ID.
Cid m_cid
CID.
Definition: mac-messages.h:439
uint16_t GetTransactionId(void) const
ServiceFlow GetServiceFlow(void) const
std::string GetName(void) const
uint32_t GetSfid(void) const
uint32_t GetSerializedSize(void) const
ServiceFlow m_serviceFlow
service flow
Definition: mac-messages.h:440
uint32_t Deserialize(Buffer::Iterator start)
void Serialize(Buffer::Iterator start) const
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
uint32_t m_sfid
SFID.
Definition: mac-messages.h:438
void SetSfid(uint32_t sfid)
set the service flow identifier
void SetCid(Cid cid)
set the connection identifier
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:436
Cid GetCid(void) const
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:475
void SetConfirmationCode(uint16_t confirmationCode)
set the confirmation code
uint32_t m_sfid
SFID.
Definition: mac-messages.h:546
uint16_t GetTransactionId(void) const
void Print(std::ostream &os) const
ServiceFlow m_serviceFlow
service flow
Definition: mac-messages.h:545
uint32_t GetSfid(void) const
void SetSfid(uint32_t sfid)
set the service flow identifier
static TypeId GetTypeId(void)
Get the type ID.
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:542
uint32_t Deserialize(Buffer::Iterator start)
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
uint16_t GetConfirmationCode(void) const
ServiceFlow GetServiceFlow(void) const
uint32_t GetSerializedSize(void) const
void SetTransactionId(uint16_t transactionId)
set the transaction ID
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void Serialize(Buffer::Iterator start) const
Cid m_cid
CID.
Definition: mac-messages.h:547
std::string GetName(void) const
uint8_t m_confirmationCode
confirmation code
Definition: mac-messages.h:543
Cid GetCid(void) const
void SetCid(Cid cid)
set the connection identifier
Protocol header serialization and deserialization.
Definition: header.h:43
an EUI-48 address
Definition: mac48-address.h:44
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43.
Definition: mac-messages.h:44
MessageType
Message type enumeration.
Definition: mac-messages.h:48
void Serialize(Buffer::Iterator start) const
Definition: mac-messages.cc:98
virtual ~ManagementMessageType(void)
Definition: mac-messages.cc:45
void Print(std::ostream &os) const
Definition: mac-messages.cc:86
uint8_t GetType(void) const
Get type field.
Definition: mac-messages.cc:56
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mac-messages.cc:80
std::string GetName(void) const
Definition: mac-messages.cc:62
static TypeId GetTypeId(void)
Get the type ID.
Definition: mac-messages.cc:68
void SetType(uint8_t type)
Set type field.
Definition: mac-messages.cc:50
uint32_t GetSerializedSize(void) const
Definition: mac-messages.cc:92
uint32_t Deserialize(Buffer::Iterator start)
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...
Definition: mac-messages.h:643
uint8_t m_rangingAnomalies
ranging anomalies
Definition: mac-messages.h:703
Mac48Address GetMacAddress(void) const
Get MAC address field.
void SetReqDlBurstProfile(uint8_t reqDlBurstProfile)
Set request DL burst profile field.
uint8_t GetRangingAnomalies(void) const
Get ranging anomalies field.
static TypeId GetTypeId(void)
Get the type ID.
uint8_t GetReqDlBurstProfile(void) const
Get request DL burst profile field.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void SetRangingAnomalies(uint8_t rangingAnomalies)
Set ranging anomalies field.
void Serialize(Buffer::Iterator start) const
virtual ~RngReq(void)
void PrintDebug(void) const
Print debug function.
uint8_t m_reserved
changed as per the amendment 802.16e-2005
Definition: mac-messages.h:698
void SetMacAddress(Mac48Address macAddress)
Set MAC address field.
void Print(std::ostream &os) const
uint8_t m_reqDlBurstProfile
request DL burst profile
Definition: mac-messages.h:701
std::string GetName(void) const
Get name field.
uint32_t GetSerializedSize(void) const
uint32_t Deserialize(Buffer::Iterator start)
Mac48Address m_macAddress
MAC address.
Definition: mac-messages.h:702
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Definition: mac-messages.h:122
void Serialize(Buffer::Iterator start) const
Mac48Address GetMacAddress(void) const
void SetMacAddress(Mac48Address macAddress)
set the MAC address
Mac48Address m_macAddress
MAC address.
Definition: mac-messages.h:325
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t m_dlOperBurstProfile
This parameter is sent in response to the RNG-REQ Requested Downlink Burst Profile parameter.
Definition: mac-messages.h:323
uint32_t Deserialize(Buffer::Iterator start)
uint8_t GetRangStatus(void) const
Cid m_primaryCid
primary CID
Definition: mac-messages.h:327
void SetUlChnlIdOverride(uint8_t ulChnlIdOverride)
set the identifier of the uplink channel with which the SS is to redo initial ranging
uint8_t m_aasBdcastPermission
AAS broadcast permission.
Definition: mac-messages.h:328
uint32_t GetSerializedSize(void) const
uint8_t m_rangStatus
range status.
Definition: mac-messages.h:307
void SetBasicCid(Cid basicCid)
set basic CID.
Cid GetBasicCid(void) const
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 Print(std::ostream &os) const
static TypeId GetTypeId(void)
Register this type.
uint32_t GetTimingAdjust(void) const
void SetAasBdcastPermission(uint8_t aasBdcastPermission)
set AAS broadcast permission.
void SetDlOperBurstProfile(uint16_t dlOperBurstProfile)
set the DL oper burst profile
Cid GetPrimaryCid(void) const
uint32_t GetDlFreqOverride(void) const
void SetPrimaryCid(Cid primaryCid)
set primary CID.
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 SetRangSubchnl(uint8_t rangSubchnl)
set range sub channel.
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
void SetPowerLevelAdjust(uint8_t powerLevelAdjust)
set the relative change in transmission power level that the SS should make in order that transmissio...
void SetInitRangOppNumber(uint8_t initRangOppNumber)
set initial range opp number.
void SetTimingAdjust(uint32_t timingAdjust)
set the Tx timing offset adjustment (signed 32-bit).
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
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
void SetFrameNumber(uint32_t frameNumber)
set frame number.
uint8_t GetInitRangOppNumber(void) const
uint8_t GetAasBdcastPermission(void) const
void SetDlFreqOverride(uint32_t dlFreqOverride)
set the Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
void SetOffsetFreqAdjust(uint32_t offsetFreqAdjust)
set the relative change in transmission frequency that the SS should take in order to better match th...
uint8_t GetRangSubchnl(void) const
std::string GetName(void) const
uint16_t GetDlOperBurstProfile(void) const
uint8_t m_reserved
changed as per the amendment 802.16e-2005
Definition: mac-messages.h:280
uint32_t GetOffsetFreqAdjust(void) const
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
uint32_t GetFrameNumber(void) const
Cid m_basicCid
basic CID
Definition: mac-messages.h:326
void SetRangStatus(uint8_t rangStatus)
set the range status.
uint32_t m_timingAdjust
Tx timing offset adjustment (signed 32-bit).
Definition: mac-messages.h:288
uint8_t GetUlChnlIdOverride(void) const
uint32_t m_frameNumber
Frame number where the associated RNG_REQ message was detected by the BS.
Definition: mac-messages.h:334
virtual ~RngRsp(void)
uint8_t GetPowerLevelAdjust(void) const
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:40
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1853