11#ifndef __BASE_EVENT_H__
12#define __BASE_EVENT_H__
14#include "tuya_iot_config.h"
27#ifndef EVENT_NAME_MAX_LEN
28#define EVENT_NAME_MAX_LEN (16)
35#define EVENT_DESC_MAX_LEN (32)
42#define SUBSCRIBE_TYPE_NORMAL 0
43#define SUBSCRIBE_TYPE_EMERGENCY 1
44#define SUBSCRIBE_TYPE_ONETIME 2
int(* event_subscribe_cb)(void *data)
event subscribe callback function type
Definition: base_event.h:60
int ty_event_init(void)
event initialization
int ty_publish_event(const char *name, void *data)
: publish event
BYTE_T SUBSCRIBE_TYPE_E
subscriber type
Definition: base_event.h:41
#define EVENT_DESC_MAX_LEN
max length of event description
Definition: base_event.h:35
int ty_unsubscribe_event(const char *name, const char *desc, event_subscribe_cb cb)
: unsubscribe event
int ty_subscribe_event(const char *name, const char *desc, const event_subscribe_cb cb, SUBSCRIBE_TYPE_E type)
: subscribe event
#define EVENT_NAME_MAX_LEN
max length of event name
Definition: base_event.h:28
the event manage node
Definition: base_event.h:90
the event node
Definition: base_event.h:78
the event dispatch raw data
Definition: base_event.h:50
the subscirbe node
Definition: base_event.h:66
bidirection list head
Definition: tuya_list.h:25
Common process - Initialization