blob: dbff5f17e31d7c3cc74c7809fd243654fe97ebb9 [file] [log] [blame]
Rohit Singh35fd94c2019-11-11 16:38:18 +05301/*
2 * Copyright 2019-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 *
16 * This Work is contributed by Sterlite Technologies
17 */
18package org.onosproject.net.behaviour;
19
20import org.onosproject.net.DeviceId;
21import org.onosproject.net.PortNumber;
22import org.onosproject.net.driver.HandlerBehaviour;
23
24import java.util.Optional;
25
26/*
27 * Interface to compute BitErrorRate(BER) value pre and post Forward Error Correction (FEC).
28 * BER is dependent on FEC value
29 */
30public interface BitErrorRateState extends HandlerBehaviour {
31
32 /**
33 * Get the BER value pre FEC.
34 *
35 * @param deviceId the device identifier
36 * @param port the port identifier
37 * @return the decimal value of BER
38 */
39 Optional<Double> getPreFecBer(DeviceId deviceId, PortNumber port);
40
41 /**
42 * Get the BER value post FEC.
43 *
44 * @param deviceId the device identifier
45 * @param port the port identifier
46 * @return the decimal value of BER
47 */
48 Optional<Double> getPostFecBer(DeviceId deviceId, PortNumber port);
49}