A Discrete-Event Network Simulator
API
ie-dot11s-metric-report.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008,2009 IITP RAS
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Kirill Andreev <andreev@iitp.ru>
18  */
19 
20 #ifndef METRIC_REPORT_H
21 #define METRIC_REPORT_H
22 
23 #include "ns3/buffer.h"
24 #include "ns3/mesh-information-element-vector.h"
25 
26 #include <stdint.h>
27 
28 namespace ns3
29 {
30 namespace dot11s
31 {
37 {
38  public:
45  IeLinkMetricReport(uint32_t metric);
50  void SetMetric(uint32_t metric);
55  uint32_t GetMetric() const;
56 
57  // Inherited from WifiInformationElement
58  WifiInformationElementId ElementId() const override;
59  void SerializeInformationField(Buffer::Iterator i) const override;
60  uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
61  void Print(std::ostream& os) const override;
62  uint16_t GetInformationFieldSize() const override;
63 
64  private:
65  uint32_t m_metric;
73  friend bool operator==(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
81  friend bool operator>(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
89  friend bool operator<(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
90 };
91 
92 bool operator==(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
93 bool operator>(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
94 bool operator<(const IeLinkMetricReport& a, const IeLinkMetricReport& b);
95 std::ostream& operator<<(std::ostream& os, const IeLinkMetricReport& linkMetricReport);
96 } // namespace dot11s
97 } // namespace ns3
98 #endif /* METRIC_REPORT_H */
iterator in a Buffer instance
Definition: buffer.h:100
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.