blob: 3c67a1eb48f4c3b3013900e03ae8355a2ea8cbbb [file] [log] [blame]
Jason Huang5d9ab1a2020-04-15 16:53:49 +08001/*
2 * Copyright 2018-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
17#ifndef BCMOLT_API_MODEL_API_STRUCTS_TEST_H_
18#define BCMOLT_API_MODEL_API_STRUCTS_TEST_H_
19
20#include <bcmos_system.h>
21#include <bcmolt_system_types.h>
22#include "bcmolt_msg.h"
23#include "bcmolt_api_model_supporting_structs.h"
24#include "bcmolt_api_model_supporting_enums.h"
25#include "bcmolt_api_model_supporting_typedefs.h"
26
27/**
28This header file provides STUB definitions of missing BAL structs for unit test compilation
29*/
30
31
32// ITU PON Statistics
33typedef struct
34{
35 uint64_t presence_mask;
36 uint64_t rdi_errors;
37} bcmolt_onu_itu_pon_stats_data;
38
39typedef struct
40{
41 bcmolt_stat hdr;
42 bcmolt_onu_key key;
43 bcmolt_onu_itu_pon_stats_data data;
44} bcmolt_onu_itu_pon_stats;
45
46
47
48// onu_itu_pon_stats_data'
49typedef enum
50{
51 BCMOLT_ONU_ITU_PON_STATS_DATA_ID_RDI_ERRORS = 1,
52 BCMOLT_ONU_ITU_PON_STATS_CFG_DATA_ID_BIP_ERRORS = 2
53
54 #define bcmolt_onu_itu_pon_stats_data_id_rdi_errors BCMOLT_ONU_ITU_PON_STATS_DATA_ID_RDI_ERRORS
55 #define bcmolt_onu_itu_pon_stats_cfg_data_id_bip_errors BCMOLT_ONU_ITU_PON_STATS_CFG_DATA_ID_BIP_ERRORS
56
57} bcmolt_onu_itu_pon_stats_data_id;
58
59// onu_itu_pon_stats_cfg_data
60typedef enum
61{
62
63 BCMOLT_ONU_ITU_PON_STATS_CFG_DATA_ID_RDI_ERRORS = 1
64
65 #define bcmolt_onu_itu_pon_stats_cfg_data_id_rdi_errors BCMOLT_ONU_ITU_PON_STATS_CFG_DATA_ID_RDI_ERRORS
66
67} bcmolt_onu_itu_pon_stats_cfg_data_id;
68
69//onu_itu_pon_stats_alarm_raised_data
70typedef enum
71{
72 BCMOLT_ONU_ITU_PON_STATS_ALARM_RAISED_DATA_ID_STAT = 0
73 #define bcmolt_onu_itu_pon_stats_alarm_raised_data_id_stat BCMOLT_ONU_ITU_PON_STATS_ALARM_RAISED_DATA_ID_STAT
74
75} bcmolt_onu_itu_pon_stats_alarm_raised_data_id;
76
77// onu_itu_pon_stats_alarm_cleared_data
78typedef enum
79{
80 BCMOLT_ONU_ITU_PON_STATS_ALARM_CLEARED_DATA_ID_STAT = 0
81 #define bcmolt_onu_itu_pon_stats_alarm_cleared_data_id_stat BCMOLT_ONU_ITU_PON_STATS_ALARM_CLEARED_DATA_ID_STAT
82
83} bcmolt_onu_itu_pon_stats_alarm_cleared_data_id;
84
85
86/** ONU: ITU PON Statistics Alarm Raised */
87typedef struct
88{
89 bcmolt_presence_mask presence_mask;
90 bcmolt_onu_itu_pon_stats_data_id stat;
91} bcmolt_onu_itu_pon_stats_alarm_raised_data;
92
93// itu_pon_stats_alarm_raised" group of "onu" object
94typedef struct
95{
96 bcmolt_auto hdr;
97 bcmolt_onu_key key;
98 bcmolt_onu_itu_pon_stats_alarm_raised_data data;
99} bcmolt_onu_itu_pon_stats_alarm_raised;
100
101// ITU PON Statistics Alarm Cleared
102typedef struct
103{
104 uint64_t presence_mask;
105 bcmolt_onu_itu_pon_stats_data_id stat;
106} bcmolt_onu_itu_pon_stats_alarm_cleared_data;
107
108// itu_pon_stats_alarm_cleared" group of "onu" object
109typedef struct
110{
111 bcmolt_auto hdr;
112 bcmolt_onu_key key;
113 bcmolt_onu_itu_pon_stats_alarm_cleared_data data;
114} bcmolt_onu_itu_pon_stats_alarm_cleared;
115
116
117// ITU PON Statistics Configuration
118typedef struct
119{
120 uint64_t presence_mask;
121 bcmolt_stat_alarm_config rdi_errors;
122 bcmolt_stat_alarm_config bip_errors;
123
124} bcmolt_onu_itu_pon_stats_cfg_data;
125
126// itu_pon_stats_cfg" group of "onu" object
127typedef struct
128{
129 bcmolt_stat_cfg hdr;
130 bcmolt_onu_key key;
131 bcmolt_onu_itu_pon_stats_cfg_data data;
132} bcmolt_onu_itu_pon_stats_cfg;
133
134#define BCMOLT_ONU_AUTO_SUBGROUP_ITU_PON_STATS_ALARM_CLEARED 1
135#define BCMOLT_ONU_AUTO_SUBGROUP_ITU_PON_STATS_ALARM_RAISED 2
136#define BCMOLT_ONU_STAT_SUBGROUP_ITU_PON_STATS 3
137#define BCMOLT_ONU_STAT_CFG_SUBGROUP_ITU_PON_STATS_CFG 4
138
139#define bcmolt_onu_auto_subgroup_itu_pon_stats_alarm_cleared BCMOLT_ONU_AUTO_SUBGROUP_ITU_PON_STATS_ALARM_CLEARED
140#define bcmolt_onu_auto_subgroup_itu_pon_stats_alarm_raised BCMOLT_ONU_AUTO_SUBGROUP_ITU_PON_STATS_ALARM_RAISED
141#define bcmolt_onu_stat_subgroup_itu_pon_stats BCMOLT_ONU_STAT_SUBGROUP_ITU_PON_STATS
142#define bcmolt_onu_stat_cfg_subgroup_itu_pon_stats_cfg BCMOLT_ONU_STAT_CFG_SUBGROUP_ITU_PON_STATS_CFG
143
144#endif // BCMOLT_API_MODEL_API_STRUCTS_TEST_H_
145