28#ifndef __CELLULAR_COMMON_INTERNAL_H__
29#define __CELLULAR_COMMON_INTERNAL_H__
39#include "cellular_platform.h"
40#ifndef CELLULAR_DO_NOT_USE_CUSTOM_CONFIG
42 #include "cellular_config.h"
45#include "cellular_pkthandler_internal.h"
47#include "cellular_pktio_internal.h"
51#define PKTIO_READ_BUFFER_SIZE ( CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE )
52#define PKTIO_WRITE_BUFFER_SIZE ( CELLULAR_AT_CMD_MAX_SIZE )
60typedef enum CellularNetworkRegType
73typedef struct _callbackEvents
91typedef struct cellularAtData
198void _Cellular_InitAtData( CellularContext_t * pContext,
208bool _Cellular_CreateAtDataMutex( CellularContext_t * pContext );
218void _Cellular_DestroyAtDataMutex( CellularContext_t * pContext );
228void _Cellular_LockAtDataMutex( CellularContext_t * pContext );
237void _Cellular_UnlockAtDataMutex( CellularContext_t * pContext );
struct CellularCommInterfaceContext * CellularCommInterfaceHandle_t
Opaque handle to comm interface.
Definition: cellular_comm_interface.h:65
CellularPktStatus_t(* CellularUndefinedRespCallback_t)(void *pCallbackContext, const char *pLine)
Undefined response callback function.
Definition: cellular_common.h:223
CellularPktStatus_t(* CellularInputBufferCallback_t)(void *pInputBufferCallbackContext, char *pBuffer, uint32_t bufferLength, uint32_t *pBufferLengthHandled)
Callback used to process input buffer.
Definition: cellular_common.h:240
CellularPktStatus_t(* CellularATCommandDataPrefixCallback_t)(void *pCallbackContext, char *pLine, uint32_t lineLength, char **pDataStart, uint32_t *pDataLength)
Callback used to inform pktio the data start and the length of the data.
Definition: cellular_common.h:192
CellularPktStatus_t(* CellularATCommandDataSendPrefixCallback_t)(void *pCallbackContext, char *pLine, uint32_t *pBytesRead)
Callback used to fix the stream before the send data.
Definition: cellular_common.h:209
This represents the default values for the configuration macros for the Cellular library.
#define CELLULAR_NUM_SOCKET_MAX
Cellular module number of socket max size.
Definition: cellular_config_defaults.h:213
#define CELLULAR_CONFIG_MAX_PREFIX_STRING_LENGTH
Cellular AT command response prefix string length.
Definition: cellular_config_defaults.h:401
CellularNetworkRegistrationStatus_t
Represents network registration status. Reference 3GPP TS 27.007 network registration status.
Definition: cellular_types.h:181
CellularPktStatus_t
packet Status Names.
Definition: cellular_types.h:338
CellularATCommandType_t
Represents AT Command type.
Definition: cellular_types.h:360
CellularRat_t
Enums representing Radio Access Technologies (RATs). Reference 3GPP TS 27.007 PLMN selection +COPS.
Definition: cellular_types.h:111
CellularNetworkRegType_t
Cellular network register URC type.
Definition: cellular_common_internal.h:61
@ CELLULAR_REG_TYPE_CEREG
Definition: cellular_common_internal.h:64
@ CELLULAR_REG_TYPE_MAX
Definition: cellular_common_internal.h:65
@ CELLULAR_REG_TYPE_CREG
Definition: cellular_common_internal.h:62
@ CELLULAR_REG_TYPE_UNKNOWN
Definition: cellular_common_internal.h:66
@ CELLULAR_REG_TYPE_CGREG
Definition: cellular_common_internal.h:63
void(* CellularModemEventCallback_t)(CellularModemEvent_t modemEvent, void *pCallbackContext)
Callback used to inform about modem events.
Definition: cellular_types.h:789
void(* CellularUrcSignalStrengthChangedCallback_t)(CellularUrcEvent_t urcEvent, const CellularSignalInfo_t *pSignalInfo, void *pCallbackContext)
Callback used to inform about signal strength changed URC event.
Definition: cellular_types.h:766
void(* CellularUrcPdnEventCallback_t)(CellularUrcEvent_t urcEvent, uint8_t contextId, void *pCallbackContext)
Callback used to inform about PDN URC events.
Definition: cellular_types.h:753
void(* CellularUrcNetworkRegistrationCallback_t)(CellularUrcEvent_t urcEvent, const CellularServiceStatus_t *pServiceStatus, void *pCallbackContext)
Callback used to inform about a Network Registration URC event.
Definition: cellular_types.h:740
CellularPktStatus_t(* CellularATCommandResponseReceivedCallback_t)(CellularHandle_t cellularHandle, const CellularATCommandResponse_t *pAtResp, void *pData, uint16_t dataLen)
Callback used to inform about the response of an AT command sent using Cellular_ATCommandRaw API.
Definition: cellular_types.h:726
void(* CellularUrcGenericCallback_t)(const char *pRawData, void *pCallbackContext)
Generic callback used to inform all other URC events.
Definition: cellular_types.h:778
Represents different URC event callback registration function.
Definition: cellular_common_internal.h:74
CellularUrcNetworkRegistrationCallback_t networkRegistrationCallback
Definition: cellular_common_internal.h:75
void * pPdnEventCallbackContext
Definition: cellular_common_internal.h:78
void * pModemEventCallbackContext
Definition: cellular_common_internal.h:84
CellularUrcGenericCallback_t genericCallback
Definition: cellular_common_internal.h:81
CellularModemEventCallback_t modemEventCallback
Definition: cellular_common_internal.h:83
void * pGenericCallbackContext
Definition: cellular_common_internal.h:82
CellularUrcPdnEventCallback_t pdnEventCallback
Definition: cellular_common_internal.h:77
void * pNetworkRegistrationCallbackContext
Definition: cellular_common_internal.h:76
void * pSignalStrengthChangedCallbackContext
Definition: cellular_common_internal.h:80
CellularUrcSignalStrengthChangedCallback_t signalStrengthChangedCallback
Definition: cellular_common_internal.h:79
Represents AT Command response.
Definition: cellular_types.h:483
Represents the functions of a comm interface.
Definition: cellular_comm_interface.h:160
Parameters involved in maintaining the context for the modem.
Definition: cellular_common_internal.h:111
uint32_t partialDataRcvdLen
Definition: cellular_common_internal.h:159
CellularATCommandDataSendPrefixCallback_t pktDataSendPrefixCB
Definition: cellular_common_internal.h:132
bool bLibOpened
Definition: cellular_common_internal.h:115
PlatformEventGroupHandle_t pPktioCommEvent
Definition: cellular_common_internal.h:141
CellularATCommandResponseReceivedCallback_t pktRespCB
Definition: cellular_common_internal.h:129
const char * pRespPrefix
Definition: cellular_common_internal.h:147
char pktRespPrefixBuf[CELLULAR_CONFIG_MAX_PREFIX_STRING_LENGTH]
Definition: cellular_common_internal.h:148
bool bLibClosing
Definition: cellular_common_internal.h:117
char pktioReadBuf[PKTIO_READ_BUFFER_SIZE+1]
Definition: cellular_common_internal.h:145
uint32_t dataLength
Definition: cellular_common_internal.h:158
_callbackEvents_t cbEvents
Definition: cellular_common_internal.h:120
const CellularCommInterface_t * pCommIntf
Definition: cellular_common_internal.h:112
CellularUndefinedRespCallback_t undefinedRespCallback
Definition: cellular_common_internal.h:151
PlatformQueueHandle_t pktRespQueue
Definition: cellular_common_internal.h:128
CellularSocketContext_t * pSocketData[CELLULAR_NUM_SOCKET_MAX]
Definition: cellular_common_internal.h:161
void * pDataSendPrefixCBContext
Definition: cellular_common_internal.h:133
void * pModuleContext
Definition: cellular_common_internal.h:163
_pPktioShutdownCallback_t pPktioShutdownCB
Definition: cellular_common_internal.h:142
PlatformMutex_t pktRequestMutex
Definition: cellular_common_internal.h:126
void * pInputBufferCallbackContext
Definition: cellular_common_internal.h:154
void * pPktUsrData
Definition: cellular_common_internal.h:134
CellularATCommandDataPrefixCallback_t pktDataPrefixCB
Definition: cellular_common_internal.h:130
CellularATCommandType_t PktioAtCmdType
Definition: cellular_common_internal.h:149
CellularInputBufferCallback_t inputBufferCallback
Definition: cellular_common_internal.h:153
bool bPktioUp
Definition: cellular_common_internal.h:139
_pPktioHandlePacketCallback_t pPktioHandlepktCB
Definition: cellular_common_internal.h:143
_atRespType_t recvdMsgType
Definition: cellular_common_internal.h:150
cellularAtData_t libAtData
Definition: cellular_common_internal.h:121
CellularATCommandResponse_t * pAtCmdResp
Definition: cellular_common_internal.h:155
CellularCommInterfaceHandle_t hPktioCommIntf
Definition: cellular_common_internal.h:140
uint16_t PktUsrDataLen
Definition: cellular_common_internal.h:135
void * pUndefinedRespCBContext
Definition: cellular_common_internal.h:152
char * pPktioReadPtr
Definition: cellular_common_internal.h:146
void * pDataPrefixCBContext
Definition: cellular_common_internal.h:131
const char * pCurrentCmd
Definition: cellular_common_internal.h:136
PlatformMutex_t PktRespMutex
Definition: cellular_common_internal.h:127
PlatformMutex_t libStatusMutex
Definition: cellular_common_internal.h:118
char pktioSendBuf[PKTIO_WRITE_BUFFER_SIZE+1]
Definition: cellular_common_internal.h:144
bool bLibShutdown
Definition: cellular_common_internal.h:116
PlatformMutex_t libAtDataMutex
Definition: cellular_common_internal.h:119
CellularTokenTable_t tokenTable
Definition: cellular_common_internal.h:123
Parameters involved in sending/receiving data through sockets.
Definition: cellular_common.h:123
Parameters to setup pktio and pkthandler token tables.
Definition: cellular_common.h:158
Structure containing all the control plane parameters of Modem.
Definition: cellular_common_internal.h:92
uint8_t csRejCause
Definition: cellular_common_internal.h:97
CellularNetworkRegistrationStatus_t psRegStatus
Definition: cellular_common_internal.h:95
uint16_t rac
Definition: cellular_common_internal.h:102
uint16_t lac
Definition: cellular_common_internal.h:101
CellularRat_t rat
Definition: cellular_common_internal.h:93
uint16_t tac
Definition: cellular_common_internal.h:103
uint8_t psRejectType
Definition: cellular_common_internal.h:98
uint8_t csRejectType
Definition: cellular_common_internal.h:96
uint32_t cellId
Definition: cellular_common_internal.h:100
CellularNetworkRegistrationStatus_t csRegStatus
Definition: cellular_common_internal.h:94
uint8_t psRejCause
Definition: cellular_common_internal.h:99