You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
864 B
48 lines
864 B
#pragma once
|
|
#include <stdint.h>
|
|
|
|
#include <functional>
|
|
|
|
#include "uicontroler/tjc/tjc_base_type.h"
|
|
|
|
typedef enum {
|
|
KAE_callOnAppEventBusLoop,
|
|
|
|
kAE_RunModeChangeEvent, // 运行模式改变
|
|
|
|
kAppEvent_StateDisplayInfo,
|
|
kAppEvent_AcidChCfgChangeEvent,
|
|
|
|
// UI_EVENT
|
|
KAE_UIEvent,
|
|
kAE_LoginEvent,
|
|
kAE_unLoginEvent,
|
|
KAE_PageChangeEvent,
|
|
|
|
kAE_AcidStatChangeEvent, // 统计数据变化事件
|
|
kAE_RemoterConnectedEvent, // 遥控器连接成功
|
|
kAE_RemoterDisConnectedEvent, // 遥控器断开连接
|
|
|
|
} AppEventType_t;
|
|
|
|
/**
|
|
*
|
|
* @注意
|
|
* 下面这个结构不易定义过大,否则容易造成栈溢出
|
|
*/
|
|
|
|
// typedef struct {
|
|
// } AppEvent;
|
|
|
|
class AppEvent {
|
|
public:
|
|
AppEventType_t type;
|
|
union {
|
|
uint32_t placeholder;
|
|
char bleName[20];
|
|
char stateDisplayInfo[30];
|
|
UIEvent uiEvent;
|
|
int32_t pageChangeTo;
|
|
} d;
|
|
std::function<void()> onfnc;
|
|
};
|