A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
airtime-metric.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 IITP RAS
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: Kirill Andreev <andreev@iitp.ru>
19
*/
20
21
#ifndef AIRTIME_METRIC_H
22
#define AIRTIME_METRIC_H
23
24
#include "ns3/mesh-wifi-interface-mac.h"
25
#include "ns3/wifi-mac-header.h"
26
27
namespace
ns3
{
28
namespace
dot11s {
44
class
AirtimeLinkMetricCalculator
:
public
Object
45
{
46
public
:
47
AirtimeLinkMetricCalculator
();
52
static
TypeId
GetTypeId
();
69
uint32_t
CalculateMetric
(
Mac48Address
peerAddress,
Ptr<MeshWifiInterfaceMac>
mac
);
70
private
:
75
void
SetTestLength
(uint16_t testLength);
80
void
SetHeaderTid
(uint8_t tid);
81
82
Ptr<Packet>
m_testFrame
;
83
WifiMacHeader
m_testHeader
;
84
};
85
}
// namespace dot11s
86
}
// namespace ns3
87
#endif
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:44
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:88
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition:
wifi-mac-header.h:85
ns3::dot11s::AirtimeLinkMetricCalculator
Airtime link metric calculator.
Definition:
airtime-metric.h:45
ns3::dot11s::AirtimeLinkMetricCalculator::m_testFrame
Ptr< Packet > m_testFrame
test frame
Definition:
airtime-metric.h:82
ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric
uint32_t CalculateMetric(Mac48Address peerAddress, Ptr< MeshWifiInterfaceMac > mac)
Airtime link metric is defined in Section 13.9 of IEEE 802.11-2012 as:
Definition:
airtime-metric.cc:69
ns3::dot11s::AirtimeLinkMetricCalculator::SetHeaderTid
void SetHeaderTid(uint8_t tid)
Set header TID from the Dot11MetricTid attribute.
Definition:
airtime-metric.cc:56
ns3::dot11s::AirtimeLinkMetricCalculator::m_testHeader
WifiMacHeader m_testHeader
test header
Definition:
airtime-metric.h:83
ns3::dot11s::AirtimeLinkMetricCalculator::AirtimeLinkMetricCalculator
AirtimeLinkMetricCalculator()
Definition:
airtime-metric.cc:52
ns3::dot11s::AirtimeLinkMetricCalculator::SetTestLength
void SetTestLength(uint16_t testLength)
Set number of bytes in test frame (a constant 1024 in the standard)
Definition:
airtime-metric.cc:64
ns3::dot11s::AirtimeLinkMetricCalculator::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
airtime-metric.cc:29
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
third.mac
mac
Definition:
third.py:99
src
mesh
model
dot11s
airtime-metric.h
Generated on Tue Feb 6 2024 19:21:24 for ns-3 by
1.9.1