TuyaOS
结构体 | 宏定义 | 类型定义 | 函数
tuya_svc_timer_task.h 文件参考

Common process - Initialization 更多...

#include "tuya_cloud_types.h"
tuya_svc_timer_task.h 的引用(Include)关系图:

浏览源代码.

结构体

struct  ALARM_TIMER_S
 

宏定义

#define LOOP_TYPE_DAILY   (1)
 
#define LOOP_TYPE_EVEN_ODD   (3)
 
#define LOOP_TYPE_HOURLY   (2)
 
#define LOOP_TYPE_INVALID   (0xFE)
 
#define LOOP_TYPE_WEEKLY   (0)
 

类型定义

typedef BYTE_T LOOP_TYPE_T
 

函数

OPERATE_RET tuya_svc_timer_add (ALARM_TIMER_S *pTimer, BOOL_T update_flash)
 add timer task. 更多...
 
OPERATE_RET tuya_svc_timer_delete (CHAR_T *timer_id, BOOL_T update_flash)
 delete timer task. 更多...
 
VOID_T tuya_svc_timer_full_req (VOID_T)
 write timer full req flag. 更多...
 
UINT_T tuya_svc_timer_get_capacity (VOID_T)
 Get the capacity of timer task. 更多...
 
VOID_T tuya_svc_timer_get_data (uint8_t *timer_data)
 get timer task data. 更多...
 
UINT_T tuya_svc_timer_get_num (VOID_T)
 Get the num of timer task. 更多...
 
UINT_T tuya_svc_timer_get_task_count (VOID_T)
 Get the count of timer task. 更多...
 
OPERATE_RET tuya_svc_timer_task_clear_db (VOID_T)
 Clear up the timer task data in flash. 更多...
 
OPERATE_RET tuya_svc_timer_task_init (UINT_T increase_unit)
 Init a timer task. 更多...
 
OPERATE_RET tuya_svc_timer_task_reset (VOID_T)
 Reset the timer task. 更多...
 

详细描述

Common process - Initialization

作者
liuka.nosp@m.ng@t.nosp@m.uya.c.nosp@m.om
版本
0.1
日期
2020-11-09

函数说明

◆ tuya_svc_timer_add()

OPERATE_RET tuya_svc_timer_add ( ALARM_TIMER_S pTimer,
BOOL_T  update_flash 
)

add timer task.

参数
[in]pTimertimer info
[in]update_flashif need update timer to flash
注解
This API is used for adding timer task.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_svc_timer_delete()

OPERATE_RET tuya_svc_timer_delete ( CHAR_T *  timer_id,
BOOL_T  update_flash 
)

delete timer task.

参数
[in]timer_idtimer id
[in]update_flashif need update timer to flash
注解
This API is used for deleting the timer task.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_svc_timer_full_req()

VOID_T tuya_svc_timer_full_req ( VOID_T  )

write timer full req flag.

参数
VOID
注解
This API is used for get full timer.
返回
void

◆ tuya_svc_timer_get_capacity()

UINT_T tuya_svc_timer_get_capacity ( VOID_T  )

Get the capacity of timer task.

参数
VOID
注解
This API is used for getting the capacity of timer task.
返回
the capacity of timer task.

◆ tuya_svc_timer_get_data()

VOID_T tuya_svc_timer_get_data ( uint8_t *  timer_data)

get timer task data.

参数
[out]timer_datatimer id and crc32
注解
This API is used for getting timer task data.
返回
void

◆ tuya_svc_timer_get_num()

UINT_T tuya_svc_timer_get_num ( VOID_T  )

Get the num of timer task.

参数
VOID
注解
This API is used for getting the num of timer task.
返回
the capacity of timer task.

◆ tuya_svc_timer_get_task_count()

UINT_T tuya_svc_timer_get_task_count ( VOID_T  )

Get the count of timer task.

参数
VOID
注解
This API is used for getting the count of timer task.
返回
the count of timer task.

◆ tuya_svc_timer_task_clear_db()

OPERATE_RET tuya_svc_timer_task_clear_db ( VOID_T  )

Clear up the timer task data in flash.

参数
VOID
注解
This API is used to clear up the timer task data in flash.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_svc_timer_task_init()

OPERATE_RET tuya_svc_timer_task_init ( UINT_T  increase_unit)

Init a timer task.

参数
[in]increase_unitincrease unit
注解
This API is used for initializing the timer task. when the task queue is full, it will expand the size with the unit user input.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ tuya_svc_timer_task_reset()

OPERATE_RET tuya_svc_timer_task_reset ( VOID_T  )

Reset the timer task.

参数
VOID
注解
This API is used to reset the timer task. the resource of timer task will be released.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h