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.

59 lines
1.2 KiB

12 months ago
11 months ago
12 months ago
11 months ago
9 months ago
12 months ago
9 months ago
11 months ago
9 months ago
9 months ago
9 months ago
9 months ago
12 months ago
11 months ago
9 months ago
12 months ago
9 months ago
12 months ago
11 months ago
12 months ago
11 months ago
12 months ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <functional>
  6. #include "uicontroler\tjc\tjc_constant.hpp"
  7. namespace iflytop {
  8. using namespace std;
  9. typedef enum {
  10. kAE_RunModeChangeEvent, // ����ģʽ�ı�
  11. kAppEvent_StateDisplayInfo,
  12. kAppEvent_AcidChCfgChangeEvent,
  13. // UI_EVENT
  14. KAE_UIEvent,
  15. kAE_LoginEvent,
  16. kAE_unLoginEvent,
  17. kAE_AcidStatChangeEvent, // ͳ�����ݱ仯�¼�
  18. kAE_RemoterConnectedEvent, // ң�������ӳɹ�
  19. kAE_RemoterDisConnectedEvent, // ң�����Ͽ�����
  20. } AppEventType_t;
  21. /**
  22. *
  23. * @brief
  24. *
  25. *
  26. * @ע
  27. * ׶󣬷ջ
  28. */
  29. typedef struct {
  30. AppEventType_t type;
  31. union event {
  32. uint32_t placeholder;
  33. char bleName[20];
  34. char stateDisplayInfo[30];
  35. tjc::UIEvent uiEvent;
  36. } d;
  37. } AppEvent_t;
  38. static inline AppEvent_t createAppEvent(AppEventType_t type) {
  39. AppEvent_t event;
  40. event.type = type;
  41. return event;
  42. }
  43. static inline AppEvent_t createStateDisplayInfoEvent(const char* info) {
  44. AppEvent_t event;
  45. event.type = kAppEvent_StateDisplayInfo;
  46. strncpy(event.d.stateDisplayInfo, info, sizeof(event.d.stateDisplayInfo));
  47. return event;
  48. }
  49. } // namespace iflytop