TuyaOS
宏定义 | 函数
com_mmod.h 文件参考

Common process - Initialization 更多...

#include "uni_msg_queue.h"
com_mmod.h 的引用(Include)关系图:

浏览源代码.

宏定义

#define release_tm_msg_hand   cmmod_release_tm_msg
 
#define start_tm_msg   cmmod_start_tm_msg
 

函数

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

函数说明

◆ 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]cbcallback function
[in]datamessage data
[out]tm_msgtimer 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.

参数
VOID
注解
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.

参数
VOID
注解
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]msgIDmessage id
[in]pMsgDatamessage data
[in]msgDataLenmessage 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]msgIDmessage id
[in]pMsgDatamessage data
[in]msgDataLenmessage 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]msgIDmessage id
[in]pMsgDatamessage data
[in]msgDataLenmessage 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]msgIDmessage id
[in]pMsgDatamessage data
[in]msgDataLenmessage 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_cbmessage callback function
[out]msg_idmessage 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.

参数
VOID
注解
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_msgtimer 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_msgtimer message info
[in]timeCyclecycle time of the timer
[in]timer_typetimer 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_msgtimer 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.

参数
[in]msgIDmessage id
注解
This API is used for unRegisting message's callback function.
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h