A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
lr-wpan-mac-pl-headers.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2019 Ritsumeikan University, Shiga, Japan.
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
* Author: Alberto Gallegos Ramonet <ramonet@fc.ritsumei.ac.jp>
19
*/
20
21
#ifndef LR_WPAN_MAC_PL_HEADERS_H
22
#define LR_WPAN_MAC_PL_HEADERS_H
23
24
#include <ns3/header.h>
25
#include <ns3/mac16-address.h>
26
#include <ns3/mac64-address.h>
27
#include "
lr-wpan-fields.h
"
28
29
30
namespace
ns3
{
31
32
33
39
class
BeaconPayloadHeader
:
public
Header
40
{
41
42
public
:
43
BeaconPayloadHeader
();
48
static
TypeId
GetTypeId
(
void
);
49
TypeId
GetInstanceTypeId
(
void
)
const
;
50
uint32_t
GetSerializedSize
(
void
)
const
;
51
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
52
uint32_t
Deserialize
(
Buffer::Iterator
start
);
53
void
Print
(std::ostream &os)
const
;
58
void
SetSuperframeSpecField
(
SuperframeField
sfrmField);
63
void
SetGtsFields
(
GtsFields
gtsFields);
68
void
SetPndAddrFields
(
PendingAddrFields
pndAddrFields);
73
SuperframeField
GetSuperframeSpecField
(
void
)
const
;
78
GtsFields
GetGtsFields
(
void
)
const
;
83
PendingAddrFields
GetPndAddrFields
(
void
)
const
;
84
85
private
:
89
SuperframeField
m_superframeField
;
93
GtsFields
m_gtsFields
;
97
PendingAddrFields
m_pndAddrFields
;
98
99
};
100
101
107
class
CommandPayloadHeader
:
public
Header
108
{
109
110
public
:
115
enum
MacCommand
116
{
117
ASSOCIATION_REQ
= 0x01,
118
ASSOCIATION_RESP
= 0x02,
119
DISASSOCIATION_NOTIF
= 0x03,
120
DATA_REQ
= 0x04,
121
PANID_CONFLICT
= 0x05,
122
ORPHAN_NOTIF
= 0x06,
123
BEACON_REQ
= 0x07,
124
COOR_REALIGN
= 0x08,
125
GTS_REQ
= 0x09,
126
CMD_RESERVED
= 0xff
127
};
128
129
130
CommandPayloadHeader
(
void
);
135
CommandPayloadHeader
(
enum
MacCommand
macCmd);
140
static
TypeId
GetTypeId
(
void
);
141
TypeId
GetInstanceTypeId
(
void
)
const
;
142
uint32_t
GetSerializedSize
(
void
)
const
;
143
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
144
uint32_t
Deserialize
(
Buffer::Iterator
start
);
145
void
Print
(std::ostream &os)
const
;
146
151
void
SetCommandFrameType
(
MacCommand
macCmd);
156
MacCommand
GetCommandFrameType
(
void
)
const
;
157
158
159
private
:
161
uint8_t
m_cmdFrameId
;
162
163
};
164
165
}
// namespace ns3
166
167
#endif
/* LR_WPAN_MAC_PL_HEADERS_H */
ns3::BeaconPayloadHeader
Implements the header for the MAC payload beacon frame according to the IEEE 802.15....
Definition:
lr-wpan-mac-pl-headers.h:40
ns3::BeaconPayloadHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
lr-wpan-mac-pl-headers.cc:65
ns3::BeaconPayloadHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
lr-wpan-mac-pl-headers.cc:37
ns3::BeaconPayloadHeader::m_gtsFields
GtsFields m_gtsFields
GTS Fields.
Definition:
lr-wpan-mac-pl-headers.h:93
ns3::BeaconPayloadHeader::m_pndAddrFields
PendingAddrFields m_pndAddrFields
Pending Address Fields.
Definition:
lr-wpan-mac-pl-headers.h:97
ns3::BeaconPayloadHeader::BeaconPayloadHeader
BeaconPayloadHeader()
Definition:
lr-wpan-mac-pl-headers.cc:30
ns3::BeaconPayloadHeader::GetGtsFields
GtsFields GetGtsFields(void) const
Get the Guaranteed Time Slots (GTS) fields from the beacon payload header.
Definition:
lr-wpan-mac-pl-headers.cc:119
ns3::BeaconPayloadHeader::m_superframeField
SuperframeField m_superframeField
Superframe Specification Field.
Definition:
lr-wpan-mac-pl-headers.h:89
ns3::BeaconPayloadHeader::GetSuperframeSpecField
SuperframeField GetSuperframeSpecField(void) const
Get the superframe specification field from the beacon payload header.
Definition:
lr-wpan-mac-pl-headers.cc:113
ns3::BeaconPayloadHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
lr-wpan-mac-pl-headers.cc:48
ns3::BeaconPayloadHeader::Print
void Print(std::ostream &os) const
Definition:
lr-wpan-mac-pl-headers.cc:86
ns3::BeaconPayloadHeader::SetSuperframeSpecField
void SetSuperframeSpecField(SuperframeField sfrmField)
Set the superframe specification field to the beacon payload header.
Definition:
lr-wpan-mac-pl-headers.cc:95
ns3::BeaconPayloadHeader::SetGtsFields
void SetGtsFields(GtsFields gtsFields)
Set the superframe Guaranteed Time Slot (GTS) fields to the beacon payload header.
Definition:
lr-wpan-mac-pl-headers.cc:101
ns3::BeaconPayloadHeader::GetPndAddrFields
PendingAddrFields GetPndAddrFields(void) const
Get the pending address fields from the beacon payload header.
Definition:
lr-wpan-mac-pl-headers.cc:125
ns3::BeaconPayloadHeader::SetPndAddrFields
void SetPndAddrFields(PendingAddrFields pndAddrFields)
Set the superframe Pending Address fields to the beacon payload header.
Definition:
lr-wpan-mac-pl-headers.cc:107
ns3::BeaconPayloadHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
lr-wpan-mac-pl-headers.cc:54
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:99
ns3::CommandPayloadHeader
Implements the header for the MAC payload command frame according to the IEEE 802....
Definition:
lr-wpan-mac-pl-headers.h:108
ns3::CommandPayloadHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
lr-wpan-mac-pl-headers.cc:160
ns3::CommandPayloadHeader::m_cmdFrameId
uint8_t m_cmdFrameId
The command Frame Identifier.
Definition:
lr-wpan-mac-pl-headers.h:161
ns3::CommandPayloadHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const
Definition:
lr-wpan-mac-pl-headers.cc:166
ns3::CommandPayloadHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
lr-wpan-mac-pl-headers.cc:174
ns3::CommandPayloadHeader::MacCommand
MacCommand
The MAC command frames.
Definition:
lr-wpan-mac-pl-headers.h:116
ns3::CommandPayloadHeader::ASSOCIATION_RESP
@ ASSOCIATION_RESP
Association response (RFD true: Rx)
Definition:
lr-wpan-mac-pl-headers.h:118
ns3::CommandPayloadHeader::BEACON_REQ
@ BEACON_REQ
Beacon Request (RFD true: none )
Definition:
lr-wpan-mac-pl-headers.h:123
ns3::CommandPayloadHeader::DATA_REQ
@ DATA_REQ
Data Request (RFD true: Tx)
Definition:
lr-wpan-mac-pl-headers.h:120
ns3::CommandPayloadHeader::ORPHAN_NOTIF
@ ORPHAN_NOTIF
Orphan Notification (RFD true: Tx)
Definition:
lr-wpan-mac-pl-headers.h:122
ns3::CommandPayloadHeader::ASSOCIATION_REQ
@ ASSOCIATION_REQ
Association request (RFD true: Tx)
Definition:
lr-wpan-mac-pl-headers.h:117
ns3::CommandPayloadHeader::DISASSOCIATION_NOTIF
@ DISASSOCIATION_NOTIF
Disassociation notification (RFD true: TX, Rx)
Definition:
lr-wpan-mac-pl-headers.h:119
ns3::CommandPayloadHeader::COOR_REALIGN
@ COOR_REALIGN
Coordinator Realignment (RFD true: Rx)
Definition:
lr-wpan-mac-pl-headers.h:124
ns3::CommandPayloadHeader::PANID_CONFLICT
@ PANID_CONFLICT
Pan ID conflict notification (RFD true: Tx)
Definition:
lr-wpan-mac-pl-headers.h:121
ns3::CommandPayloadHeader::CMD_RESERVED
@ CMD_RESERVED
Reserved.
Definition:
lr-wpan-mac-pl-headers.h:126
ns3::CommandPayloadHeader::GTS_REQ
@ GTS_REQ
GTS Request (RFD true: none)
Definition:
lr-wpan-mac-pl-headers.h:125
ns3::CommandPayloadHeader::CommandPayloadHeader
CommandPayloadHeader(void)
Definition:
lr-wpan-mac-pl-headers.cc:135
ns3::CommandPayloadHeader::SetCommandFrameType
void SetCommandFrameType(MacCommand macCmd)
Set the command frame type.
Definition:
lr-wpan-mac-pl-headers.cc:196
ns3::CommandPayloadHeader::Print
void Print(std::ostream &os) const
Definition:
lr-wpan-mac-pl-headers.cc:190
ns3::CommandPayloadHeader::GetCommandFrameType
MacCommand GetCommandFrameType(void) const
Get the command frame type.
Definition:
lr-wpan-mac-pl-headers.cc:203
ns3::CommandPayloadHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
lr-wpan-mac-pl-headers.cc:149
ns3::GtsFields
Represent the GTS information fields.
Definition:
lr-wpan-fields.h:176
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:43
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::PendingAddrFields
Represent the Pending Address Specification field.
Definition:
lr-wpan-fields.h:258
ns3::SuperframeField
Represent the Superframe Specification information field.
Definition:
lr-wpan-fields.h:55
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
lr-wpan-fields.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
visualizer.core.start
def start()
Definition:
core.py:1853
src
lr-wpan
model
lr-wpan-mac-pl-headers.h
Generated on Tue Feb 6 2024 19:21:21 for ns-3 by
1.9.1