A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
ie-dot11s-metric-report.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008,2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Kirill Andreev <andreev@iitp.ru>
7
*/
8
9
#ifndef METRIC_REPORT_H
10
#define METRIC_REPORT_H
11
12
#include "ns3/buffer.h"
13
#include "ns3/mesh-information-element-vector.h"
14
15
#include <stdint.h>
16
17
namespace
ns3
18
{
19
namespace
dot11s
20
{
21
/**
22
* \brief a IEEE 802.11s Mesh ID 7.3.2.88 of 802.11s draft 3.0
23
*
24
*/
25
class
IeLinkMetricReport
:
public
WifiInformationElement
26
{
27
public
:
28
IeLinkMetricReport
();
29
/**
30
* Constructor
31
*
32
* \param metric the metric
33
*/
34
IeLinkMetricReport
(
uint32_t
metric);
35
/**
36
* Set metric value
37
* \param metric the metric
38
*/
39
void
SetMetric
(
uint32_t
metric);
40
/**
41
* Get metric value
42
* \returns the metric
43
*/
44
uint32_t
GetMetric
()
const
;
45
46
// Inherited from WifiInformationElement
47
WifiInformationElementId
ElementId
()
const override
;
48
void
SerializeInformationField
(
Buffer::Iterator
i)
const override
;
49
uint16_t
DeserializeInformationField
(
Buffer::Iterator
start, uint16_t length)
override
;
50
void
Print
(std::ostream& os)
const override
;
51
uint16_t
GetInformationFieldSize
()
const override
;
52
53
private
:
54
uint32_t
m_metric
;
///< metric
55
/**
56
* equality operator
57
*
58
* \param a lhs
59
* \param b lhs
60
* \returns true if equal
61
*/
62
friend
bool
operator==
(
const
IeLinkMetricReport
& a,
const
IeLinkMetricReport
& b);
63
/**
64
* greater than operator
65
*
66
* \param a lhs
67
* \param b lhs
68
* \returns true if equal
69
*/
70
friend
bool
operator>
(
const
IeLinkMetricReport
& a,
const
IeLinkMetricReport
& b);
71
/**
72
* less than operator
73
*
74
* \param a lhs
75
* \param b lhs
76
* \returns true if equal
77
*/
78
friend
bool
operator<
(
const
IeLinkMetricReport
& a,
const
IeLinkMetricReport
& b);
79
};
80
81
bool
operator==
(
const
IeLinkMetricReport
& a,
const
IeLinkMetricReport
& b);
82
bool
operator>
(
const
IeLinkMetricReport
& a,
const
IeLinkMetricReport
& b);
83
bool
operator<
(
const
IeLinkMetricReport
& a,
const
IeLinkMetricReport
& b);
84
std::ostream&
operator<<
(std::ostream& os,
const
IeLinkMetricReport
& linkMetricReport);
85
}
// namespace dot11s
86
}
// namespace ns3
87
#endif
/* METRIC_REPORT_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standard.
Definition
wifi-information-element.h:278
ns3::dot11s::IeLinkMetricReport
a IEEE 802.11s Mesh ID 7.3.2.88 of 802.11s draft 3.0
Definition
ie-dot11s-metric-report.h:26
ns3::dot11s::IeLinkMetricReport::operator<
friend bool operator<(const IeLinkMetricReport &a, const IeLinkMetricReport &b)
less than operator
Definition
ie-dot11s-metric-report.cc:78
ns3::dot11s::IeLinkMetricReport::m_metric
uint32_t m_metric
metric
Definition
ie-dot11s-metric-report.h:54
ns3::dot11s::IeLinkMetricReport::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition
ie-dot11s-metric-report.cc:28
ns3::dot11s::IeLinkMetricReport::Print
void Print(std::ostream &os) const override
Generate human-readable form of IE.
Definition
ie-dot11s-metric-report.cc:66
ns3::dot11s::IeLinkMetricReport::operator==
friend bool operator==(const IeLinkMetricReport &a, const IeLinkMetricReport &b)
equality operator
Definition
ie-dot11s-metric-report.cc:72
ns3::dot11s::IeLinkMetricReport::GetMetric
uint32_t GetMetric() const
Get metric value.
Definition
ie-dot11s-metric-report.cc:40
ns3::dot11s::IeLinkMetricReport::GetInformationFieldSize
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition
ie-dot11s-metric-report.cc:34
ns3::dot11s::IeLinkMetricReport::SetMetric
void SetMetric(uint32_t metric)
Set metric value.
Definition
ie-dot11s-metric-report.cc:46
ns3::dot11s::IeLinkMetricReport::IeLinkMetricReport
IeLinkMetricReport()
Definition
ie-dot11s-metric-report.cc:17
ns3::dot11s::IeLinkMetricReport::SerializeInformationField
void SerializeInformationField(Buffer::Iterator i) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition
ie-dot11s-metric-report.cc:52
ns3::dot11s::IeLinkMetricReport::DeserializeInformationField
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition
ie-dot11s-metric-report.cc:58
ns3::dot11s::IeLinkMetricReport::operator>
friend bool operator>(const IeLinkMetricReport &a, const IeLinkMetricReport &b)
greater than operator
Definition
ie-dot11s-metric-report.cc:84
uint32_t
ns3::dot11s::operator>
bool operator>(const IeLinkMetricReport &a, const IeLinkMetricReport &b)
Definition
ie-dot11s-metric-report.cc:84
ns3::dot11s::operator<
bool operator<(const IeLinkMetricReport &a, const IeLinkMetricReport &b)
Definition
ie-dot11s-metric-report.cc:78
ns3::dot11s::operator==
bool operator==(const MeshHeader &a, const MeshHeader &b)
Definition
dot11s-mac-header.cc:187
ns3::dot11s::operator<<
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Definition
ie-dot11s-beacon-timing.cc:231
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition
wifi-information-element.h:34
src
mesh
model
dot11s
ie-dot11s-metric-report.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0