-
Notifications
You must be signed in to change notification settings - Fork 77
/
os_mgmt.h
62 lines (53 loc) · 1.63 KB
/
os_mgmt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifndef H_OS_MGMT_
#define H_OS_MGMT_
#ifdef __cplusplus
extern "C" {
#endif
/**
* Command IDs for OS management group.
*/
#define OS_MGMT_ID_ECHO 0
#define OS_MGMT_ID_CONS_ECHO_CTRL 1
#define OS_MGMT_ID_TASKSTAT 2
#define OS_MGMT_ID_MPSTAT 3
#define OS_MGMT_ID_DATETIME_STR 4
#define OS_MGMT_ID_RESET 5
#define OS_MGMT_TASK_NAME_LEN 32
struct os_mgmt_task_info {
uint8_t oti_prio;
uint8_t oti_taskid;
uint8_t oti_state;
uint16_t oti_stkusage;
uint16_t oti_stksize;
uint32_t oti_cswcnt;
uint32_t oti_runtime;
uint32_t oti_last_checkin;
uint32_t oti_next_checkin;
char oti_name[OS_MGMT_TASK_NAME_LEN];
};
/**
* @brief Registers the OS management command handler group.
*/
void os_mgmt_register_group(void);
#ifdef __cplusplus
}
#endif
#endif /* H_OS_MGMT_ */