blob: bd04a9d3b31ed9587c6a492d59c6bab1cb088b34 [file] [log] [blame]
Zack Williams477ba092018-10-17 10:50:06 -07001/*
Girish Gowdraa707e7c2019-11-07 11:36:13 +05302 * Copyright 2018-present Open Networking Foundation
Zack Williams477ba092018-10-17 10:50:06 -07003
Girish Gowdraa707e7c2019-11-07 11:36:13 +05304 * 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
Zack Williams477ba092018-10-17 10:50:06 -07007
Girish Gowdraa707e7c2019-11-07 11:36:13 +05308 * http://www.apache.org/licenses/LICENSE-2.0
Zack Williams477ba092018-10-17 10:50:06 -07009
Girish Gowdraa707e7c2019-11-07 11:36:13 +053010 * 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 */
Zack Williams477ba092018-10-17 10:50:06 -070016
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040017#ifndef OPENOLT_STATS_COLLECTION_H_
18#define OPENOLT_STATS_COLLECTION_H_
19
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000020#include <voltha_protos/openolt.grpc.pb.h>
Akash Reddy Kankanaladec6e7e2025-05-22 09:49:28 +053021#include <voltha_protos/common.grpc.pb.h>
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040022
23extern "C"
24{
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000025#include <bcmolt_api_model_supporting_structs.h>
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040026}
27
Shad Ansariedef2132018-08-10 22:14:50 +000028void init_stats();
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040029void stop_collecting_statistics();
Akash Reddy Kankanaladec6e7e2025-05-22 09:49:28 +053030common::PortStatistics* get_default_port_statistics();
31common::PortStatistics* collectPortStatistics(bcmolt_interface_id intf_id, bcmolt_interface_type intf_type);
Burak Gurdag74e3ab82020-12-17 13:35:06 +000032bcmos_errno get_onu_statistics(bcmolt_interface_id intf_id, bcmolt_onu_id onu_id, openolt::OnuStatistics* onu_stats);
33bcmos_errno get_gemport_statistics(bcmolt_interface_id intf_id, bcmolt_gem_port_id gemport_id, openolt::GemPortStatistics* gemport_stats);
Akash Reddy Kankanaladec6e7e2025-05-22 09:49:28 +053034bcmos_errno get_port_statistics(bcmolt_intf_ref intf_ref, common::PortStatistics* port_stats);
35bcmos_errno get_alloc_statistics(bcmolt_interface_id intf_id, bcmolt_alloc_id alloc_id, openolt::OnuAllocIdStatistics* alloc_stats);
Shad Ansaricb004c52018-05-30 18:07:23 +000036#if 0
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040037openolt::FlowStatistics* get_default_flow_statistics();
38openolt::FlowStatistics* collectFlowStatistics(bcmbal_flow_id flow_id, bcmbal_flow_type flow_type);
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040039void register_new_flow(bcmbal_flow_key key);
Nicolas Palpacuer6a63ea92018-09-05 17:21:37 -040040#endif
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040041
42
43#endif