blob: 2fadfc19ccd1c4b35d6b248a95a2f548842c7a57 [file] [log] [blame]
Sean Condon0e89bda2017-03-21 14:23:19 +00001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.incubator.net.l2monitoring.soam.delay;
17
18import java.time.Duration;
19import java.util.Map;
20
21/**
22 * Abstract object as a base for DelayMeasurementStatCurrent and DelayMeasurementStatHistory interfaces.
23 */
24public interface DelayMeasurementStat {
25 /**
26 * The time that the current Measurement Interval has been running.
27 * @return A java duration
28 */
29 Duration elapsedTime();
30
31 /**
32 * The suspect flag for the current measurement interval in which the notification was generated.
33 * reference MEF-SOAM-PM-MIB.mefSoamPmNotificationObjSuspect";
34 * @return true if the measurement might include an error
35 */
36 boolean suspectStatus();
37
38 /**
39 * The minimum two-way frame delay calculated by this MEP for this Measurement Interval.
40 * @return A java duration
41 */
42 Duration frameDelayTwoWayMin();
43
44 /**
45 * The maximum two-way frame delay calculated by this MEP for this Measurement Interval.
46 * @return A java duration
47 */
48 Duration frameDelayTwoWayMax();
49
50 /**
51 * The average two-way frame delay calculated by this MEP for this Measurement Interval.
52 * @return A java duration
53 */
54 Duration frameDelayTwoWayAvg();
55
56 /**
57 * The minimum foward frame delay calculated by this MEP for this Measurement Interval.
58 * @return A java duration
59 */
60 Duration frameDelayForwardMin();
61
62 /**
63 * The maximum forward frame delay calculated by this MEP for this Measurement Interval.
64 * @return A java duration
65 */
66 Duration frameDelayForwardMax();
67
68 /**
69 * The average forward frame delay calculated by this MEP for this Measurement Interval.
70 * @return A java duration
71 */
72 Duration frameDelayForwardAvg();
73
74 /**
75 * The minimum backward frame delay calculated by this MEP for this Measurement Interval.
76 * @return A java duration
77 */
78 Duration frameDelayBackwardMin();
79
80 /**
81 * The maximum backward frame delay calculated by this MEP for this Measurement Interval.
82 * @return A java duration
83 */
84 Duration frameDelayBackwardMax();
85
86 /**
87 * The average backward frame delay calculated by this MEP for this Measurement Interval.
88 * @return A java duration
89 */
90 Duration frameDelayBackwardAvg();
91
92 /**
93 * The minimum two-way inter-frame delay interval calculated by this MEP for this Measurement Interval.
94 * @return A java duration
95 */
96 Duration interFrameDelayVariationTwoWayMin();
97
98 /**
99 * The maximum two-way inter-frame delay interval calculated by this MEP for this Measurement Interval.
100 * @return A java duration
101 */
102 Duration interFrameDelayVariationTwoWayMax();
103
104 /**
105 * The average two-way inter-frame delay interval calculated by this MEP for this Measurement Interval.
106 * @return A java duration
107 */
108 Duration interFrameDelayVariationTwoWayAvg();
109
110 /**
111 * The minimum one-way inter-frame delay interval in the forward direction.
112 * calculated by this MEP for this Measurement Interval.
113 * @return A java duration
114 */
115 Duration interFrameDelayVariationForwardMin();
116
117 /**
118 * The maximum one-way inter-frame delay interval in the forward direction.
119 * calculated by this MEP for this Measurement Interval.
120 * @return A java duration
121 */
122 Duration interFrameDelayVariationForwardMax();
123
124 /**
125 * The average one-way inter-frame delay interval in the forward direction.
126 * calculated by this MEP for this Measurement Interval.
127 * @return A java duration
128 */
129 Duration interFrameDelayVariationForwardAvg();
130
131 /**
132 * The minimum one-way inter-frame delay interval in the backward direction.
133 * calculated by this MEP for this Measurement Interval.
134 * @return A java duration
135 */
136 Duration interFrameDelayVariationBackwardMin();
137
138 /**
139 * The maximum one-way inter-frame delay interval in the backward direction.
140 * calculated by this MEP for this Measurement Interval.
141 * @return A java duration
142 */
143 Duration interFrameDelayVariationBackwardMax();
144
145 /**
146 * The average one-way inter-frame delay interval in the backward direction.
147 * calculated by this MEP for this Measurement Interval.
148 * @return A java duration
149 */
150 Duration interFrameDelayVariationBackwardAvg();
151
152 /**
153 * The maximum two-way Frame Delay Range calculated by this MEP for this Measurement Interval.
154 * @return A java duration
155 */
156 Duration frameDelayRangeTwoWayMax();
157
158 /**
159 * The average two-way Frame Delay Range calculated by this MEP for this Measurement Interval.
160 * @return A java duration
161 */
162 Duration frameDelayRangeTwoWayAvg();
163
164 /**
165 * The maximum one-way Frame Delay Range in the forward direction.
166 * calculated by this MEP for this Measurement Interval
167 * @return A java duration
168 */
169 Duration frameDelayRangeForwardMax();
170
171 /**
172 * The average one-way Frame Delay Range in the forward direction.
173 * calculated by this MEP for this Measurement Interval
174 * @return A java duration
175 */
176 Duration frameDelayRangeForwardAvg();
177
178 /**
179 * The maximum one-way Frame Delay Range in the backward direction.
180 * calculated by this MEP for this Measurement Interval
181 * @return A java duration
182 */
183 Duration frameDelayRangeBackwardMax();
184
185 /**
186 * The average one-way Frame Delay Range in the backward direction.
187 * calculated by this MEP for this Measurement Interval
188 * @return A java duration
189 */
190 Duration frameDelayRangeBackwardAvg();
191
192 /**
193 * The count of the number of SOAM PDUs sent during this Measurement Interval.
194 * @return the count as an integer
195 */
196 Integer soamPdusSent();
197
198 /**
199 * The count of the number of SOAM PDUs received during this Measurement Interval.
200 * @return the count as an integer
201 */
202 Integer soamPdusReceived();
203
204 /**
205 * Bins calculated for two-way Frame Delay measurements.
206 * calculated by this MEP for this Measurement interval.
207 *
208 * The reply contains a set of counts of packets per bin
209 * The bin is defined by the durations given as the lower limit and the next
210 * size being the upper limit. For the largest duration, the count is of packets
211 * of that size up to infinity
212 *
213 * For example, if there are 4 elements in the result
214 * PT0.000S 4 - This means there are 4 packets in the 0-20ms bin
215 * PT0.020S 6 - This means there are 6 packets in the 20-30ms bin
216 * PT0.030S 8 - This means there are 8 packets in the 30-50ms bin
217 * PT0.050S 10 - This means there are 10 packets in the 50ms-infinity bin
218 *
219 * @return A map of counts per time periods
220 */
221 Map<Duration, Integer> frameDelayTwoWayBins();
222
223 /**
224 * Bins calculated for one-way Frame Delay measurements in the Forward direction.
225 * calculated by this MEP for this Measurement interval.
226 * @return A map of counts per time periods
227 */
228 Map<Duration, Integer> frameDelayForwardBins();
229
230 /**
231 * Bins calculated for one-way Frame Delay measurements in the Backward direction.
232 * calculated by this MEP for this Measurement interval.
233 * @return A map of counts per time periods
234 */
235 Map<Duration, Integer> frameDelayBackwardBins();
236
237 /**
238 * Bins calculated for two-way Inter Frame Delay Variation measurements.
239 * calculated by this MEP for this Measurement interval.
240 * @return A map of counts per time periods
241 */
242 Map<Duration, Integer> interFrameDelayVariationTwoWayBins();
243
244 /**
245 * Bins calculated for one-way Inter Frame Delay Variation measurements in the Forward direction.
246 * calculated by this MEP for this Measurement interval.
247 * @return A map of counts per time periods
248 */
249 Map<Duration, Integer> interFrameDelayVariationForwardBins();
250
251 /**
252 * Bins calculated for one-way Inter Frame Delay Variation measurements in the Backward direction.
253 * calculated by this MEP for this Measurement interval.
254 * @return A map of counts per time periods
255 */
256 Map<Duration, Integer> interFrameDelayVariationBackwardBins();
257
258 /**
259 * Bins calculated for two-way Frame Delay Range measurements.
260 * calculated by this MEP for this Measurement interval.
261 * @return A map of counts per time periods
262 */
263 Map<Duration, Integer> frameDelayRangeTwoWayBins();
264
265 /**
266 * Bins calculated for one-way Frame Delay Range measurements in the Forward direction.
267 * calculated by this MEP for this Measurement interval.
268 * @return A map of counts per time periods
269 */
270 Map<Duration, Integer> frameDelayRangeForwardBins();
271
272 /**
273 * Bins calculated for one-way Frame Delay Range measurements in the Backward direction.
274 * calculated by this MEP for this Measurement interval.
275 * @return A map of counts per time periods
276 */
277 Map<Duration, Integer> frameDelayRangeBackwardBins();
278
279 /**
280 * Abstract Builder interface for DelayMeasurementStat.
Sean Condon3a1efef2018-02-24 13:16:03 +0000281 * {@link DelayMeasurementStat}.
Sean Condon0e89bda2017-03-21 14:23:19 +0000282 */
283 interface DmStatBuilder {
284 DmStatBuilder frameDelayTwoWayMin(Duration frameDelayTwoWayMin);
285
286 DmStatBuilder frameDelayTwoWayMax(Duration frameDelayTwoWayMax);
287
288 DmStatBuilder frameDelayTwoWayAvg(Duration frameDelayTwoWayAvg);
289
290 DmStatBuilder frameDelayForwardMin(Duration frameDelayForwardMin);
291
292 DmStatBuilder frameDelayForwardMax(Duration frameDelayForwardMax);
293
294 DmStatBuilder frameDelayForwardAvg(Duration frameDelayForwardAvg);
295
296 DmStatBuilder frameDelayBackwardMin(Duration frameDelayBackwardMin);
297
298 DmStatBuilder frameDelayBackwardMax(Duration frameDelayBackwardMax);
299
300 DmStatBuilder frameDelayBackwardAvg(Duration frameDelayBackwardAvg);
301
302 DmStatBuilder interFrameDelayVariationTwoWayMin(Duration interFrameDelayVariationTwoWayMin);
303
304 DmStatBuilder interFrameDelayVariationTwoWayMax(Duration interFrameDelayVariationTwoWayMax);
305
306 DmStatBuilder interFrameDelayVariationTwoWayAvg(Duration interFrameDelayVariationTwoWayAvg);
307
308 DmStatBuilder interFrameDelayVariationForwardMin(Duration interFrameDelayVariationForwardMin);
309
310 DmStatBuilder interFrameDelayVariationForwardMax(Duration interFrameDelayVariationForwardMax);
311
312 DmStatBuilder interFrameDelayVariationForwardAvg(Duration interFrameDelayVariationForwardAvg);
313
314 DmStatBuilder interFrameDelayVariationBackwardMin(Duration interFrameDelayVariationBackwardMin);
315
316 DmStatBuilder interFrameDelayVariationBackwardMax(Duration interFrameDelayVariationBackwardMax);
317
318 DmStatBuilder interFrameDelayVariationBackwardAvg(Duration interFrameDelayVariationBackwardAvg);
319
320 DmStatBuilder frameDelayRangeTwoWayMax(Duration frameDelayRangeTwoWayMax);
321
322 DmStatBuilder frameDelayRangeTwoWayAvg(Duration frameDelayRangeTwoWayAvg);
323
324 DmStatBuilder frameDelayRangeForwardMax(Duration frameDelayRangeForwardMax);
325
326 DmStatBuilder frameDelayRangeForwardAvg(Duration frameDelayRangeForwardAvg);
327
328 DmStatBuilder frameDelayRangeBackwardMax(Duration frameDelayRangeBackwardMax);
329
330 DmStatBuilder frameDelayRangeBackwardAvg(Duration frameDelayRangeBackwardAvg);
331
332 DmStatBuilder soamPdusSent(Integer soamPdusSent);
333
334 DmStatBuilder soamPdusReceived(Integer soamPdusReceived);
335
336 DmStatBuilder frameDelayTwoWayBins(Map<Duration, Integer> frameDelayTwoWayBins);
337
338 DmStatBuilder frameDelayForwardBins(Map<Duration, Integer> frameDelayForwardBins);
339
340 DmStatBuilder frameDelayBackwardBins(Map<Duration, Integer> frameDelayBackwardBins);
341
342 DmStatBuilder interFrameDelayVariationTwoWayBins(Map<Duration, Integer> interFrameDelayVariationTwoWayBins);
343
344 DmStatBuilder interFrameDelayVariationForwardBins(Map<Duration, Integer> interFrameDelayVariationForwardBins);
345
346 DmStatBuilder interFrameDelayVariationBackwardBins(Map<Duration, Integer> interFrameDelayVariationBackwardBins);
347
348 DmStatBuilder frameDelayRangeTwoWayBins(Map<Duration, Integer> frameDelayRangeTwoWayBins);
349
350 DmStatBuilder frameDelayRangeForwardBins(Map<Duration, Integer> frameDelayRangeForwardBins);
351
352 DmStatBuilder frameDelayRangeBackwardBins(Map<Duration, Integer> frameDelayRangeBackwardBins);
353
354 DelayMeasurementStat build();
355 }
356}