• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __ZDIAG_STAT_H__
17 #define __ZDIAG_STAT_H__
18 
19 #include "diag_common.h"
20 #include "diag_config.h"
21 #include "diag.h"
22 
23 typedef struct {
24     const diag_sys_stat_obj_t *stat_cmd_list[CONFIG_STAT_CMD_LIST_NUM];  /* Stat. cmd obj list */
25     uint16_t aus_stat_cmd_num[CONFIG_STAT_CMD_LIST_NUM];
26 } zdiag_stat_ctrl_t;
27 
28 typedef struct {
29     uint16_t obj_id;
30     uint8_t *object;
31     uint16_t obj_size;
32     uint16_t obj_cnt;
33     diag_option_t *option;
34     bool sync;
35     uint8_t pad[2]; /* pad(2) */
36 } zdiag_report_stat_obj_stru_t;
37 
38 errcode_t zdiag_report_stat_obj(zdiag_report_stat_obj_stru_t pkt);
39 errcode_t zdiag_query_stat_obj(uint32_t id, uint32_t *obj, uint16_t *obj_len, uint16_t *obj_cnt);
40 
41 #endif /* __ZDIAG_STAT_H__ */
42