A Discrete-Event Network Simulator
API
mac-messages.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008,2009 INRIA, UDcast
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19 * <amine.ismail@UDcast.com>
20 */
21
22/*
23 *This file does not contain all MAC messages, the rest of MAC messages have
24 *This been categorized as DL and UL messages and are placed in
25 *This dl-mac-messages.h and ul-mac-messages.h files.
26 */
27
28#ifndef MANAGEMENT_MESSAGE_TYPE_H
29#define MANAGEMENT_MESSAGE_TYPE_H
30
31#include "ns3/header.h"
32
33#include <stdint.h>
34
35namespace ns3
36{
37
44{
45 public:
48 {
60 };
61
69 ~ManagementMessageType() override;
74 void SetType(uint8_t type);
79 uint8_t GetType() const;
80
82 std::string GetName() const;
87 static TypeId GetTypeId();
88 TypeId GetInstanceTypeId() const override;
89 void Print(std::ostream& os) const override;
90 uint32_t GetSerializedSize() const override;
91 void Serialize(Buffer::Iterator start) const override;
93
94 private:
95 uint8_t m_type;
96};
97
98} // namespace ns3
99
100#endif /* MANAGEMENT_MESSAGE_TYPE_H */
101
102// ---------------------------------------------------------------------
103
104#ifndef RNG_RSP_H
105#define RNG_RSP_H
106
107#include "cid.h"
108#include "service-flow.h"
109
110#include "ns3/header.h"
111#include "ns3/mac48-address.h"
112
113#include <stdint.h>
114
115namespace ns3
116{
117
124class RngRsp : public Header
125{
126 public:
127 RngRsp();
128 ~RngRsp() override;
134 void SetTimingAdjust(uint32_t timingAdjust);
142 void SetPowerLevelAdjust(uint8_t powerLevelAdjust);
149 void SetOffsetFreqAdjust(uint32_t offsetFreqAdjust);
154 void SetRangStatus(uint8_t rangStatus);
160 void SetDlFreqOverride(uint32_t dlFreqOverride);
165 void SetUlChnlIdOverride(uint8_t ulChnlIdOverride);
170 void SetDlOperBurstProfile(uint16_t dlOperBurstProfile);
175 void SetMacAddress(Mac48Address macAddress);
176
181 void SetBasicCid(Cid basicCid);
186 void SetPrimaryCid(Cid primaryCid);
187
192 void SetAasBdcastPermission(uint8_t aasBdcastPermission);
197 void SetFrameNumber(uint32_t frameNumber);
202 void SetInitRangOppNumber(uint8_t initRangOppNumber);
207 void SetRangSubchnl(uint8_t rangSubchnl);
219 uint8_t GetPowerLevelAdjust() const;
229 uint8_t GetRangStatus() const;
238 uint8_t GetUlChnlIdOverride() const;
243 uint16_t GetDlOperBurstProfile() const;
251 Cid GetBasicCid() const;
255 Cid GetPrimaryCid() const;
259 uint8_t GetAasBdcastPermission() const;
263 uint32_t GetFrameNumber() const;
267 uint8_t GetInitRangOppNumber() const;
271 uint8_t GetRangSubchnl() const;
272
276 std::string GetName() const;
281 static TypeId GetTypeId();
282 TypeId GetInstanceTypeId() const override;
283 void Print(std::ostream& os) const override;
284 uint32_t GetSerializedSize() const override;
285 void Serialize(Buffer::Iterator start) const override;
287
288 private:
289 uint8_t m_reserved;
290
291 // TLV Encoded Information
292
298
306
313
318
321
327
335
340
346
352
358};
359
360} // namespace ns3
361
362#endif /* RNG_RSP_H */
363
364// ---------------------------------------------------------------------
365
366#ifndef DSA_REQ_H
367#define DSA_REQ_H
368
369#include "cid.h"
370#include "service-flow.h"
371
372#include "ns3/buffer.h"
373#include "ns3/header.h"
374
375#include <stdint.h>
376
377namespace ns3
378{
379class serviceFlow;
380
387class DsaReq : public Header
388{
389 public:
390 DsaReq();
391 ~DsaReq() override;
402 void SetTransactionId(uint16_t transactionId);
407 void SetSfid(uint32_t sfid);
412 void SetCid(Cid cid);
425 uint16_t GetTransactionId() const;
429 uint32_t GetSfid() const;
433 Cid GetCid() const;
437 std::string GetName() const;
442 static TypeId GetTypeId();
443 TypeId GetInstanceTypeId() const override;
444 void Print(std::ostream& os) const override;
445 uint32_t GetSerializedSize() const override;
446 void Serialize(Buffer::Iterator start) const override;
448
449 private:
451 // TLV Encoded Information
455};
456
457} // namespace ns3
458
459#endif /* DSA_REQ_H */
460
461// ---------------------------------------------------------------------
462
463#ifndef DSA_RSP_H
464#define DSA_RSP_H
465
466#include "cid.h"
467
468#include "ns3/buffer.h"
469#include "ns3/header.h"
470
471#include <stdint.h>
472
473namespace ns3
474{
475
491class DsaRsp : public Header
492{
493 public:
494 DsaRsp();
495 ~DsaRsp() override;
496
501 void SetTransactionId(uint16_t transactionId);
505 uint16_t GetTransactionId() const;
506
511 void SetConfirmationCode(uint16_t confirmationCode);
515 uint16_t GetConfirmationCode() const;
520 void SetSfid(uint32_t sfid);
524 uint32_t GetSfid() const;
529 void SetCid(Cid cid);
533 Cid GetCid() const;
543
547 std::string GetName() const;
552 static TypeId GetTypeId();
553 TypeId GetInstanceTypeId() const override;
554 void Print(std::ostream& os) const override;
555 uint32_t GetSerializedSize() const override;
556 void Serialize(Buffer::Iterator start) const override;
558
559 private:
562 // TLV Encoded Information
566};
567
568} // namespace ns3
569
570#endif /* DSA_RSP_H */
571
572// ---------------------------------------------------------------------
573
574#ifndef DSA_ACK_H
575#define DSA_ACK_H
576
577#include "ns3/buffer.h"
578#include "ns3/header.h"
579
580#include <stdint.h>
581
582namespace ns3
583{
584
591class DsaAck : public Header
592{
593 public:
594 DsaAck();
595 ~DsaAck() override;
596
601 void SetTransactionId(uint16_t transactionId);
606 uint16_t GetTransactionId() const;
607
612 void SetConfirmationCode(uint16_t confirmationCode);
617 uint16_t GetConfirmationCode() const;
618
623 std::string GetName() const;
628 static TypeId GetTypeId();
629 TypeId GetInstanceTypeId() const override;
630 void Print(std::ostream& os) const override;
631 uint32_t GetSerializedSize() const override;
632 void Serialize(Buffer::Iterator start) const override;
634
635 private:
638};
639
640} // namespace ns3
641
642#endif /* DSA_ACK_H */
643
644// ---------------------------------------------------------------------
645
646#ifndef RNG_REQ_H
647#define RNG_REQ_H
648
649#include "service-flow.h"
650
651#include "ns3/header.h"
652#include "ns3/mac48-address.h"
653
654#include <stdint.h>
655
656namespace ns3
657{
658
665class RngReq : public Header
666{
667 public:
668 RngReq();
669 ~RngReq() override;
670
675 void SetReqDlBurstProfile(uint8_t reqDlBurstProfile);
680 void SetMacAddress(Mac48Address macAddress);
685 void SetRangingAnomalies(uint8_t rangingAnomalies);
686
691 uint8_t GetReqDlBurstProfile() const;
701 uint8_t GetRangingAnomalies() const;
702
707 std::string GetName() const;
712 static TypeId GetTypeId();
713 TypeId GetInstanceTypeId() const override;
714 void Print(std::ostream& os) const override;
716 void PrintDebug() const;
717 uint32_t GetSerializedSize() const override;
718 void Serialize(Buffer::Iterator start) const override;
720
721 private:
722 uint8_t m_reserved;
723
724 // TLV Encoded Information
728};
729
730} // namespace ns3
731
732#endif /* RNG_REQ_H */
iterator in a Buffer instance
Definition: buffer.h:100
Cid class.
Definition: cid.h:37
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:592
uint32_t Deserialize(Buffer::Iterator start) override
void SetConfirmationCode(uint16_t confirmationCode)
Set confirmation code field.
void SetTransactionId(uint16_t transactionId)
Set transaction ID field.
static TypeId GetTypeId()
Get the type ID.
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:636
void Serialize(Buffer::Iterator start) const override
uint32_t GetSerializedSize() const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint16_t GetTransactionId() const
Get transaction ID field.
uint16_t GetConfirmationCode() const
Get confirmation code field.
void Print(std::ostream &os) const override
~DsaAck() override
std::string GetName() const
Get name field.
uint8_t m_confirmationCode
confirmation code
Definition: mac-messages.h:637
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:388
Cid GetCid() const
~DsaReq() override
uint32_t Deserialize(Buffer::Iterator start) override
uint32_t GetSfid() const
void SetTransactionId(uint16_t transactionId)
set the transaction ID
ServiceFlow GetServiceFlow() const
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Cid m_cid
CID.
Definition: mac-messages.h:453
std::string GetName() const
void Print(std::ostream &os) const override
uint16_t GetTransactionId() const
static TypeId GetTypeId()
Get the type ID.
uint32_t GetSerializedSize() const override
ServiceFlow m_serviceFlow
service flow
Definition: mac-messages.h:454
void Serialize(Buffer::Iterator start) const override
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
uint32_t m_sfid
SFID.
Definition: mac-messages.h:452
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:450
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:492
void SetConfirmationCode(uint16_t confirmationCode)
set the confirmation code
static TypeId GetTypeId()
Get the type ID.
uint32_t m_sfid
SFID.
Definition: mac-messages.h:564
uint32_t GetSerializedSize() const override
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
~DsaRsp() override
Cid GetCid() const
ServiceFlow m_serviceFlow
service flow
Definition: mac-messages.h:563
ServiceFlow GetServiceFlow() const
std::string GetName() const
void Serialize(Buffer::Iterator start) const override
void SetSfid(uint32_t sfid)
set the service flow identifier
uint16_t GetTransactionId() const
uint16_t m_transactionId
transaction ID
Definition: mac-messages.h:560
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
uint32_t GetSfid() const
void SetTransactionId(uint16_t transactionId)
set the transaction ID
Cid m_cid
CID.
Definition: mac-messages.h:565
uint16_t GetConfirmationCode() const
uint8_t m_confirmationCode
confirmation code
Definition: mac-messages.h:561
uint32_t Deserialize(Buffer::Iterator start) override
void Print(std::ostream &os) const override
void SetCid(Cid cid)
set the connection identifier
Protocol header serialization and deserialization.
Definition: header.h:44
an EUI-48 address
Definition: mac48-address.h:46
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43.
Definition: mac-messages.h:44
static TypeId GetTypeId()
Get the type ID.
Definition: mac-messages.cc:70
MessageType
Message type enumeration.
Definition: mac-messages.h:48
uint32_t GetSerializedSize() const override
Definition: mac-messages.cc:92
uint32_t Deserialize(Buffer::Iterator start) override
void Print(std::ostream &os) const override
Definition: mac-messages.cc:86
std::string GetName() const
Definition: mac-messages.cc:64
void Serialize(Buffer::Iterator start) const override
Definition: mac-messages.cc:98
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: mac-messages.cc:80
uint8_t GetType() const
Get type field.
Definition: mac-messages.cc:58
void SetType(uint8_t type)
Set type field.
Definition: mac-messages.cc:52
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...
Definition: mac-messages.h:666
uint8_t m_rangingAnomalies
ranging anomalies
Definition: mac-messages.h:727
~RngReq() override
void SetReqDlBurstProfile(uint8_t reqDlBurstProfile)
Set request DL burst profile field.
uint32_t Deserialize(Buffer::Iterator start) override
void Serialize(Buffer::Iterator start) const override
uint8_t GetReqDlBurstProfile() const
Get request DL burst profile field.
void SetRangingAnomalies(uint8_t rangingAnomalies)
Set ranging anomalies field.
uint8_t m_reserved
changed as per the amendment 802.16e-2005
Definition: mac-messages.h:722
void SetMacAddress(Mac48Address macAddress)
Set MAC address field.
uint32_t GetSerializedSize() const override
uint8_t GetRangingAnomalies() const
Get ranging anomalies field.
std::string GetName() const
Get name field.
uint8_t m_reqDlBurstProfile
request DL burst profile
Definition: mac-messages.h:725
void PrintDebug() const
Print debug function.
void Print(std::ostream &os) const override
Mac48Address GetMacAddress() const
Get MAC address field.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
static TypeId GetTypeId()
Get the type ID.
Mac48Address m_macAddress
MAC address.
Definition: mac-messages.h:726
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
Definition: mac-messages.h:125
uint32_t Deserialize(Buffer::Iterator start) override
void SetMacAddress(Mac48Address macAddress)
set the MAC address
Mac48Address m_macAddress
MAC address.
Definition: mac-messages.h:336
uint16_t m_dlOperBurstProfile
This parameter is sent in response to the RNG-REQ Requested Downlink Burst Profile parameter.
Definition: mac-messages.h:334
Mac48Address GetMacAddress() const
uint32_t GetTimingAdjust() const
Cid m_primaryCid
primary CID
Definition: mac-messages.h:338
void SetUlChnlIdOverride(uint8_t ulChnlIdOverride)
set the identifier of the uplink channel with which the SS is to redo initial ranging
Cid GetPrimaryCid() const
uint8_t GetRangSubchnl() const
void Print(std::ostream &os) const override
uint32_t GetSerializedSize() const override
uint8_t m_aasBdcastPermission
AAS broadcast permission.
Definition: mac-messages.h:339
uint8_t m_rangStatus
range status.
Definition: mac-messages.h:317
void SetBasicCid(Cid basicCid)
set basic CID.
uint8_t GetPowerLevelAdjust() const
uint32_t m_dlFreqOverride
Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
Definition: mac-messages.h:320
uint8_t GetRangStatus() const
uint32_t GetOffsetFreqAdjust() const
void Serialize(Buffer::Iterator start) const override
void SetAasBdcastPermission(uint8_t aasBdcastPermission)
set AAS broadcast permission.
void SetDlOperBurstProfile(uint16_t dlOperBurstProfile)
set the DL oper burst profile
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint16_t GetDlOperBurstProfile() 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:351
uint8_t GetUlChnlIdOverride() const
void SetRangSubchnl(uint8_t rangSubchnl)
set range sub channel.
~RngRsp() override
uint8_t m_rangSubchnl
Used to indicate the OFDM subchannel reference that was used to transmit the initial ranging message ...
Definition: mac-messages.h:357
uint32_t GetDlFreqOverride() const
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:326
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:305
void SetFrameNumber(uint32_t frameNumber)
set frame number.
Cid GetBasicCid() const
void SetDlFreqOverride(uint32_t dlFreqOverride)
set the Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
std::string GetName() const
void SetOffsetFreqAdjust(uint32_t offsetFreqAdjust)
set the relative change in transmission frequency that the SS should take in order to better match th...
uint32_t GetFrameNumber() const
uint8_t m_reserved
changed as per the amendment 802.16e-2005
Definition: mac-messages.h:289
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:312
Cid m_basicCid
basic CID
Definition: mac-messages.h:337
void SetRangStatus(uint8_t rangStatus)
set the range status.
uint32_t m_timingAdjust
Tx timing offset adjustment (signed 32-bit).
Definition: mac-messages.h:297
uint8_t GetInitRangOppNumber() const
uint32_t m_frameNumber
Frame number where the associated RNG_REQ message was detected by the BS.
Definition: mac-messages.h:345
uint8_t GetAasBdcastPermission() const
static TypeId GetTypeId()
Register this type.
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1861