blob: ea1091f879a8a50bcd2d6e620f52b623e1d5fd48 [file] [log] [blame]
Daniele Moro94660a02019-12-02 12:02:07 -08001/*
Joey Armstronga68e7852024-01-28 13:27:02 -05002 * Copyright 2019-2024 Open Networking Foundation (ONF) and the ONF Contributors
Daniele Moro94660a02019-12-02 12:02:07 -08003 *
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
17package org.opencord.bng;
18
19import org.onosproject.event.ListenerService;
20import org.onosproject.net.behaviour.BngProgrammable;
21import org.onosproject.net.pi.runtime.PiCounterCellData;
22
23import java.util.Map;
24
25/**
26 * Service to retrieve attachment statistics.
27 */
28public interface BngStatsService
29 extends ListenerService<BngStatsEvent, BngStatsEventListener> {
30
31 /**
32 * Returns the statistics given an attachment Key. If the attachment is not
33 * programmed in the ASG, it returns an empty map. If one of the counter
34 * type is not supported by the ASG device, that specific counter will not
35 * be found in the map.
36 *
37 * @param bngAttachmentKey The attachment Key
38 * @return A map with the type of the counter and the associated statistics
39 * coming from the ASG device. Empty map if no BNG programmable is
40 * available.
41 */
42 Map<BngProgrammable.BngCounterType, PiCounterCellData> getStats(String bngAttachmentKey);
43
44 /**
45 * Returns the aggregate statistics related to attachments that are not
46 * known by this app, e.g., packets that are sent from an attachment while
47 * the attachment is negotiating the session.
48 *
49 * @return The statistics of not registered attachment. null if no BNG
50 * programmable device is available.
51 */
52 PiCounterCellData getControlStats();
53
54}