数据结构体 | |
struct | CellularCommInterface_t |
表示通信接口函数。 更多…… | |
Typedefs | |
typedef struct CellularCommInterfaceContext * | CellularCommInterfaceHandle_t |
通信接口不透明句柄。 | |
typedef CellularCommInterfaceError_t(* | CellularCommInterfaceReceiveCallback_t) (void *pUserData, CellularCommInterfaceHandle_t commInterfaceHandle) |
提供输入数据的异步通知。 更多…… | |
typedef CellularCommInterfaceError_t(* | CellularCommInterfaceOpen_t) (CellularCommInterfaceReceiveCallback_t receiveCallback, void *pUserData, CellularCommInterfaceHandle_t *pCommInterfaceHandle) |
打开与通信接口的连接。 更多…… | |
typedef CellularCommInterfaceError_t(* | CellularCommInterfaceSend_t) (CellularCommInterfaceHandle_t commInterfaceHandle, const uint8_t *pData, uint32_t dataLength, uint32_t timeoutMilliseconds, uint32_t *pDataSentLength) |
将数据发送至通信接口。 更多…… | |
typedef CellularCommInterfaceError_t(* | CellularCommInterfaceRecv_t) (CellularCommInterfaceHandle_t commInterfaceHandle, uint8_t *pBuffer, uint32_t bufferLength, uint32_t timeoutMilliseconds, uint32_t *pDataReceivedLength) |
从通信接口接收数据。 更多…… | |
typedef CellularCommInterfaceError_t(* | CellularCommInterfaceClose_t) (CellularCommInterfaceHandle_t commInterfaceHandle) |
关闭与通信接口的连接。 更多…… | |
typedef CellularCommInterfaceError_t(* CellularCommInterfaceReceiveCallback_t) (void *pUserData, CellularCommInterfaceHandle_t commInterfaceHandle) |
提供输入数据的异步通知。
CellularCommInterfaceOpen_t 中提供此签名的函数,只要通信接口上有可读数据时,即使用此函数进行通知。
[in] | pUserData | 拟于回调中提供的用户数据。 |
[in] | commInterfaceHandle | 通信接口的对应句柄。 |
typedef CellularCommInterfaceError_t(* CellularCommInterfaceOpen_t) (CellularCommInterfaceReceiveCallback_t receiveCallback, void *pUserData, CellularCommInterfaceHandle_t *pCommInterfaceHandle) |
打开与通信接口的连接。
[in] | receiveCallback | 通信接口上有可读数据时拟调用的回调函数。 |
[in] | pUserData | 拟于回调中提供的用户数据。 |
[out] | pCommInterfaceHandle | 拟提供通信接口句柄的输出参数。 |
typedef CellularCommInterfaceError_t(* CellularCommInterfaceSend_t) (CellularCommInterfaceHandle_t commInterfaceHandle, const uint8_t *pData, uint32_t dataLength, uint32_t timeoutMilliseconds, uint32_t *pDataSentLength) |
将数据发送至通信接口。
[in] | commInterfaceHandle | 从 CellularCommInterfaceOpen_t 调用返回的通信接口句柄。 |
[in] | pData | 拟发送的数据。 |
[in] | dataLength | 拟发送数据的长度。 |
[in] | timeoutMilliseconds | 发送操作超时时间(单位:毫秒)。 |
[out] | pDataSentLength | 提供所发送实际数据长度的输出参数。请注意,如果无法发送完整数据,则长度可能小于 dataLength。 |
typedef CellularCommInterfaceError_t(* CellularCommInterfaceRecv_t) (CellularCommInterfaceHandle_t commInterfaceHandle, uint8_t *pBuffer, uint32_t bufferLength, uint32_t timeoutMilliseconds, uint32_t *pDataReceivedLength) |
从通信接口接收数据。
[in] | commInterfaceHandle | 从 CellularCommInterfaceOpen_t 调用返回的通信接口句柄。 |
[in] | pBuffer | 接收数据的缓冲区。 |
[in] | bufferLength | 缓冲区 pBuffer 的长度。 |
[in] | timeoutMilliseconds | 接收操作超时时间(单位:毫秒)。 |
[out] | pDataReceivedLength | 提供缓冲区 pBuffer 接收实际数据长度的输出参数。请注意,此参数可能小于 bufferLength。 |
typedef CellularCommInterfaceError_t(* CellularCommInterfaceClose_t) (CellularCommInterfaceHandle_t commInterfaceHandle) |
关闭与通信接口的连接。
[in] | commInterfaceHandle | CellularCommInterfaceOpen_t 调用函数返回的通信接口句柄。 |