A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
radiotap-header.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 CTTC
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, Include., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Nicola Baldo <nbaldo@cttc.es>
19
*/
20
21
#ifndef RADIOTAP_HEADER_H
22
#define RADIOTAP_HEADER_H
23
24
25
#include <ns3/header.h>
26
27
namespace
ns3
{
28
48
class
RadiotapHeader
:
public
Header
49
{
50
public
:
51
RadiotapHeader
();
56
static
TypeId
GetTypeId
(
void
);
57
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
58
66
virtual
uint32_t
GetSerializedSize
(
void
)
const
;
67
76
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
77
87
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start);
88
102
virtual
void
Print
(std::ostream &os)
const
;
103
112
void
SetTsft
(uint64_t tsft);
113
122
uint64_t
GetTsft
(
void
)
const
;
123
124
enum
{
125
FRAME_FLAG_NONE
= 0x00,
126
FRAME_FLAG_CFP
= 0x01,
127
FRAME_FLAG_SHORT_PREAMBLE
= 0x02,
128
FRAME_FLAG_WEP
= 0x04,
129
FRAME_FLAG_FRAGMENTED
= 0x08,
130
FRAME_FLAG_FCS_INCLUDED
= 0x10,
131
FRAME_FLAG_DATA_PADDING
= 0x20,
132
FRAME_FLAG_BAD_FCS
= 0x40,
133
FRAME_FLAG_SHORT_GUARD
= 0x80
134
};
135
140
void
SetFrameFlags
(uint8_t flags);
141
147
uint8_t
GetFrameFlags
(
void
)
const
;
148
153
void
SetRate
(uint8_t rate);
154
159
uint8_t
GetRate
(
void
)
const
;
160
161
enum
{
162
CHANNEL_FLAG_NONE
= 0x0000,
163
CHANNEL_FLAG_TURBO
= 0x0010,
164
CHANNEL_FLAG_CCK
= 0x0020,
165
CHANNEL_FLAG_OFDM
= 0x0040,
166
CHANNEL_FLAG_SPECTRUM_2GHZ
= 0x0080,
167
CHANNEL_FLAG_SPECTRUM_5GHZ
= 0x0100,
168
CHANNEL_FLAG_PASSIVE
= 0x0200,
169
CHANNEL_FLAG_DYNAMIC
= 0x0400,
170
CHANNEL_FLAG_GFSK
= 0x0800
171
};
172
179
void
SetChannelFrequencyAndFlags
(uint16_t frequency, uint16_t flags);
180
185
uint16_t
GetChannelFrequency
(
void
)
const
;
186
192
uint16_t
GetChannelFlags
(
void
)
const
;
193
201
void
SetAntennaSignalPower
(
double
signal);
202
210
uint8_t
GetAntennaSignalPower
(
void
)
const
;
211
219
void
SetAntennaNoisePower
(
double
noise);
220
228
uint8_t
GetAntennaNoisePower
(
void
)
const
;
229
230
private
:
231
enum
{
232
RADIOTAP_TSFT
= 0x00000001,
233
RADIOTAP_FLAGS
= 0x00000002,
234
RADIOTAP_RATE
= 0x00000004,
235
RADIOTAP_CHANNEL
= 0x00000008,
236
RADIOTAP_FHSS
= 0x00000010,
237
RADIOTAP_DBM_ANTSIGNAL
= 0x00000020,
238
RADIOTAP_DBM_ANTNOISE
= 0x00000040,
239
RADIOTAP_LOCK_QUALITY
= 0x00000080,
240
RADIOTAP_TX_ATTENUATION
= 0x00000100,
241
RADIOTAP_DB_TX_ATTENUATION
= 0x00000200,
242
RADIOTAP_DBM_TX_POWER
= 0x00000200,
243
RADIOTAP_ANTENNA
= 0x00000400,
244
RADIOTAP_DB_ANTSIGNAL
= 0x00000800,
245
RADIOTAP_DB_ANTNOISE
= 0x00001000,
246
RADIOTAP_EXT
= 0x10000000
247
};
248
249
uint16_t
m_length
;
250
uint32_t
m_present
;
251
252
uint64_t
m_tsft
;
253
uint8_t
m_flags
;
254
uint8_t
m_rate
;
255
uint16_t
m_channelFreq
;
256
uint16_t
m_channelFlags
;
257
int8_t
m_antennaSignal
;
258
int8_t
m_antennaNoise
;
259
};
260
261
}
// namespace ns3
262
263
#endif
/* RADIOTAP_HEADER_H */
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
ns3::RadiotapHeader::CHANNEL_FLAG_PASSIVE
Only passive scan allowed.
Definition:
radiotap-header.h:168
ns3::RadiotapHeader::FRAME_FLAG_SHORT_PREAMBLE
Frame sent/received with short preamble.
Definition:
radiotap-header.h:127
ns3::RadiotapHeader::CHANNEL_FLAG_SPECTRUM_2GHZ
2 GHz spectrum channel
Definition:
radiotap-header.h:166
ns3::RadiotapHeader
Radiotap header implementation.
Definition:
radiotap-header.h:48
ns3::RadiotapHeader::GetTsft
uint64_t GetTsft(void) const
Get the Time Synchronization Function Timer (TSFT) value.
Definition:
radiotap-header.cc:247
ns3::RadiotapHeader::Print
virtual void Print(std::ostream &os) const
This method is used by Packet::Print to print the content of the header as ascii data to a C++ output...
Definition:
radiotap-header.cc:219
ns3::RadiotapHeader::CHANNEL_FLAG_DYNAMIC
Dynamic CCK-OFDM channel.
Definition:
radiotap-header.h:169
ns3::RadiotapHeader::GetRate
uint8_t GetRate(void) const
Get the transmit/receive channel frequency in units of megahertz.
Definition:
radiotap-header.cc:291
visualizer.core.start
def start()
Definition:
core.py:1482
ns3::RadiotapHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet...
Definition:
radiotap-header.cc:134
ns3::RadiotapHeader::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
This method is used by Packet::AddHeader to store the header into the byte buffer of a packet...
Definition:
radiotap-header.cc:64
ns3::RadiotapHeader::RADIOTAP_TSFT
Definition:
radiotap-header.h:232
ns3::RadiotapHeader::m_channelFreq
uint16_t m_channelFreq
Tx/Rx frequency in MHz.
Definition:
radiotap-header.h:255
ns3::RadiotapHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
radiotap-header.cc:58
ns3::RadiotapHeader::RADIOTAP_DB_TX_ATTENUATION
Definition:
radiotap-header.h:241
ns3::RadiotapHeader::RADIOTAP_FHSS
Definition:
radiotap-header.h:236
ns3::RadiotapHeader::SetAntennaNoisePower
void SetAntennaNoisePower(double noise)
Set the RF noise power at the antenna as a decibel difference from an arbitrary, fixed reference...
Definition:
radiotap-header.cc:361
ns3::RadiotapHeader::GetAntennaNoisePower
uint8_t GetAntennaNoisePower(void) const
Get the RF noise power at the antenna as a decibel difference from an arbitrary, fixed reference...
Definition:
radiotap-header.cc:387
ns3::RadiotapHeader::SetTsft
void SetTsft(uint64_t tsft)
Set the Time Synchronization Function Timer (TSFT) value.
Definition:
radiotap-header.cc:232
ns3::RadiotapHeader::FRAME_FLAG_CFP
Frame sent/received during CFP.
Definition:
radiotap-header.h:126
ns3::RadiotapHeader::RADIOTAP_CHANNEL
Definition:
radiotap-header.h:235
ns3::RadiotapHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
radiotap-header.cc:46
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::RadiotapHeader::FRAME_FLAG_NONE
No flags set.
Definition:
radiotap-header.h:125
ns3::RadiotapHeader::RADIOTAP_DB_ANTNOISE
Definition:
radiotap-header.h:245
ns3::RadiotapHeader::m_tsft
uint64_t m_tsft
Time Synchronization Function Timer (when the first bit of the MPDU arrived at the MAC) ...
Definition:
radiotap-header.h:252
ns3::RadiotapHeader::SetChannelFrequencyAndFlags
void SetChannelFrequencyAndFlags(uint16_t frequency, uint16_t flags)
Set the transmit/receive channel frequency and flags.
Definition:
radiotap-header.cc:298
ns3::RadiotapHeader::RADIOTAP_DBM_TX_POWER
Definition:
radiotap-header.h:242
ns3::RadiotapHeader::m_antennaNoise
int8_t m_antennaNoise
RF noise power at the antenna, dB difference from an arbitrary, fixed reference.
Definition:
radiotap-header.h:258
ns3::RadiotapHeader::m_channelFlags
uint16_t m_channelFlags
Tx/Rx channel flags.
Definition:
radiotap-header.h:256
ns3::RadiotapHeader::RADIOTAP_DBM_ANTNOISE
Definition:
radiotap-header.h:238
ns3::RadiotapHeader::SetFrameFlags
void SetFrameFlags(uint8_t flags)
Set the frame flags of the transmitted or received frame.
Definition:
radiotap-header.cc:254
ns3::RadiotapHeader::FRAME_FLAG_WEP
Frame sent/received with WEP encryption.
Definition:
radiotap-header.h:128
ns3::RadiotapHeader::SetRate
void SetRate(uint8_t rate)
Set the transmit/receive channel frequency in units of megahertz.
Definition:
radiotap-header.cc:276
ns3::RadiotapHeader::RADIOTAP_RATE
Definition:
radiotap-header.h:234
ns3::RadiotapHeader::m_antennaSignal
int8_t m_antennaSignal
RF signal power at the antenna, dB difference from an arbitrary, fixed reference. ...
Definition:
radiotap-header.h:257
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::RadiotapHeader::m_flags
uint8_t m_flags
Properties of transmitted and received frames.
Definition:
radiotap-header.h:253
ns3::RadiotapHeader::GetFrameFlags
uint8_t GetFrameFlags(void) const
Get the frame flags of the transmitted or received frame.
Definition:
radiotap-header.cc:269
ns3::RadiotapHeader::FRAME_FLAG_FCS_INCLUDED
Frame includes FCS.
Definition:
radiotap-header.h:130
ns3::RadiotapHeader::FRAME_FLAG_FRAGMENTED
Frame sent/received with fragmentation.
Definition:
radiotap-header.h:129
ns3::RadiotapHeader::GetChannelFlags
uint16_t GetChannelFlags(void) const
Get the channel flags of the transmitted or received frame.
Definition:
radiotap-header.cc:321
ns3::RadiotapHeader::FRAME_FLAG_DATA_PADDING
Frame has padding between 802.11 header and payload (to 32-bit boundary)
Definition:
radiotap-header.h:131
ns3::RadiotapHeader::m_present
uint32_t m_present
bits describing which fields follow header
Definition:
radiotap-header.h:250
ns3::RadiotapHeader::RADIOTAP_DBM_ANTSIGNAL
Definition:
radiotap-header.h:237
ns3::RadiotapHeader::CHANNEL_FLAG_CCK
CCK channel.
Definition:
radiotap-header.h:164
ns3::RadiotapHeader::FRAME_FLAG_BAD_FCS
Frame failed FCS check.
Definition:
radiotap-header.h:132
ns3::RadiotapHeader::RADIOTAP_ANTENNA
Definition:
radiotap-header.h:243
ns3::RadiotapHeader::RADIOTAP_EXT
Definition:
radiotap-header.h:246
ns3::RadiotapHeader::CHANNEL_FLAG_TURBO
Turbo Channel.
Definition:
radiotap-header.h:163
ns3::RadiotapHeader::GetAntennaSignalPower
uint8_t GetAntennaSignalPower(void) const
Get the RF signal power at the antenna as a decibel difference from an arbitrary, fixed reference...
Definition:
radiotap-header.cc:354
ns3::RadiotapHeader::RADIOTAP_TX_ATTENUATION
Definition:
radiotap-header.h:240
ns3::RadiotapHeader::RADIOTAP_FLAGS
Definition:
radiotap-header.h:233
ns3::RadiotapHeader::CHANNEL_FLAG_NONE
No flags set.
Definition:
radiotap-header.h:162
ns3::RadiotapHeader::CHANNEL_FLAG_GFSK
GFSK channel (FHSS PHY)
Definition:
radiotap-header.h:170
ns3::RadiotapHeader::m_length
uint16_t m_length
entire length of radiotap data + header
Definition:
radiotap-header.h:249
ns3::RadiotapHeader::m_rate
uint8_t m_rate
TX/RX data rate in units of 500 kbps.
Definition:
radiotap-header.h:254
ns3::RadiotapHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
This method is used by Packet::AddHeader to store the header into the byte buffer of a packet...
Definition:
radiotap-header.cc:71
ns3::RadiotapHeader::CHANNEL_FLAG_SPECTRUM_5GHZ
5 GHz spectrum channel
Definition:
radiotap-header.h:167
ns3::RadiotapHeader::RADIOTAP_LOCK_QUALITY
Definition:
radiotap-header.h:239
ns3::RadiotapHeader::RADIOTAP_DB_ANTSIGNAL
Definition:
radiotap-header.h:244
ns3::RadiotapHeader::GetChannelFrequency
uint16_t GetChannelFrequency(void) const
Get the transmit/receive data rate in units of 500 kbps.
Definition:
radiotap-header.cc:314
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:57
ns3::RadiotapHeader::RadiotapHeader
RadiotapHeader()
Definition:
radiotap-header.cc:32
ns3::RadiotapHeader::FRAME_FLAG_SHORT_GUARD
Frame used short guard interval (HT)
Definition:
radiotap-header.h:133
ns3::RadiotapHeader::CHANNEL_FLAG_OFDM
OFDM channel.
Definition:
radiotap-header.h:165
ns3::RadiotapHeader::SetAntennaSignalPower
void SetAntennaSignalPower(double signal)
Set the RF signal power at the antenna as a decibel difference from an arbitrary, fixed reference...
Definition:
radiotap-header.cc:328
src
network
utils
radiotap-header.h
Generated on Thu Aug 13 2015 14:28:07 for ns-3 by
1.8.9.1