EMANE  1.2.1
r2rineighbormetric.inl
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2014 - Adjacent Link LLC, Bridgewater, New Jersey
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in
13  * the documentation and/or other materials provided with the
14  * distribution.
15  * * Neither the name of Adjacent Link LLC nor the names of its
16  * contributors may be used to endorse or promote products derived
17  * from this software without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 inline
35  std::uint64_t u64NumRxFrames,
36  std::uint64_t u64NumTxFrames,
37  std::uint64_t u64NumMissedFrames,
38  const EMANE::Microseconds & bandwidthConsumption,
39  float fSINRAvgdBm,
40  float fSINRStddev,
41  float fNoiseFloorAvgdBm,
42  float fNoiseFloorStddev,
43  std::uint64_t u64RxAvgDataRatebps,
44  std::uint64_t u64TxAvgDataRatebps):
45 
46 id_{id},
47  u64NumRxFrames_{u64NumRxFrames},
48  u64NumTxFrames_{u64NumTxFrames},
49  u64NumMissedFrames_{u64NumMissedFrames},
50  bandwidthConsumption_{bandwidthConsumption},
51  fSINRAvgdBm_{fSINRAvgdBm},
52  fSINRStddev_{fSINRStddev},
53  fNoiseFloorAvgdBm_{fNoiseFloorAvgdBm},
54  fNoiseFloorStddev_{fNoiseFloorStddev},
55  u64RxAvgDataRatebps_{u64RxAvgDataRatebps},
56  u64TxAvgDataRatebps_{u64TxAvgDataRatebps}{}
57 
58 inline
60 
61 inline
63 {
64  return id_;
65 }
66 
67 inline
69 {
70  return u64NumRxFrames_;
71 }
72 
73 inline
75 {
76  return u64NumTxFrames_;
77 }
78 
79 inline
81 {
82  return u64NumMissedFrames_;
83 }
84 
85 inline
87 {
88  return bandwidthConsumption_;
89 }
90 
91 inline
93 {
94  return fSINRAvgdBm_;
95 }
96 
97 inline
99 {
100  return fNoiseFloorStddev_;
101 }
102 
103 inline
105 {
106  return fNoiseFloorAvgdBm_;
107 }
108 
109 inline
111 {
112  return fNoiseFloorStddev_;
113 }
114 
115 inline
117 {
118  return u64RxAvgDataRatebps_;
119 }
120 
121 inline
123 {
124  return u64TxAvgDataRatebps_;
125 }
R2RINeighborMetric(NEMId id, std::uint64_t u64NumRxFrames, std::uint64_t u64NumTxFrames, std::uint64_t u64NumMissedFrames, const Microseconds &bandwidthConsumption, float fSINRAvgdBm, float fSINRStddev, float fNoiseFloorAvgdBm, float fNoiseFloorStddev, std::uint64_t u64RxAvgDataRatebps, std::uint64_t u64TxAvgDataRatebps)
std::chrono::microseconds Microseconds
Definition: types.h:45
std::uint16_t NEMId
Definition: types.h:52
const Microseconds & getBandwidthConsumption() const