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

Common process - base rpc 更多...

#include "tuya_slist.h"
#include "tal_workq_service.h"
#include "tal_sw_timer.h"
#include "tal_mutex.h"
rpc_base.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  rpc_base_t
 

类型定义

typedef int(* rpc_recv_cb) (char *addr, uint8_t *data, uint32_t data_len, void *priv_data, uint16_t sequence)
 rpc received callback 更多...
 
typedef int(* rpc_reply_cb) (char *addr, uint8_t *data, uint32_t data_len, void *priv_data, uint8_t *fuck_key)
 rpc reply callback 更多...
 
typedef int(* rpc_send_cb) (char *addr, uint8_t *data, uint32_t data_len, void *priv_data)
 rpc send callback 更多...
 

函数

int rpc_base_frame_process (rpc_base_t *base, char *addr, uint8_t *frame, uint32_t frame_len, uint8_t *fuck_key)
 rpc base reply 更多...
 
int rpc_base_init (rpc_base_t *base, rpc_base_cfg_t *cfg)
 rpc base init 更多...
 
int rpc_base_notify (rpc_base_t *base, rpc_msg_t *msg)
 rpc base notify 更多...
 
int rpc_base_reply (rpc_base_t *base, rpc_msg_t *msg, uint16_t sequence)
 rpc base reply 更多...
 
int rpc_base_request (rpc_base_t *base, rpc_msg_t *msg)
 rpc base request 更多...
 

详细描述

Common process - base rpc

版本
0.1
日期
2018-09-01

类型定义说明

◆ rpc_recv_cb

typedef int(* rpc_recv_cb) (char *addr, uint8_t *data, uint32_t data_len, void *priv_data, uint16_t sequence)

rpc received callback

参数
[in]addrpeer addr
[in]datareceived data
[in]data_lenreceived length
[in]priv_datauser private data
[in]sequencesequence
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ rpc_reply_cb

typedef int(* rpc_reply_cb) (char *addr, uint8_t *data, uint32_t data_len, void *priv_data, uint8_t *fuck_key)

rpc reply callback

参数
[in]addrpeer addr, if NULL means timeout
[out]datareceived data
[out]data_lenreceived length
[in]priv_datauser private data
[in]fuck_keyfast useful channel key
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ rpc_send_cb

typedef int(* rpc_send_cb) (char *addr, uint8_t *data, uint32_t data_len, void *priv_data)

rpc send callback

参数
[in]addrpeer addr
[in]datasend data
[in]lensend length
[in]priv_datauser private data
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

函数说明

◆ rpc_base_frame_process()

int rpc_base_frame_process ( rpc_base_t base,
char *  addr,
uint8_t *  frame,
uint32_t  frame_len,
uint8_t *  fuck_key 
)

rpc base reply

参数
[in]basehandle
[in]addrpeer addr
[in]framereceived frame data
[in]frame_lenreceived frame len
[in]fuck_keyfast useful channel key
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ rpc_base_init()

int rpc_base_init ( rpc_base_t base,
rpc_base_cfg_t cfg 
)

rpc base init

参数
[in]basehandle
[in]cfgrefer to rpc_base_cfg_t struct
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ rpc_base_notify()

int rpc_base_notify ( rpc_base_t base,
rpc_msg_t msg 
)

rpc base notify

参数
[in]basehandle
[in]cfgrefer to rpc_base_cfg_t struct
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ rpc_base_reply()

int rpc_base_reply ( rpc_base_t base,
rpc_msg_t msg,
uint16_t  sequence 
)

rpc base reply

参数
[in]basehandle
[in]cfgrefer to rpc_base_cfg_t struct
[in]sequencesequence
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h

◆ rpc_base_request()

int rpc_base_request ( rpc_base_t base,
rpc_msg_t msg 
)

rpc base request

参数
[in]basehandle
[in]msgrefer to rpc_msg_t struct
返回
OPRT_OK on success. Others on error, please refer to tuya_error_code.h