blob: 928165560c2f6e850fc1dbe7e622ffe0484dfa0e [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>
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040021
22extern "C"
23{
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000024#include <bcmolt_api_model_supporting_structs.h>
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040025}
26
Shad Ansariedef2132018-08-10 22:14:50 +000027void init_stats();
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040028void stop_collecting_statistics();
29openolt::PortStatistics* get_default_port_statistics();
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000030openolt::PortStatistics* collectPortStatistics(bcmolt_interface_id intf_id, bcmolt_interface_type intf_type);
Burak Gurdag74e3ab82020-12-17 13:35:06 +000031bcmos_errno get_onu_statistics(bcmolt_interface_id intf_id, bcmolt_onu_id onu_id, openolt::OnuStatistics* onu_stats);
32bcmos_errno get_gemport_statistics(bcmolt_interface_id intf_id, bcmolt_gem_port_id gemport_id, openolt::GemPortStatistics* gemport_stats);
Shad Ansaricb004c52018-05-30 18:07:23 +000033#if 0
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040034openolt::FlowStatistics* get_default_flow_statistics();
35openolt::FlowStatistics* collectFlowStatistics(bcmbal_flow_id flow_id, bcmbal_flow_type flow_type);
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040036void register_new_flow(bcmbal_flow_key key);
Nicolas Palpacuer6a63ea92018-09-05 17:21:37 -040037#endif
Nicolas Palpacuer0f19b1a2018-06-07 17:29:31 -040038
39
40#endif