A Discrete-Event Network Simulator
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
17namespace ns3
18{
19namespace dot11s
20{
21/**
22 * \brief a IEEE 802.11s Mesh ID 7.3.2.88 of 802.11s draft 3.0
23 *
24 */
26{
27 public:
29 /**
30 * Constructor
31 *
32 * \param metric the metric
33 */
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
81bool operator==(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
82bool operator>(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
83bool operator<(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
84std::ostream& operator<<(std::ostream& os, const IeLinkMetricReport& linkMetricReport);
85} // namespace dot11s
86} // namespace ns3
87#endif /* METRIC_REPORT_H */
iterator in a Buffer instance
Definition buffer.h:89
Information element, as defined in 802.11-2007 standard.
bool operator>(const IeLinkMetricReport &a, const IeLinkMetricReport &b)
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.