Common process - Initialization
更多...
浏览源代码.
|
| OPERATE_RET | cmmod_cr_tm_msg_hand (IN CONST TM_MSG_CB cb, IN CONST VOID *data, OUT TM_MSG_S **tm_msg) |
| | Create timer message handle. 更多...
|
| |
| INT_T | cmmod_get_msg_node_num (VOID) |
| | Get message node count. 更多...
|
| |
| OPERATE_RET | cmmod_init (VOID) |
| | Init module handle. 更多...
|
| |
| OPERATE_RET | cmmod_post_instancy_msg (IN CONST MSG_ID msgID, IN CONST P_MSG_DATA pMsgData, IN CONST MSG_DATA_LEN msgDataLen) |
| | Post a message instantly 更多...
|
| |
| OPERATE_RET | cmmod_post_instancy_msg_malloc (IN CONST MSG_ID msgID, IN CONST P_MSG_DATA pMsgData, IN CONST MSG_DATA_LEN msgDataLen) |
| | Post a instant message with memory alloc 更多...
|
| |
| OPERATE_RET | cmmod_post_msg (IN CONST MSG_ID msgID, IN CONST P_MSG_DATA pMsgData, IN CONST MSG_DATA_LEN msgDataLen) |
| | Post a message. 更多...
|
| |
| OPERATE_RET | cmmod_post_msg_malloc (IN CONST MSG_ID msgID, IN CONST P_MSG_DATA pMsgData, IN CONST MSG_DATA_LEN msgDataLen) |
| | Post a message with memory alloc 更多...
|
| |
| OPERATE_RET | cmmod_reg_msgcb (IN CONST MSG_CALLBACK msg_cb, OUT MSG_ID *msg_id) |
| | Regist callback function for message. 更多...
|
| |
| OPERATE_RET | cmmod_release (VOID) |
| | Release module handle. 更多...
|
| |
| OPERATE_RET | cmmod_release_tm_msg (IN CONST TM_MSG_S *tm_msg) |
| | Release the timer message. 更多...
|
| |
| OPERATE_RET | cmmod_start_tm_msg (IN CONST TM_MSG_S *tm_msg, IN CONST TIME_MS timeCycle, IN CONST TIMER_TYPE timer_type) |
| | Start the timer message. 更多...
|
| |
| OPERATE_RET | cmmod_stop_tm_msg (IN CONST TM_MSG_S *tm_msg) |
| | Stop the timer message. 更多...
|
| |
| OPERATE_RET | cmmod_unreg_msgcb (IN CONST MSG_ID msgID) |
| | Unregist callback function for message. 更多...
|
| |
Common process - Initialization
- 作者
- nzy@t.nosp@m.uya..nosp@m.com
- 版本
- 0.1
- 日期
- 2020-11-09
- 版权所有
- Copyright 2020-2021 Tuya Inc. All Rights Reserved.
◆ cmmod_cr_tm_msg_hand()
| OPERATE_RET cmmod_cr_tm_msg_hand |
( |
IN CONST TM_MSG_CB |
cb, |
|
|
IN CONST VOID * |
data, |
|
|
OUT TM_MSG_S ** |
tm_msg |
|
) |
| |
Create timer message handle.
- 参数
-
| [in] | cb | callback function |
| [in] | data | message data |
| [out] | tm_msg | timer message info |
- 注解
- This API is used for creating a timer message handle
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_get_msg_node_num()
| INT_T cmmod_get_msg_node_num |
( |
VOID |
| ) |
|
Get message node count.
- 参数
-
- 注解
- This API is used for getting the count of message node.
- 返回
- the count of message node.
◆ cmmod_init()
| OPERATE_RET cmmod_init |
( |
VOID |
| ) |
|
Init module handle.
- 参数
-
- 注解
- This API is used for initializing module handle.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_post_instancy_msg()
| OPERATE_RET cmmod_post_instancy_msg |
( |
IN CONST MSG_ID |
msgID, |
|
|
IN CONST P_MSG_DATA |
pMsgData, |
|
|
IN CONST MSG_DATA_LEN |
msgDataLen |
|
) |
| |
Post a message instantly
- 参数
-
| [in] | msgID | message id |
| [in] | pMsgData | message data |
| [in] | msgDataLen | message data len |
- 注解
- This API is used for posting a message instantly
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_post_instancy_msg_malloc()
| OPERATE_RET cmmod_post_instancy_msg_malloc |
( |
IN CONST MSG_ID |
msgID, |
|
|
IN CONST P_MSG_DATA |
pMsgData, |
|
|
IN CONST MSG_DATA_LEN |
msgDataLen |
|
) |
| |
Post a instant message with memory alloc
- 参数
-
| [in] | msgID | message id |
| [in] | pMsgData | message data |
| [in] | msgDataLen | message data len |
- 注解
- This API is used for posting a instant message with memory alloc, the param of message data can be local variable
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_post_msg()
| OPERATE_RET cmmod_post_msg |
( |
IN CONST MSG_ID |
msgID, |
|
|
IN CONST P_MSG_DATA |
pMsgData, |
|
|
IN CONST MSG_DATA_LEN |
msgDataLen |
|
) |
| |
Post a message.
- 参数
-
| [in] | msgID | message id |
| [in] | pMsgData | message data |
| [in] | msgDataLen | message data len |
- 注解
- This API is used for posting a message
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_post_msg_malloc()
| OPERATE_RET cmmod_post_msg_malloc |
( |
IN CONST MSG_ID |
msgID, |
|
|
IN CONST P_MSG_DATA |
pMsgData, |
|
|
IN CONST MSG_DATA_LEN |
msgDataLen |
|
) |
| |
Post a message with memory alloc
- 参数
-
| [in] | msgID | message id |
| [in] | pMsgData | message data |
| [in] | msgDataLen | message data len |
- 注解
- This API is used for posting a message with memory alloc, the param of message data can be local variable
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_reg_msgcb()
| OPERATE_RET cmmod_reg_msgcb |
( |
IN CONST MSG_CALLBACK |
msg_cb, |
|
|
OUT MSG_ID * |
msg_id |
|
) |
| |
Regist callback function for message.
- 参数
-
| [in] | msg_cb | message callback function |
| [out] | msg_id | message id |
- 注解
- This API is used for registing message's callback function.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_release()
| OPERATE_RET cmmod_release |
( |
VOID |
| ) |
|
Release module handle.
- 参数
-
- 注解
- This API is used for releasing module handle.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_release_tm_msg()
| OPERATE_RET cmmod_release_tm_msg |
( |
IN CONST TM_MSG_S * |
tm_msg | ) |
|
Release the timer message.
- 参数
-
| [in] | tm_msg | timer message info |
- 注解
- This API is used for releasing the timer message
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_start_tm_msg()
| OPERATE_RET cmmod_start_tm_msg |
( |
IN CONST TM_MSG_S * |
tm_msg, |
|
|
IN CONST TIME_MS |
timeCycle, |
|
|
IN CONST TIMER_TYPE |
timer_type |
|
) |
| |
Start the timer message.
- 参数
-
| [in] | tm_msg | timer message info |
| [in] | timeCycle | cycle time of the timer |
| [in] | timer_type | timer type, cycle or once |
- 注解
- This API is used for starting the timer message
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_stop_tm_msg()
| OPERATE_RET cmmod_stop_tm_msg |
( |
IN CONST TM_MSG_S * |
tm_msg | ) |
|
Stop the timer message.
- 参数
-
| [in] | tm_msg | timer message info |
- 注解
- This API is used for stopping the timer message
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ cmmod_unreg_msgcb()
| OPERATE_RET cmmod_unreg_msgcb |
( |
IN CONST MSG_ID |
msgID | ) |
|
Unregist callback function for message.
- 参数
-
- 注解
- This API is used for unRegisting message's callback function.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h