9
9
#ifndef H_OS_MGMT_
10
10
#define H_OS_MGMT_
11
11
12
+ /**
13
+ * @brief MCUmgr OS Management API
14
+ * @defgroup mcumgr_os_mgmt OS Management
15
+ * @ingroup mcumgr_mgmt_api
16
+ * @{
17
+ */
18
+
12
19
#ifdef __cplusplus
13
20
extern "C" {
14
21
#endif
15
22
16
23
/**
17
- * Command IDs for OS management group.
24
+ * @name Command IDs for OS Management group.
25
+ * @{
26
+ */
27
+ #define OS_MGMT_ID_ECHO 0 /**< Echo */
28
+ #define OS_MGMT_ID_CONS_ECHO_CTRL 1 /**< Console/terminal echo control */
29
+ #define OS_MGMT_ID_TASKSTAT 2 /**< Task statistics */
30
+ #define OS_MGMT_ID_MPSTAT 3 /**< Memory pool statistics */
31
+ #define OS_MGMT_ID_DATETIME_STR 4 /**< Date-time string */
32
+ #define OS_MGMT_ID_RESET 5 /**< System reset */
33
+ #define OS_MGMT_ID_MCUMGR_PARAMS 6 /**< MCUMgr parameters */
34
+ #define OS_MGMT_ID_INFO 7 /**< OS/Application information */
35
+ #define OS_MGMT_ID_BOOTLOADER_INFO 8 /**< Bootloader information */
36
+ /**
37
+ * @}
18
38
*/
19
- #define OS_MGMT_ID_ECHO 0
20
- #define OS_MGMT_ID_CONS_ECHO_CTRL 1
21
- #define OS_MGMT_ID_TASKSTAT 2
22
- #define OS_MGMT_ID_MPSTAT 3
23
- #define OS_MGMT_ID_DATETIME_STR 4
24
- #define OS_MGMT_ID_RESET 5
25
- #define OS_MGMT_ID_MCUMGR_PARAMS 6
26
- #define OS_MGMT_ID_INFO 7
27
- #define OS_MGMT_ID_BOOTLOADER_INFO 8
28
39
29
40
/**
30
41
* Command result codes for OS management group.
@@ -52,57 +63,60 @@ enum os_mgmt_err_code_t {
52
63
OS_MGMT_ERR_QUERY_RESPONSE_VALUE_NOT_VALID ,
53
64
};
54
65
55
- /* Bitmask values used by the os info command handler. Note that the width of this variable is
66
+ /**
67
+ * OS/Application information formats.
68
+ *
69
+ * Bitmask values used by the os info command handler. Note that the width of this variable is
56
70
* 32-bits, allowing 32 flags, custom user-level implementations should start at
57
- * OS_MGMT_INFO_FORMAT_USER_CUSTOM_START and reference that directly as additional format
71
+ * # OS_MGMT_INFO_FORMAT_USER_CUSTOM_START and reference that directly as additional format
58
72
* specifiers might be added to this list in the future.
59
73
*/
60
74
enum os_mgmt_info_formats {
61
- OS_MGMT_INFO_FORMAT_KERNEL_NAME = BIT (0 ),
62
- OS_MGMT_INFO_FORMAT_NODE_NAME = BIT (1 ),
63
- OS_MGMT_INFO_FORMAT_KERNEL_RELEASE = BIT (2 ),
64
- OS_MGMT_INFO_FORMAT_KERNEL_VERSION = BIT (3 ),
65
- OS_MGMT_INFO_FORMAT_BUILD_DATE_TIME = BIT (4 ),
66
- OS_MGMT_INFO_FORMAT_MACHINE = BIT (5 ),
67
- OS_MGMT_INFO_FORMAT_PROCESSOR = BIT (6 ),
68
- OS_MGMT_INFO_FORMAT_HARDWARE_PLATFORM = BIT (7 ),
69
- OS_MGMT_INFO_FORMAT_OPERATING_SYSTEM = BIT (8 ),
70
-
71
- OS_MGMT_INFO_FORMAT_USER_CUSTOM_START = BIT (9 ),
75
+ OS_MGMT_INFO_FORMAT_KERNEL_NAME = BIT (0 ), /**< Kernel name */
76
+ OS_MGMT_INFO_FORMAT_NODE_NAME = BIT (1 ), /**< Node name */
77
+ OS_MGMT_INFO_FORMAT_KERNEL_RELEASE = BIT (2 ), /**< Kernel release */
78
+ OS_MGMT_INFO_FORMAT_KERNEL_VERSION = BIT (3 ), /**< Kernel version */
79
+ OS_MGMT_INFO_FORMAT_BUILD_DATE_TIME = BIT (4 ), /**< Build date and time */
80
+ OS_MGMT_INFO_FORMAT_MACHINE = BIT (5 ), /**< Machine */
81
+ OS_MGMT_INFO_FORMAT_PROCESSOR = BIT (6 ), /**< Processor */
82
+ OS_MGMT_INFO_FORMAT_HARDWARE_PLATFORM = BIT (7 ), /**< Hardware platform */
83
+ OS_MGMT_INFO_FORMAT_OPERATING_SYSTEM = BIT (8 ), /**< Operating system */
84
+
85
+ OS_MGMT_INFO_FORMAT_USER_CUSTOM_START = BIT (9 ), /**< Custom user-level start bit */
72
86
};
73
87
74
- /* Structure provided in the MGMT_EVT_OP_OS_MGMT_INFO_CHECK notification callback */
88
+ /* Structure provided in the # MGMT_EVT_OP_OS_MGMT_INFO_CHECK notification callback */
75
89
struct os_mgmt_info_check {
76
- /* Input format string from the mcumgr client */
90
+ /** Input format string from the mcumgr client */
77
91
struct zcbor_string * format ;
78
- /* Bitmask of values specifying which outputs should be present */
92
+ /** Bitmask of values specifying which outputs should be present */
79
93
uint32_t * format_bitmask ;
80
- /* Number of valid format characters parsed, must be incremented by 1 for each valid
94
+ /** Number of valid format characters parsed, must be incremented by 1 for each valid
81
95
* character
82
96
*/
83
97
uint16_t * valid_formats ;
84
- /* Needs to be set to true if the OS name is being provided by external code */
98
+ /** Needs to be set to true if the OS name is being provided by external code */
85
99
bool * custom_os_name ;
86
100
};
87
101
88
102
/* Structure provided in the MGMT_EVT_OP_OS_MGMT_INFO_APPEND notification callback */
89
103
struct os_mgmt_info_append {
90
- /* The format bitmask from the processed commands, the bits should be cleared once
104
+ /** The format bitmask from the processed commands, the bits should be cleared once
91
105
* processed, note that if all_format_specified is specified, the corresponding bits here
92
106
* will not be set
93
107
*/
94
108
uint32_t * format_bitmask ;
95
- /* Will be true if the all 'a' specifier was provided */
109
+ /** Will be true if the all 'a' specifier was provided */
96
110
bool all_format_specified ;
97
- /* The output buffer which the responses should be appended to. If prior_output is true, a
111
+ /** The output buffer which the responses should be appended to. If prior_output is true, a
98
112
* space must be added prior to the output response
99
113
*/
100
114
uint8_t * output ;
101
- /* The current size of the output response in the output buffer, must be updated to be the
115
+ /** The current size of the output response in the output buffer, must be updated to be the
102
116
* size of the output response after appending data
103
117
*/
104
118
uint16_t * output_length ;
105
- /* The size of the output buffer, including null terminator character, if the output
119
+ /** The size of the output buffer, including null terminator character, if the output
106
120
* response would exceed this size, the function must abort and return false to return a
107
121
* memory error to the client
108
122
*/
@@ -115,4 +129,8 @@ struct os_mgmt_info_append {
115
129
}
116
130
#endif
117
131
132
+ /**
133
+ * @}
134
+ */
135
+
118
136
#endif /* H_OS_MGMT_ */
0 commit comments