Zephyr Project API
3.4.0
A Scalable Open Source RTOS
stat_mgmt.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018-2021 mcumgr authors
3
* Copyright (c) 2023 Nordic Semiconductor ASA
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef H_STAT_MGMT_
9
#define H_STAT_MGMT_
10
11
#ifdef __cplusplus
12
extern
"C"
{
13
#endif
14
18
#define STAT_MGMT_ID_SHOW 0
19
#define STAT_MGMT_ID_LIST 1
20
24
enum
stat_mgmt_ret_code_t
{
26
STAT_MGMT_RET_RC_OK
= 0,
27
29
STAT_MGMT_RET_RC_UNKNOWN
,
30
32
STAT_MGMT_RET_RC_INVALID_GROUP
,
33
35
STAT_MGMT_RET_RC_INVALID_STAT_NAME
,
36
38
STAT_MGMT_RET_RC_INVALID_STAT_SIZE
,
39
41
STAT_MGMT_RET_RC_WALK_ABORTED
,
42
};
43
47
struct
stat_mgmt_entry
{
48
const
char
*
name
;
49
uint64_t
value
;
50
};
51
52
#ifdef CONFIG_MCUMGR_SMP_SUPPORT_ORIGINAL_PROTOCOL
53
/*
54
* @brief Translate stat mgmt group error code into MCUmgr error code
55
*
56
* @param ret #stat_mgmt_ret_code_t error code
57
*
58
* @return #mcumgr_err_t error code
59
*/
60
int
stat_mgmt_translate_error_code(
uint16_t
ret
);
61
#endif
62
63
#ifdef __cplusplus
64
}
65
#endif
66
67
#endif
/* H_STAT_MGMT_ */
ret
static ZTEST_BMEM volatile int ret
Definition:
k_float_disable.c:29
stat_mgmt_ret_code_t
stat_mgmt_ret_code_t
Definition:
stat_mgmt.h:24
STAT_MGMT_RET_RC_INVALID_STAT_SIZE
@ STAT_MGMT_RET_RC_INVALID_STAT_SIZE
Definition:
stat_mgmt.h:38
STAT_MGMT_RET_RC_INVALID_GROUP
@ STAT_MGMT_RET_RC_INVALID_GROUP
Definition:
stat_mgmt.h:32
STAT_MGMT_RET_RC_OK
@ STAT_MGMT_RET_RC_OK
Definition:
stat_mgmt.h:26
STAT_MGMT_RET_RC_UNKNOWN
@ STAT_MGMT_RET_RC_UNKNOWN
Definition:
stat_mgmt.h:29
STAT_MGMT_RET_RC_INVALID_STAT_NAME
@ STAT_MGMT_RET_RC_INVALID_STAT_NAME
Definition:
stat_mgmt.h:35
STAT_MGMT_RET_RC_WALK_ABORTED
@ STAT_MGMT_RET_RC_WALK_ABORTED
Definition:
stat_mgmt.h:41
uint64_t
__UINT64_TYPE__ uint64_t
Definition:
stdint.h:91
uint16_t
__UINT16_TYPE__ uint16_t
Definition:
stdint.h:89
stat_mgmt_entry
Represents a single value in a statistics group.
Definition:
stat_mgmt.h:47
stat_mgmt_entry::name
const char * name
Definition:
stat_mgmt.h:48
stat_mgmt_entry::value
uint64_t value
Definition:
stat_mgmt.h:49
include
zephyr
mgmt
mcumgr
grp
stat_mgmt
stat_mgmt.h
Generated on Sat Jun 17 2023 07:48:28 for Zephyr Project API by
1.9.2