blob: a9e3f3b916c356fc5a56bad5f327fb3f3d66c23d [file] [log] [blame]
Yi Tsengbe342052017-11-03 10:21:23 -07001/*
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 */
16
17package org.onosproject.pipelines.fabric;
18
19
20import org.onosproject.net.pi.model.PiCounterId;
21import org.onosproject.pipelines.basic.PortStatisticsDiscoveryImpl;
22
23/**
24 * Implementation of the PortStatisticsBehaviour for fabric.p4.
25 */
26public class FabricPortStatisticsDiscovery extends PortStatisticsDiscoveryImpl {
27
28 /**
29 * Returns the ID of the ingress port counter.
30 *
31 * @return counter ID
32 */
33 @Override
34 public PiCounterId ingressCounterId() {
35 return FabricConstants.CNT_INGRESS_PORT_COUNTER_ID;
36 }
37
38 /**
39 * Returns the ID of the egress port counter.
40 *
41 * @return counter ID
42 */
43 @Override
44 public PiCounterId egressCounterId() {
45 return FabricConstants.CNT_EGRESS_PORT_COUNTER_ID;
46 }
47}