Common process - Initialization
更多...
#include "tuya_cloud_types.h"
浏览源代码.
|
|
#define | TKL_QUEUE_WAIT_FROEVER 0xFFFFFFFF |
| |
|
|
typedef VOID_T * | TKL_QUEUE_HANDLE |
| |
|
| OPERATE_RET | tkl_queue_create_init (TKL_QUEUE_HANDLE *queue, INT_T msgsize, INT_T msgcount) |
| | Create message queue 更多...
|
| |
| OPERATE_RET | tkl_queue_fetch (CONST TKL_QUEUE_HANDLE queue, VOID_T *msg, UINT_T timeout) |
| | fetch message from the message queue 更多...
|
| |
| VOID_T | tkl_queue_free (CONST TKL_QUEUE_HANDLE queue) |
| | free the message queue 更多...
|
| |
| OPERATE_RET | tkl_queue_post (CONST TKL_QUEUE_HANDLE queue, VOID_T *data, UINT_T timeout) |
| | post a message to the message queue 更多...
|
| |
Common process - Initialization
- 版本
- 0.1
- 日期
- 2021-01-04
- 版权所有
- Copyright 2021-2030 Tuya Inc. All Rights Reserved.
◆ tkl_queue_create_init()
| OPERATE_RET tkl_queue_create_init |
( |
TKL_QUEUE_HANDLE * |
queue, |
|
|
INT_T |
msgsize, |
|
|
INT_T |
msgcount |
|
) |
| |
Create message queue
- 参数
-
| [in] | msgsize | message size |
| [in] | msgcount | message number |
| [out] | queue | the queue handle created |
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ tkl_queue_fetch()
| OPERATE_RET tkl_queue_fetch |
( |
CONST TKL_QUEUE_HANDLE |
queue, |
|
|
VOID_T * |
msg, |
|
|
UINT_T |
timeout |
|
) |
| |
fetch message from the message queue
- 参数
-
| [in] | queue | the message queue handle |
| [in,out] | msg | the message fetch form the message queue |
| [in] | timeout | timeout time |
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ tkl_queue_free()
| VOID_T tkl_queue_free |
( |
CONST TKL_QUEUE_HANDLE |
queue | ) |
|
free the message queue
- 参数
-
| [in] | queue | the message queue handle |
- 返回
- VOID_T
◆ tkl_queue_post()
| OPERATE_RET tkl_queue_post |
( |
CONST TKL_QUEUE_HANDLE |
queue, |
|
|
VOID_T * |
data, |
|
|
UINT_T |
timeout |
|
) |
| |
post a message to the message queue
- 参数
-
| [in] | queue | the handle of the queue |
| [in] | data | the data of the message |
| [in] | timeout | timeout time |
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h