A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ie-dot11s-metric-report.cc
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
10
11#include "ns3/assert.h"
12
13namespace ns3
14{
15namespace dot11s
16{
18 : m_metric(0)
19{
20}
21
26
32
33uint16_t
35{
36 return sizeof(uint32_t);
37}
38
41{
42 return m_metric;
43}
44
45void
47{
48 m_metric = metric;
49}
50
51void
56
57uint16_t
59{
60 Buffer::Iterator i = start;
62 return i.GetDistanceFrom(start);
63}
64
65void
66IeLinkMetricReport::Print(std::ostream& os) const
67{
68 os << "Metric=" << m_metric;
69}
70
71bool
73{
74 return (a.m_metric == b.m_metric);
75}
76
77bool
79{
80 return (a.m_metric < b.m_metric);
81}
82
83bool
85{
86 return (a.m_metric > b.m_metric);
87}
88
89std::ostream&
90operator<<(std::ostream& os, const IeLinkMetricReport& a)
91{
92 a.Print(os);
93 return os;
94}
95} // namespace dot11s
96} // namespace ns3
iterator in a Buffer instance
Definition buffer.h:89
void WriteHtolsbU32(uint32_t data)
Definition buffer.cc:899
uint32_t GetDistanceFrom(const Iterator &o) const
Definition buffer.cc:769
uint32_t ReadLsbtohU32()
Definition buffer.cc:1065
bool operator>(const IeLinkMetricReport &a, const IeLinkMetricReport &b)
bool operator==(const MeshHeader &a, const MeshHeader &b)
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
#define IE_MESH_LINK_METRIC_REPORT