#include "cellular_types.h"
#include <stdint.h>
 
Go to the source code of this file.
 | 
| 
typedef struct CellularCommInterfaceContext *  | CellularCommInterfaceHandle_t | 
|   | Opaque handle to comm interface. 
  | 
|   | 
| typedef CellularCommInterfaceError_t(*  | CellularCommInterfaceReceiveCallback_t) (void *pUserData, CellularCommInterfaceHandle_t commInterfaceHandle) | 
|   | Provide an asynchronous notification of incoming data.  More...
  | 
|   | 
| typedef CellularCommInterfaceError_t(*  | CellularCommInterfaceOpen_t) (CellularCommInterfaceReceiveCallback_t receiveCallback, void *pUserData, CellularCommInterfaceHandle_t *pCommInterfaceHandle) | 
|   | Open a connection to the comm interface.  More...
  | 
|   | 
| typedef 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.  More...
  | 
|   | 
| typedef 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.  More...
  | 
|   | 
| typedef CellularCommInterfaceError_t(*  | CellularCommInterfaceClose_t) (CellularCommInterfaceHandle_t commInterfaceHandle) | 
|   | Close the connection to the comm interface.  More...
  | 
|   | 
◆ CellularCommInterfaceReceiveCallback_t
Provide an asynchronous notification of incoming data. 
A function of this signature is supplied in CellularCommInterfaceOpen_t and is used to notify whenever data is available for reading on the comm interface.
- Parameters
 - 
  
    | [in] | pUserData | Userdata to be provided in the callback.  | 
    | [in] | commInterfaceHandle | Handle corresponding to the comm interface. | 
  
   
- Returns
 - IOT_COMM_INTERFACE_SUCCESS if the operation is successful, and need to yield from ISR IOT_COMM_INTERFACE_BUSY if the operation is successful, otherwise an error code indicating the cause of the error. 
 
 
 
◆ CellularCommInterfaceOpen_t
Open a connection to the comm interface. 
- Parameters
 - 
  
    | [in] | receiveCallback | Callback to be invoked whenever there is data available for reading from the comm interface.  | 
    | [in] | pUserData | Userdata to be provided in the callback.  | 
    | [out] | pCommInterfaceHandle | Out parameter to provide the comm interface handle. | 
  
   
- Returns
 - IOT_COMM_INTERFACE_SUCCESS if the operation is successful, otherwise an error code indicating the cause of the error. 
 
 
 
◆ CellularCommInterfaceSend_t
Send data to the comm interface. 
- Parameters
 - 
  
    | [in] | commInterfaceHandle | Comm interface handle as returned from the CellularCommInterfaceOpen_t call.  | 
    | [in] | pData | The data to send.  | 
    | [in] | dataLength | Length of the data to send.  | 
    | [in] | timeoutMilliseconds | Timeout in milliseconds for the send operation.  | 
    | [out] | pDataSentLength | Out parameter to provide the length of the actual data sent. Note that it may be less than the dataLength in case complete data could not be sent. | 
  
   
- Returns
 - IOT_COMM_INTERFACE_SUCCESS if the operation is successful, otherwise an error code indicating the cause of the error. 
 
 
 
◆ CellularCommInterfaceRecv_t
Receive data from the comm interface. 
- Parameters
 - 
  
    | [in] | commInterfaceHandle | Comm interface handle as returned from the CellularCommInterfaceOpen_t call.  | 
    | [in] | pBuffer | The buffer to receive the data into.  | 
    | [in] | bufferLength | The length of the buffer pBuffer.  | 
    | [in] | timeoutMilliseconds | Timeout in milliseconds for the receive operation.  | 
    | [out] | pDataReceivedLength | Out parameter to provide the length of the actual data received in the buffer pBuffer. Note that it may be less than the bufferLength. | 
  
   
- Returns
 - IOT_COMM_INTERFACE_SUCCESS if the operation is successful, otherwise an error code indicating the cause of the error. 
 
 
 
◆ CellularCommInterfaceClose_t
Close the connection to the comm interface. 
- Parameters
 - 
  
    | [in] | commInterfaceHandle | Comm interface handle as returned from the CellularCommInterfaceOpen_t call. | 
  
   
- Returns
 - IOT_COMM_INTERFACE_SUCCESS if the operation is successful, otherwise an error code indicating the cause of the error. 
 
 
 
◆ CellularCommInterfaceError_t
Return codes from various APIs. 
| Enumerator | 
|---|
| IOT_COMM_INTERFACE_SUCCESS  | Function successfully completed.  
 | 
| IOT_COMM_INTERFACE_FAILURE  | Generic failure not covered by other values.  
 | 
| IOT_COMM_INTERFACE_BAD_PARAMETER  | At least one parameter was invalid.  
 | 
| IOT_COMM_INTERFACE_NO_MEMORY  | Memory allocation failed.  
 | 
| IOT_COMM_INTERFACE_TIMEOUT  | Operation timed out.  
 | 
| IOT_COMM_INTERFACE_DRIVER_ERROR  | An error occurred when calling a low level driver API.  
 | 
| IOT_COMM_INTERFACE_BUSY  | The interface is currently busy.  
 |