blob: 78ae5d4f32fabf5405ab09a5d9d529733368224a [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.Collection;
20
21import org.onosproject.incubator.net.l2monitoring.soam.SoamId;
22
23/**
24 * Object to represent a Delay Measurement Threshold.
25 */
26public interface DelayMeasurementThreshold {
27 /**
28 * The identifier or the scheduled measurement.
29 * @return The id
30 */
31 SoamId threshId();
32
33 /**
34 * A vector of bits that indicates the type of SOAM LM thresholds notifications that are enabled.
35 * A present bit enables the specific SOAM LM threshold notification and
36 * when the specific counter is enabled and the threshold is crossed a
37 * notification is generated.
38 * A not present bit disables the specific SOAM LM threshold notification. If
39 * a particular SOAM LM threshold is not supported the BIT value is not present.
40 * @return A collection of bit options
41 */
42 Collection<ThresholdOption> thresholdsEnabled();
43
44 /**
45 * The measurement two-way delay threshold used to determine if a threshold notification is generated.
46 * @return A java duration
47 */
48 Duration measuredFrameDelayTwoWay();
49
50 /**
51 * The maximum two-way delay threshold used to determine if a threshold notification is generated.
52 * @return A java duration
53 */
54 Duration maxFrameDelayTwoWay();
55
56 /**
57 * The average two-way delay threshold used to determine if a threshold notification is generated.
58 * @return A java duration
59 */
60 Duration averageFrameDelayTwoWay();
61
62 /**
63 * The measurement two-way IFDV threshold used to determine if a threshold notification is generated.
64 * @return A java duration
65 */
66 Duration measuredInterFrameDelayVariationTwoWay();
67
68 /**
69 * The maximum two-way IFDV threshold used to determine if a threshold notification is generated.
70 * @return A java duration
71 */
72 Duration maxInterFrameDelayVariationTwoWay();
73
74 /**
75 * The average two-way IFDV threshold used to determine if a threshold notification is generated.
76 * @return A java duration
77 */
78 Duration averageInterFrameDelayVariationTwoWay();
79
80 /**
81 * The maximum two-way Frame Delay Range threshold used to determine if a threshold notification is generated.
82 * @return A java duration
83 */
84 Duration maxFrameDelayRangeTwoWay();
85
86 /**
87 * The average two-way Frame Delay Range threshold used to determine if a threshold notification is generated.
88 * @return A java duration
89 */
90 Duration averageFrameDelayRangeTwoWay();
91
92 /**
93 * The measurement forward delay threshold used to determine if a threshold notification is generated.
94 * @return A java duration
95 */
96 Duration measuredFrameDelayForward();
97
98 /**
99 * The maximum forward delay threshold used to determine if a threshold notification is generated.
100 * @return A java duration
101 */
102 Duration maxFrameDelayForward();
103
104 /**
105 * The average forward delay threshold used to determine if a threshold notification is generated.
106 * @return A java duration
107 */
108 Duration averageFrameDelayForward();
109
110 /**
111 * The measurement IFDV threshold used to determine if a threshold notification is generated.
112 * @return A java duration
113 */
114 Duration measuredInterFrameDelayVariationForward();
115
116 /**
117 * The maximum IFDV threshold used to determine if a threshold notification is generated.
118 * @return A java duration
119 */
120 Duration maxInterFrameDelayVariationForward();
121
122 /**
123 * The average IFDV threshold used to determine if a threshold notification is generated.
124 * @return A java duration
125 */
126 Duration averageInterFrameDelayVariationForward();
127
128 /**
129 * The maximum Frame Delay Range threshold used to determine if a threshold notification is generated.
130 * @return A java duration
131 */
132 Duration maxFrameDelayRangeForward();
133
134 /**
135 * The average Frame Delay Range threshold used to determine if a threshold notification is generated.
136 * @return A java duration
137 */
138 Duration averageFrameDelayRangeForward();
139
140 /**
141 * The measurement backward delay threshold used to determine if a threshold notification is generated.
142 * @return A java duration
143 */
144 Duration measuredFrameDelayBackward();
145
146 /**
147 * The maximum backward delay threshold used to determine if a threshold notification is generated.
148 * @return A java duration
149 */
150 Duration maxFrameDelayBackward();
151
152 /**
153 * The average backward delay threshold used to determine if a threshold notification is generated.
154 * @return A java duration
155 */
156 Duration averageFrameDelayBackward();
157
158 /**
159 * The measurement backward IFDV threshold used to determine if a threshold notification is generated.
160 * @return A java duration
161 */
162 Duration measuredInterFrameDelayVariationBackward();
163
164 /**
165 * The maximum backward IFDV threshold used to determine if a threshold notification is generated.
166 * @return A java duration
167 */
168 Duration maxInterFrameDelayVariationBackward();
169
170 /**
171 * The average backward IFDV threshold used to determine if a threshold notification is generated.
172 * @return A java duration
173 */
174 Duration averageInterFrameDelayVariationBackward();
175
176 /**
177 * The maximum backward Frame Delay Range threshold used to determine if a threshold notification is generated.
178 * @return A java duration
179 */
180 Duration maxFrameDelayRangeBackward();
181
182 /**
183 * The average backward Frame Delay Range threshold used to determine if a threshold notification is generated.
184 * @return A java duration
185 */
186 Duration averageFrameDelayRangeBackward();
187
188 /**
189 * Builder for {@link org.onosproject.incubator.net.l2monitoring.soam.delay.DelayMeasurementThreshold}.
190 */
191 public interface DmThresholdBuilder {
192 DmThresholdBuilder addToThresholdsEnabled(
193 ThresholdOption thresholdEnabled);
194
195 DmThresholdBuilder measuredFrameDelayTwoWay(
196 Duration measuredFrameDelayTwoWay);
197
198 DmThresholdBuilder maxFrameDelayTwoWay(Duration maxFrameDelayTwoWay);
199
200 DmThresholdBuilder averageFrameDelayTwoWay(Duration averageFrameDelayTwoWay);
201
202 DmThresholdBuilder measuredInterFrameDelayVariationTwoWay(
203 Duration measuredInterFrameDelayVariationTwoWay);
204
205 DmThresholdBuilder maxInterFrameDelayVariationTwoWay(
206 Duration maxInterFrameDelayVariationTwoWay);
207
208 DmThresholdBuilder averageInterFrameDelayVariationTwoWay(
209 Duration averageInterFrameDelayVariationTwoWay);
210
211 DmThresholdBuilder maxFrameDelayRangeTwoWay(
212 Duration maxFrameDelayRangeTwoWay);
213
214 DmThresholdBuilder averageFrameDelayRangeTwoWay(
215 Duration averageFrameDelayRangeTwoWay);
216
217 DmThresholdBuilder measuredFrameDelayForward(
218 Duration averageFrameDelayRangeTwoWay);
219
220 DmThresholdBuilder maxFrameDelayForward(
221 Duration maxFrameDelayForward);
222
223 DmThresholdBuilder averageFrameDelayForward(
224 Duration averageFrameDelayForward);
225
226 DmThresholdBuilder measuredInterFrameDelayVariationForward(
227 Duration measuredInterFrameDelayVariationForward);
228
229 DmThresholdBuilder maxInterFrameDelayVariationForward(
230 Duration maxInterFrameDelayVariationForward);
231
232 DmThresholdBuilder averageInterFrameDelayVariationForward(
233 Duration averageInterFrameDelayVariationForward);
234
235 DmThresholdBuilder maxFrameDelayRangeForward(
236 Duration maxFrameDelayRangeForward);
237
238 DmThresholdBuilder averageFrameDelayRangeForward(
239 Duration averageFrameDelayRangeForward);
240
241 DmThresholdBuilder measuredFrameDelayBackward(
242 Duration measuredFrameDelayBackward);
243
244 DmThresholdBuilder maxFrameDelayBackward(
245 Duration maxFrameDelayBackward);
246
247 DmThresholdBuilder averageFrameDelayBackward(
248 Duration averageFrameDelayBackward);
249
250 DmThresholdBuilder measuredInterFrameDelayVariationBackward(
251 Duration measuredInterFrameDelayVariationBackward);
252
253 DmThresholdBuilder maxInterFrameDelayVariationBackward(
254 Duration maxInterFrameDelayVariationBackward);
255
256 DmThresholdBuilder averageInterFrameDelayVariationBackward(
257 Duration averageInterFrameDelayVariationBackward);
258
259 DmThresholdBuilder maxFrameDelayRangeBackward(
260 Duration maxFrameDelayRangeBackward);
261
262 DmThresholdBuilder averageFrameDelayRangeBackward(
263 Duration averageFrameDelayRangeBackward);
264
265 public DelayMeasurementThreshold build();
266
267 }
268
269 /**
270 * Selection of Threshold choices.
271 */
272 public enum ThresholdOption {
273 MEASURED_FRAME_DELAY_TWO_WAY,
274 MAX_FRAME_DELAY_TWO_WAY,
275 AVERAGE_FRAME_DELAY_TWO_WAY,
276 MEASURED_INTER_FRAME_DELAY_VARIATION_TWO_WAY,
277 MAX_INTER_FRAME_DELAY_VARIATION_TWO_WAY,
278 AVERAGE_INTER_FRAME_DELAY_VARIATION_TWO_WAY,
279 MAX_FRAME_DELAY_RANGE_TWO_WAY,
280 AVERAGE_FRAME_DELAY_RANGE_TWO_WAY,
281 MEASURED_FRAME_DELAY_FORWARD,
282 MAX_FRAME_DELAY_FORWARD,
283 AVERAGE_FRAME_DELAY_FORWARD,
284 MEASURED_INTER_FRAME_DELAY_VARIATION_FORWARD,
285 MAX_INTER_FRAME_DELAY_VARIATION_FORWARD,
286 AVERAGE_INTER_FRAME_DELAY_VARIATION_FORWARD,
287 MAX_FRAME_DELAY_RANGE_FORWARD,
288 AVERAGE_FRAME_DELAY_RANGE_FORWARD,
289 MEASURED_FRAME_DELAY_BACKWARD,
290 MAX_FRAME_DELAY_BACKWARD,
291 AVERAGE_FRAME_DELAY_BACKWARD,
292 MEASURED_INTER_FRAME_DELAY_VARIATION_BACKWARD,
293 MAX_INTER_FRAME_DELAY_VARIATION_BACKWARD,
294 AVERAGE_INTER_FRAME_DELAY_VARIATION_BACKWARD,
295 MAX_FRAME_DELAY_RANGE_BACKWARD,
296 AVERAGE_FRAME_DELAY_RANGE_BACKWARD;
297 }
298}