30#ifndef __CELLULAR_COMM_INTERFACE_H__
31#define __CELLULAR_COMM_INTERFACE_H__
47typedef enum CellularCommInterfaceError
58struct CellularCommInterfaceContext;
113 const uint8_t * pData,
115 uint32_t timeoutMilliseconds,
116 uint32_t * pDataSentLength );
136 uint32_t bufferLength,
137 uint32_t timeoutMilliseconds,
138 uint32_t * pDataReceivedLength );
157typedef 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:134
CellularCommInterfaceError_t(* CellularCommInterfaceReceiveCallback_t)(void *pUserData, CellularCommInterfaceHandle_t commInterfaceHandle)
Provide an asynchronous notification of incoming data.
Definition: cellular_comm_interface.h:78
CellularCommInterfaceError_t(* CellularCommInterfaceClose_t)(CellularCommInterfaceHandle_t commInterfaceHandle)
Close the connection to the comm interface.
Definition: cellular_comm_interface.h:149
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:112
CellularCommInterfaceError_t(* CellularCommInterfaceOpen_t)(CellularCommInterfaceReceiveCallback_t receiveCallback, void *pUserData, CellularCommInterfaceHandle_t *pCommInterfaceHandle)
Open a connection to the comm interface.
Definition: cellular_comm_interface.h:93
CellularCommInterfaceError_t
Return codes from various APIs.
Definition: cellular_comm_interface.h:48
@ IOT_COMM_INTERFACE_SUCCESS
Definition: cellular_comm_interface.h:49
@ IOT_COMM_INTERFACE_NO_MEMORY
Definition: cellular_comm_interface.h:52
@ IOT_COMM_INTERFACE_BAD_PARAMETER
Definition: cellular_comm_interface.h:51
@ IOT_COMM_INTERFACE_FAILURE
Definition: cellular_comm_interface.h:50
@ IOT_COMM_INTERFACE_DRIVER_ERROR
Definition: cellular_comm_interface.h:54
@ IOT_COMM_INTERFACE_TIMEOUT
Definition: cellular_comm_interface.h:53
@ IOT_COMM_INTERFACE_BUSY
Definition: cellular_comm_interface.h:55
struct CellularCommInterfaceContext * CellularCommInterfaceHandle_t
Opaque handle to comm interface.
Definition: cellular_comm_interface.h:63
Represents the functions of a comm interface.
Definition: cellular_comm_interface.h:158
CellularCommInterfaceRecv_t recv
Definition: cellular_comm_interface.h:161
CellularCommInterfaceSend_t send
Definition: cellular_comm_interface.h:160
CellularCommInterfaceClose_t close
Definition: cellular_comm_interface.h:162
CellularCommInterfaceOpen_t open
Definition: cellular_comm_interface.h:159