T-Box Basic dev
Loading...
Searching...
No Matches
sys_status.h
Go to the documentation of this file.
1
10#ifndef SYS_STATUS_H
11#define SYS_STATUS_H
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif
17
18#include <stdbool.h>
19
20// 系统状态配置
21#define SYS_ARM_ACTIVE_STATUS_CYC_SEC 15
22// 业务工作状态链表节点
23typedef struct sys_bus_status
24{
25 struct sys_bus_status* next;
26 char app_name[64];
27 bool active;
28} sys_bus_status_t;
29
30typedef enum
31{
32 WORK_TYPE_ARM_APP = 0,
33 WORK_TYPE_CAN_NM,
34 WORK_TYPE_MAX
35} sys_work_type_t;
36
37typedef enum
38{
39 WORK_STATUS_INACTIVE = 0,
40 WORK_STATUS_ACTIVE,
41} sys_work_status_t;
42
50int sys_set_bus_work_status(sys_work_type_t type, const char* app_name, bool active);
51
57bool sys_get_bus_work_status(sys_work_type_t type);
58
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif /* SYS_STATUS_H */
Definition sys_status.h:24
void sys_sync_work_status(void)
周期性同步模组工作状态到MCU
bool sys_get_bus_work_status(sys_work_type_t type)
获取指定类型的业务状态
int sys_set_bus_work_status(sys_work_type_t type, const char *app_name, bool active)
设置业务工作状态(内部接口,按投票类型分发)