English
English
简体中文
Register
Log In
English
English
简体中文
Register
Log In
Language
English
English
简体中文
Register
Log In

Currently, the tuya_ipc_notify_alarm interface is used for pushing events. Can this interface carry event timestamps?

Last Updated on2024-09-19 02:40:37
Currently, this interface does not support the use of event stamps. If needed, you can use the tuya_ipc_trigger_alarm_without_event interface, the usage is as follows:
  • OPERATE_RET tuya_ipc_trigger_alarm_without_event(TUYA_ALARM_T *alarm); To solve the assignment of the input parameter alarm:
  • alarm_info.type = NOTIFICATION_NAME_MOTION;//Assign according to the actual type
  • alarm_info.is_notify = md_enable;alarm_info.trigger_time = tal_time_get_posix();//Timestamp
  • alarm_info.upload_time = 0;
  • alarm_info.valid = 1;
  • alarm_info.force = 1;
  • alarm_info.resource_type = RESOURCE_PIC;
  • alarm_info.pic_buf = (CHAR_T *)snap_buffer;
  • alarm_info.pic_size = snap_size;
  • alarm_info.extra_data = NULL;
  • alarm_info.context = NULL;
  • alarm_info.context_cnt = 0;
  • alarm_info.media = NULL;
  • alarm_info.media_cnt = 0;
  • Click for services and help

    Help Center