32#ifndef __CELLULAR_COMM_INTERFACE_H__
33#define __CELLULAR_COMM_INTERFACE_H__
49typedef enum CellularCommInterfaceError
60struct CellularCommInterfaceContext;
115 const uint8_t * pData,
117 uint32_t timeoutMilliseconds,
118 uint32_t * pDataSentLength );
138 uint32_t bufferLength,
139 uint32_t timeoutMilliseconds,
140 uint32_t * pDataReceivedLength );
159typedef struct CellularCommInterface
CellularCommInterfaceError_t(* CellularCommInterfaceRecv_t)(CellularCommInterfaceHandle_t commInterfaceHandle, uint8_t *pBuffer, uint32_t bufferLength, uint32_t timeoutMilliseconds, uint32_t *pDataReceivedLength)
Receive data from the comm interface.
Definition: cellular_comm_interface.h:136
CellularCommInterfaceError_t(* CellularCommInterfaceReceiveCallback_t)(void *pUserData, CellularCommInterfaceHandle_t commInterfaceHandle)
Provide an asynchronous notification of incoming data.
Definition: cellular_comm_interface.h:80
CellularCommInterfaceError_t(* CellularCommInterfaceClose_t)(CellularCommInterfaceHandle_t commInterfaceHandle)
Close the connection to the comm interface.
Definition: cellular_comm_interface.h:151
CellularCommInterfaceError_t(* CellularCommInterfaceSend_t)(CellularCommInterfaceHandle_t commInterfaceHandle, const uint8_t *pData, uint32_t dataLength, uint32_t timeoutMilliseconds, uint32_t *pDataSentLength)
Send data to the comm interface.
Definition: cellular_comm_interface.h:114
CellularCommInterfaceError_t(* CellularCommInterfaceOpen_t)(CellularCommInterfaceReceiveCallback_t receiveCallback, void *pUserData, CellularCommInterfaceHandle_t *pCommInterfaceHandle)
Open a connection to the comm interface.
Definition: cellular_comm_interface.h:95
CellularCommInterfaceError_t
Return codes from various APIs.
Definition: cellular_comm_interface.h:50
@ IOT_COMM_INTERFACE_SUCCESS
Definition: cellular_comm_interface.h:51
@ IOT_COMM_INTERFACE_NO_MEMORY
Definition: cellular_comm_interface.h:54
@ IOT_COMM_INTERFACE_BAD_PARAMETER
Definition: cellular_comm_interface.h:53
@ IOT_COMM_INTERFACE_FAILURE
Definition: cellular_comm_interface.h:52
@ IOT_COMM_INTERFACE_DRIVER_ERROR
Definition: cellular_comm_interface.h:56
@ IOT_COMM_INTERFACE_TIMEOUT
Definition: cellular_comm_interface.h:55
@ IOT_COMM_INTERFACE_BUSY
Definition: cellular_comm_interface.h:57
struct CellularCommInterfaceContext * CellularCommInterfaceHandle_t
Opaque handle to comm interface.
Definition: cellular_comm_interface.h:65
Represents the functions of a comm interface.
Definition: cellular_comm_interface.h:160
CellularCommInterfaceRecv_t recv
Definition: cellular_comm_interface.h:163
CellularCommInterfaceSend_t send
Definition: cellular_comm_interface.h:162
CellularCommInterfaceClose_t close
Definition: cellular_comm_interface.h:164
CellularCommInterfaceOpen_t open
Definition: cellular_comm_interface.h:161