Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
os_mgmt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018-2021 mcumgr authors
3 * Copyright (c) 2022 Laird Connectivity
4 * Copyright (c) 2023 Nordic Semiconductor ASA
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
9#ifndef H_OS_MGMT_
10#define H_OS_MGMT_
11
19#ifdef __cplusplus
20extern "C" {
21#endif
22
27#define OS_MGMT_ID_ECHO 0
28#define OS_MGMT_ID_CONS_ECHO_CTRL 1
29#define OS_MGMT_ID_TASKSTAT 2
30#define OS_MGMT_ID_MPSTAT 3
31#define OS_MGMT_ID_DATETIME_STR 4
32#define OS_MGMT_ID_RESET 5
33#define OS_MGMT_ID_MCUMGR_PARAMS 6
34#define OS_MGMT_ID_INFO 7
35#define OS_MGMT_ID_BOOTLOADER_INFO 8
65
87
88/* Structure provided in the #MGMT_EVT_OP_OS_MGMT_INFO_CHECK notification callback */
101
102/* Structure provided in the MGMT_EVT_OP_OS_MGMT_INFO_APPEND notification callback */
124 /* If there has been prior output, must be set to true if a response has been output */
126};
127
128#ifdef __cplusplus
129}
130#endif
131
136#endif /* H_OS_MGMT_ */
os_mgmt_err_code_t
Command result codes for OS management group.
Definition os_mgmt.h:43
os_mgmt_info_formats
OS/Application information formats.
Definition os_mgmt.h:74
@ OS_MGMT_ERR_RTC_COMMAND_FAILED
RTC command failed.
Definition os_mgmt.h:60
@ OS_MGMT_ERR_OK
No error, this is implied if there is no ret value in the response.
Definition os_mgmt.h:45
@ OS_MGMT_ERR_QUERY_RESPONSE_VALUE_NOT_VALID
Query was recognized but there is no valid value for the response.
Definition os_mgmt.h:63
@ OS_MGMT_ERR_UNKNOWN
Unknown error occurred.
Definition os_mgmt.h:48
@ OS_MGMT_ERR_RTC_NOT_SET
RTC is not set.
Definition os_mgmt.h:57
@ OS_MGMT_ERR_INVALID_FORMAT
The provided format value is not valid.
Definition os_mgmt.h:51
@ OS_MGMT_ERR_QUERY_YIELDS_NO_ANSWER
Query was not recognized.
Definition os_mgmt.h:54
@ OS_MGMT_INFO_FORMAT_KERNEL_VERSION
Kernel version.
Definition os_mgmt.h:78
@ OS_MGMT_INFO_FORMAT_PROCESSOR
Processor.
Definition os_mgmt.h:81
@ OS_MGMT_INFO_FORMAT_KERNEL_RELEASE
Kernel release.
Definition os_mgmt.h:77
@ OS_MGMT_INFO_FORMAT_HARDWARE_PLATFORM
Hardware platform.
Definition os_mgmt.h:82
@ OS_MGMT_INFO_FORMAT_MACHINE
Machine.
Definition os_mgmt.h:80
@ OS_MGMT_INFO_FORMAT_NODE_NAME
Node name.
Definition os_mgmt.h:76
@ OS_MGMT_INFO_FORMAT_OPERATING_SYSTEM
Operating system.
Definition os_mgmt.h:83
@ OS_MGMT_INFO_FORMAT_USER_CUSTOM_START
Custom user-level start bit.
Definition os_mgmt.h:85
@ OS_MGMT_INFO_FORMAT_BUILD_DATE_TIME
Build date and time.
Definition os_mgmt.h:79
@ OS_MGMT_INFO_FORMAT_KERNEL_NAME
Kernel name.
Definition os_mgmt.h:75
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Definition os_mgmt.h:103
uint8_t * output
The output buffer which the responses should be appended to.
Definition os_mgmt.h:114
uint32_t * format_bitmask
The format bitmask from the processed commands, the bits should be cleared once processed,...
Definition os_mgmt.h:108
bool all_format_specified
Will be true if the all 'a' specifier was provided.
Definition os_mgmt.h:110
bool * prior_output
Definition os_mgmt.h:125
uint16_t * output_length
The current size of the output response in the output buffer, must be updated to be the size of the o...
Definition os_mgmt.h:118
uint16_t buffer_size
The size of the output buffer, including null terminator character, if the output response would exce...
Definition os_mgmt.h:123
Definition os_mgmt.h:89
uint32_t * format_bitmask
Bitmask of values specifying which outputs should be present.
Definition os_mgmt.h:93
bool * custom_os_name
Needs to be set to true if the OS name is being provided by external code.
Definition os_mgmt.h:99
uint16_t * valid_formats
Number of valid format characters parsed, must be incremented by 1 for each valid character.
Definition os_mgmt.h:97
struct zcbor_string * format
Input format string from the mcumgr client.
Definition os_mgmt.h:91