proto buff for bal indications
Review comments addressed
Change-Id: I1dc0fbfec429a38d645b164f3587e7e344415a24
diff --git a/voltha/adapters/asfvolt16_olt/protos/bal_indications.proto b/voltha/adapters/asfvolt16_olt/protos/bal_indications.proto
new file mode 100644
index 0000000..dd132e3
--- /dev/null
+++ b/voltha/adapters/asfvolt16_olt/protos/bal_indications.proto
@@ -0,0 +1,181 @@
+//
+// Copyright 2017 the original author or authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+import "bal_model_ids.proto";
+import "bal_errno.proto";
+import "bal_model_types.proto";
+
+enum BalAlarmIndStatus{
+ BAL_ALARM_IND_CLEARED = 0; //Alarm cleared
+ BAL_ALARM_IND_RAISED = 1; //Alarm raised
+}
+
+//ONU alarm info
+message BalOnuAlarmInfo{
+ uint32 onu_id = 1; //onu id
+ BalSerialNumber serial_number = 2; //serial number of the ONU
+ BalAlarmIndStatus onu_alarm_status = 3; //status of the alarm raised by ONU
+ string onu_alarm_name = 4; //name of the alarm raised by ONU
+}
+
+//OLT alarm info
+message BalOltAlarmInfo{
+ uint32 olt_no = 1; //olt number
+ uint32 deviceId = 2; //pon interface number of the corresponding OLT
+ BalAlarmIndStatus olt_alarm_status = 3; //status of the alarm raised by OLT
+ string olt_alarm_name = 4; //name of the alarm raised by OLT
+}
+
+//Alarms generated by the system
+message BalAlarmInfo{
+ uint32 NoOfAlarmsPresent = 1; //number of alarms present in the BAL system currently
+ BalOnuAlarmInfo onuAlarmInfo = 2; //ONU alarm info
+ BalOltAlarmInfo oltAlarmInfo = 3; //OLT alarm info
+}
+
+//NNI statistics
+message BalNniStatsInfo{
+ uint32 nni_rx_frames_64 = 1;
+ uint32 nni_rx_frames_65_127 = 2;
+ uint32 nni_rx_frames_128_255 = 3;
+ uint32 nni_rx_frames_256_511 = 4;
+ uint32 nni_rx_frames_512_1023 = 5;
+ uint32 nni_rx_frames_1024_1518 = 6;
+ uint32 nni_rx_frames_1519_2047 = 7;
+ uint32 nni_rx_frames_2048_4095 = 8;
+ uint32 nni_rx_frames_4096_9216 = 9;
+ uint32 nni_rx_frames_9217_16383 = 10;
+ uint32 nni_rx_frames = 11;
+ uint32 nni_rx_bytes = 12;
+ uint32 nni_rx_good_frames = 13;
+ uint32 nni_rx_unicast_frames = 14;
+ uint32 nni_rx_multicast_frames = 15;
+ uint32 nni_rx_broadcast_frames = 16;
+ uint32 nni_rx_fcs_errors = 17;
+ uint32 nni_rx_control_frames = 18;
+ uint32 nni_rx_pause_frames = 19;
+ uint32 nni_rx_pfc_frames = 20;
+ uint32 nni_rx_unsupported_opcode = 21;
+ uint32 nni_rx_unsupported_da = 22;
+ uint32 nni_rx_alignment_errors = 23;
+ uint32 nni_rx_length_out_of_range = 24;
+ uint32 nni_rx_code_errors = 25;
+ uint32 nni_rx_oversized_frames = 26;
+ uint32 nni_rx_jabber_frames = 27;
+ uint32 nni_rx_mtu_check_errors = 28;
+ uint32 nni_rx_promiscuous_frames = 29;
+ uint32 nni_rx_vlan_frames = 30;
+ uint32 nni_rx_double_vlan_frames = 31;
+ uint32 nni_rx_truncated_frames = 32;
+ uint32 nni_rx_undersize_frames = 33;
+ uint32 nni_rx_fragmented_frames = 34;
+ uint32 nni_rx_runt_frames = 35;
+ uint32 nni_tx_frames_64 = 36;
+ uint32 nni_tx_frames_65_127 = 37;
+ uint32 nni_tx_frames_128_255 = 38;
+ uint32 nni_tx_frames_256_511 = 39;
+ uint32 nni_tx_frames_512_1023 = 40;
+ uint32 nni_tx_frames_1024_1518 = 41;
+ uint32 nni_tx_frames_1519_2047 = 42;
+ uint32 nni_tx_frames_2048_4095 = 44;
+ uint32 nni_tx_frames_4096_9216 = 45;
+ uint32 nni_tx_frames_9217_16383 = 46;
+ uint32 nni_tx_frames = 47;
+ uint32 nni_tx_bytes = 48;
+ uint32 nni_tx_good_frames = 49;
+ uint32 nni_tx_unicast_frames = 50;
+ uint32 nni_tx_multicast_frames = 51;
+ uint32 nni_tx_broadcast_frames = 52;
+ uint32 nni_tx_pause_frames = 53;
+ uint32 nni_tx_pfc_frames = 54;
+ uint32 nni_tx_jabber_frames = 55;
+ uint32 nni_tx_fcs_errors = 56;
+ uint32 nni_tx_control_frames = 57;
+ uint32 nni_tx_oversize_frames = 58;
+ uint32 nni_tx_fragmented_frames = 59;
+ uint32 nni_tx_error_frames = 60;
+ uint32 nni_tx_vlan_frames = 61;
+ uint32 nni_tx_double_vlan_frames = 62;
+ uint32 nni_tx_runt_frames = 63;
+ uint32 nni_tx_underrun_frames = 64;
+}
+
+//PON statistics
+message BalPonNiStatsInfo{
+ uint32 pon_ni_tx_packets = 1;
+ uint32 pon_ni_rx_omci = 2;
+ uint32 pon_ni_tx_omci = 3;
+ uint32 pon_ni_rx_xgem = 4;
+ uint32 pon_ni_tx_xgem = 5;
+}
+
+//Gem port based statistics
+message BalPonGemStatsInfo{
+ uint32 pon_gem_rx_packets = 1;
+ uint32 pon_gem_rx_bytes = 2;
+ uint32 pon_gem_tx_packets = 3;
+ uint32 pon_gem_tx_bytes = 4;
+}
+
+//ONU statistics
+message BalOnuStatsInfo{
+ uint32 onu_id = 1;
+ uint32 onu_rx_words = 2;
+ uint32 onu_rx_omci = 3;
+ uint32 onu_positive_drift = 4;
+ uint32 onu_negative_drift = 5;
+}
+
+enum BalIndStatsType{
+ BAL_IND_NNI_STATS = 0;
+ BAL_IND_PON_STATS = 1;
+ BAL_IND_PON_GEM_STATS = 2;
+ BAL_IND_ONU_STATS = 3;
+}
+
+message BalIndStatsInfo{
+ uint32 device_id = 1; //pon interface number of the corresponding OLT
+ BalIndStatsType stats_type = 2; //type of statistics
+ BalNniStatsInfo nni_stats = 3; //nni statistics info
+ BalPonNiStatsInfo pon_ni_stats = 4; //pon based statistics
+ BalPonGemStatsInfo pon_gem_stats = 5; //gem port based statistics
+ BalOnuStatsInfo onu_stats = 6; //onu statistics
+}
+
+message BalIndications{
+ BalObjId objType = 1; //type of object for which the indications have been received
+ BalErrno status = 2; //status of the indication received from BAL utilities
+ string keyStr = 3; //key string containing additional data
+ oneof u {
+ bytes pktData = 4; //raw packet in case of object type is PACKET
+ BalAlarmInfo balAlarmInfo = 5; //alarm info from BAL
+ BalIndStatsInfo balStatsInfo = 6; //statistics info from BAL
+ }
+}
+
+message BalErr {
+ BalErrno err = 1;
+}
+
+service BalInd {
+
+ //Handling of bal indications from the device
+ rpc BalIndInfo(BalIndications) returns(BalErr) {}
+
+}
+