32#ifndef __CELLULAR_TYPES_H__
33#define __CELLULAR_TYPES_H__
49#define CELLULAR_INVALID_SIGNAL_VALUE ( -32768 )
55#define CELLULAR_INVALID_SIGNAL_BAR_VALUE ( 0xFFU )
75struct CellularSocketContext;
87typedef enum CellularError
110typedef enum CellularRat
129typedef enum CellularSimCardState
141typedef enum CellularSimCardLockState
166typedef enum CellularNetworkRegistrationMode
180typedef enum CellularNetworkRegistrationStatus
198typedef enum CellularOperatorNameFormat
211typedef enum CellularUrcEvent
227typedef enum CellularModemEvent
238typedef enum CellularPdnContextType
250typedef enum CellularPdnAuthType
262typedef enum CellularSocketDomain
272typedef enum CellularSocketType
282typedef enum CellularSocketProtocol
284 CELLULAR_SOCKET_PROTOCOL_UDP,
285 CELLULAR_SOCKET_PROTOCOL_TCP
292typedef enum CellularSocketAccessMode
294 CELLULAR_ACCESSMODE_BUFFER = 0,
295 CELLULAR_ACCESSMODE_DIRECT_PUSH,
296 CELLULAR_ACCESSMODE_TRANSPARENT,
297 CELLULAR_ACCESSMODE_NOT_SET
304typedef enum CellularIPAddressType
314typedef enum CellularSocketOptionLevel
324typedef enum CellularSocketOption
337typedef enum CellularPktStatus
339 CELLULAR_PKT_STATUS_OK = 0,
340 CELLULAR_PKT_STATUS_TIMED_OUT,
341 CELLULAR_PKT_STATUS_FAILURE,
342 CELLULAR_PKT_STATUS_BAD_REQUEST,
343 CELLULAR_PKT_STATUS_BAD_RESPONSE,
344 CELLULAR_PKT_STATUS_SIZE_MISMATCH,
345 CELLULAR_PKT_STATUS_BAD_PARAM,
346 CELLULAR_PKT_STATUS_SEND_ERROR,
347 CELLULAR_PKT_STATUS_INVALID_HANDLE,
348 CELLULAR_PKT_STATUS_CREATION_FAIL,
349 CELLULAR_PKT_STATUS_PREFIX_MISMATCH,
350 CELLULAR_PKT_STATUS_INVALID_DATA,
351 CELLULAR_PKT_STATUS_PENDING_DATA,
352 CELLULAR_PKT_STATUS_PENDING_BUFFER
359typedef enum CellularATCommandType
376typedef struct CellularSimCardStatus
386typedef struct CellularPlmnInfo
396typedef struct CellularSimCardInfo
407typedef struct CellularModemInfo
421typedef struct CellularTime
439typedef struct CellularSignalInfo
453typedef struct CellularServiceStatus
472typedef struct CellularATCommandLine
474 struct CellularATCommandLine *
pNext;
482typedef struct CellularATCommandResponse
492typedef struct CellularPsmSettings
571typedef struct CellularEidrxSettings
662typedef struct CellularEidrxSettingsList
672typedef struct CellularIPAddress
682typedef struct CellularPdnConfig
695typedef struct CellularPdnStatus
707typedef struct CellularSocketAddress
742 void * pCallbackContext );
755 void * pCallbackContext );
768 void * pCallbackContext );
779 void * pCallbackContext );
790 void * pCallbackContext );
803 void * pCallbackContext );
814 void * pCallbackContext );
827 void * pCallbackContext );
#define CELLULAR_MODEL_ID_MAX_SIZE
Cellular module ID max size.
Definition: cellular_config_defaults.h:233
#define CELLULAR_IMSI_MAX_SIZE
International Mobile Subscriber Identity max size.
Definition: cellular_config_defaults.h:103
#define CELLULAR_FW_VERSION_MAX_SIZE
Cellular module firmware version max size.
Definition: cellular_config_defaults.h:113
#define CELLULAR_PDN_USERNAME_MAX_SIZE
Packet data network username max size.
Definition: cellular_config_defaults.h:173
#define CELLULAR_IP_ADDRESS_MAX_SIZE
Cellular data network IP address max size.
Definition: cellular_config_defaults.h:193
#define CELLULAR_EDRX_LIST_MAX_SIZE
Cellular EDRX list max size.
Definition: cellular_config_defaults.h:243
#define CELLULAR_PDN_PASSWORD_MAX_SIZE
Packet data network password max size.
Definition: cellular_config_defaults.h:183
#define CELLULAR_ICCID_MAX_SIZE
Integrate circuit card identity max size.
Definition: cellular_config_defaults.h:93
#define CELLULAR_MNC_MAX_SIZE
Mobile network code max size.
Definition: cellular_config_defaults.h:83
#define CELLULAR_APN_MAX_SIZE
Access point name max size.
Definition: cellular_config_defaults.h:163
#define CELLULAR_MCC_MAX_SIZE
Mobile country code max size.
Definition: cellular_config_defaults.h:73
#define CELLULAR_IMEI_MAX_SIZE
International Mobile Equipment Identity number max size.
Definition: cellular_config_defaults.h:143
#define CELLULAR_MANUFACTURE_ID_MAX_SIZE
Cellular module manufacture ID max size.
Definition: cellular_config_defaults.h:223
#define CELLULAR_NETWORK_NAME_MAX_SIZE
Registered network operator name max size.
Definition: cellular_config_defaults.h:153
#define CELLULAR_SERIAL_NUM_MAX_SIZE
Cellular module serial number max size.
Definition: cellular_config_defaults.h:133
#define CELLULAR_HW_VERSION_MAX_SIZE
Cellular module hardware version max size.
Definition: cellular_config_defaults.h:123
CellularUrcEvent_t
Represents URC events.
Definition: cellular_types.h:212
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
CellularPdnAuthType_t
Represents PDN authentication type.
Definition: cellular_types.h:251
CellularSocketType_t
Represents socket type.
Definition: cellular_types.h:273
CellularSimCardLockState_t
SIM card lock state codes. Reference 3GPP TS 27.007 Enter PIN +CPIN.
Definition: cellular_types.h:142
CellularNetworkRegistrationMode_t
Represents network registration mode. Reference 3GPP TS 27.007 PLMN selection +COPS.
Definition: cellular_types.h:167
CellularSocketOption_t
Socket option names.
Definition: cellular_types.h:325
CellularSocketAccessMode_t
Represents data access modes.
Definition: cellular_types.h:293
CellularIPAddressType_t
Represents IP address.
Definition: cellular_types.h:305
CellularRat_t
Enums representing Radio Access Technologies (RATs). Reference 3GPP TS 27.007 PLMN selection +COPS.
Definition: cellular_types.h:111
CellularSocketOptionLevel_t
Represents socket option level.
Definition: cellular_types.h:315
CellularSimCardState_t
SIM card state codes.
Definition: cellular_types.h:130
CellularError_t
Status code returns from APIs.
Definition: cellular_types.h:88
CellularPdnContextType_t
Represents PDN context type.
Definition: cellular_types.h:239
CellularSocketDomain_t
Represents socket domain.
Definition: cellular_types.h:263
CellularSocketProtocol_t
Represents socket protocol.
Definition: cellular_types.h:283
CellularModemEvent_t
Represents Modem events.
Definition: cellular_types.h:228
CellularOperatorNameFormat_t
Represents operator name format.
Definition: cellular_types.h:199
@ CELLULAR_URC_EVENT_PDN_ACTIVATED
Definition: cellular_types.h:215
@ CELLULAR_URC_EVENT_SIGNAL_CHANGED
Definition: cellular_types.h:217
@ CELLULAR_URC_EVENT_PDN_DEACTIVATED
Definition: cellular_types.h:216
@ CELLULAR_URC_EVENT_NETWORK_CS_REGISTRATION
Definition: cellular_types.h:213
@ CELLULAR_URC_EVENT_OTHER
Definition: cellular_types.h:220
@ CELLULAR_URC_SOCKET_OPENED
Definition: cellular_types.h:218
@ CELLULAR_URC_SOCKET_OPEN_FAILED
Definition: cellular_types.h:219
@ CELLULAR_URC_EVENT_NETWORK_PS_REGISTRATION
Definition: cellular_types.h:214
@ REGISTRATION_STATUS_REGISTRATION_DENIED
Definition: cellular_types.h:185
@ REGISTRATION_STATUS_ROAMING_REGISTERED
Definition: cellular_types.h:187
@ REGISTRATION_STATUS_HOME_SMS_ONLY_REGISTERED
Definition: cellular_types.h:188
@ REGISTRATION_STATUS_NO_REGISTERED_SEARCHING
Definition: cellular_types.h:182
@ REGISTRATION_STATUS_NOT_REGISTERED_SEARCHING
Definition: cellular_types.h:184
@ REGISTRATION_STATUS_SMS_ONLY_ROAMING_REGISTERED
Definition: cellular_types.h:189
@ REGISTRATION_STATUS_UNKNOWN
Definition: cellular_types.h:186
@ REGISTRATION_STATUS_MAX
Definition: cellular_types.h:191
@ REGISTRATION_STATUS_ATTACHED_EMERG_SERVICES_ONLY
Definition: cellular_types.h:190
@ REGISTRATION_STATUS_REGISTERED_HOME
Definition: cellular_types.h:183
@ CELLULAR_AT_NO_RESULT
Definition: cellular_types.h:361
@ CELLULAR_AT_WITH_PREFIX
Definition: cellular_types.h:363
@ CELLULAR_AT_WITH_PREFIX_NO_RESULT_CODE
Definition: cellular_types.h:368
@ CELLULAR_AT_WO_PREFIX_NO_RESULT_CODE
Definition: cellular_types.h:367
@ CELLULAR_AT_WO_PREFIX
Definition: cellular_types.h:362
@ CELLULAR_AT_MULTI_WO_PREFIX
Definition: cellular_types.h:365
@ CELLULAR_AT_MULTI_WITH_PREFIX
Definition: cellular_types.h:364
@ CELLULAR_AT_MULTI_DATA_WO_PREFIX
Definition: cellular_types.h:366
@ CELLULAR_AT_NO_COMMAND
Definition: cellular_types.h:369
@ CELLULAR_PDN_AUTH_PAP_OR_CHAP
Definition: cellular_types.h:255
@ CELLULAR_PDN_AUTH_NONE
Definition: cellular_types.h:252
@ CELLULAR_PDN_AUTH_PAP
Definition: cellular_types.h:253
@ CELLULAR_PDN_AUTH_CHAP
Definition: cellular_types.h:254
@ CELLULAR_SOCKET_TYPE_DGRAM
Definition: cellular_types.h:274
@ CELLULAR_SOCKET_TYPE_STREAM
Definition: cellular_types.h:275
@ CELLULAR_SIM_CARD_INVALID
Definition: cellular_types.h:158
@ CELLULAR_SIM_CARD_CORP_PIN
Definition: cellular_types.h:154
@ CELLULAR_SIM_CARD_PH_NETSUB_PIN
Definition: cellular_types.h:150
@ CELLULAR_SIM_CARD_PUK
Definition: cellular_types.h:145
@ CELLULAR_SIM_CARD_LOCK_UNKNOWN
Definition: cellular_types.h:159
@ CELLULAR_SIM_CARD_PH_NETSUB_PUK
Definition: cellular_types.h:151
@ CELLULAR_SIM_CARD_CORP_PUK
Definition: cellular_types.h:155
@ CELLULAR_SIM_CARD_PIN2
Definition: cellular_types.h:146
@ CELLULAR_SIM_CARD_PH_NET_PIN
Definition: cellular_types.h:148
@ CELLULAR_SIM_CARD_IMSI_PUK
Definition: cellular_types.h:157
@ CELLULAR_SIM_CARD_PIN
Definition: cellular_types.h:144
@ CELLULAR_SIM_CARD_IMSI_PIN
Definition: cellular_types.h:156
@ CELLULAR_SIM_CARD_PUK2
Definition: cellular_types.h:147
@ CELLULAR_SIM_CARD_SP_PUK
Definition: cellular_types.h:153
@ CELLULAR_SIM_CARD_PH_NET_PUK
Definition: cellular_types.h:149
@ CELLULAR_SIM_CARD_SP_PIN
Definition: cellular_types.h:152
@ CELLULAR_SIM_CARD_READY
Definition: cellular_types.h:143
@ REGISTRATION_MODE_MAX
Definition: cellular_types.h:172
@ REGISTRATION_MODE_MANUAL_THEN_AUTO
Definition: cellular_types.h:171
@ REGISTRATION_MODE_MANUAL
Definition: cellular_types.h:169
@ REGISTRATION_MODE_UNKNOWN
Definition: cellular_types.h:173
@ REGISTRATION_MODE_DEREGISTER
Definition: cellular_types.h:170
@ REGISTRATION_MODE_AUTO
Definition: cellular_types.h:168
@ CELLULAR_SOCKET_OPTION_SET_LOCAL_PORT
Definition: cellular_types.h:330
@ CELLULAR_SOCKET_OPTION_PDN_CONTEXT_ID
Definition: cellular_types.h:329
@ CELLULAR_SOCKET_OPTION_MAX_IP_PACKET_SIZE
Definition: cellular_types.h:326
@ CELLULAR_SOCKET_OPTION_RECV_TIMEOUT
Definition: cellular_types.h:328
@ CELLULAR_SOCKET_OPTION_SEND_TIMEOUT
Definition: cellular_types.h:327
@ CELLULAR_IP_ADDRESS_V4
Definition: cellular_types.h:306
@ CELLULAR_IP_ADDRESS_V6
Definition: cellular_types.h:307
@ CELLULAR_RAT_EDGE
Definition: cellular_types.h:114
@ CELLULAR_RAT_GSM
Definition: cellular_types.h:112
@ CELLULAR_RAT_HSDPA
Definition: cellular_types.h:115
@ CELLULAR_RAT_WCDMA
Definition: cellular_types.h:113
@ CELLULAR_RAT_HSUPA
Definition: cellular_types.h:116
@ CELLULAR_RAT_LTE
Definition: cellular_types.h:118
@ CELLULAR_RAT_HSDPAHSUPA
Definition: cellular_types.h:117
@ CELLULAR_RAT_CATM1
Definition: cellular_types.h:119
@ CELLULAR_RAT_NBIOT
Definition: cellular_types.h:120
@ CELLULAR_RAT_MAX
Definition: cellular_types.h:121
@ CELLULAR_RAT_INVALID
Definition: cellular_types.h:122
@ CELLULAR_SOCKET_OPTION_LEVEL_TRANSPORT
Definition: cellular_types.h:317
@ CELLULAR_SOCKET_OPTION_LEVEL_IP
Definition: cellular_types.h:316
@ CELLULAR_SIM_CARD_REMOVED
Definition: cellular_types.h:131
@ CELLULAR_SIM_CARD_INSERTED
Definition: cellular_types.h:132
@ CELLULAR_SIM_CARD_STATUS_MAX
Definition: cellular_types.h:133
@ CELLULAR_SIM_CARD_UNKNOWN
Definition: cellular_types.h:134
@ CELLULAR_NO_MEMORY
Definition: cellular_types.h:95
@ CELLULAR_LIBRARY_ALREADY_OPEN
Definition: cellular_types.h:93
@ CELLULAR_INVALID_HANDLE
Definition: cellular_types.h:90
@ CELLULAR_TIMEOUT
Definition: cellular_types.h:96
@ CELLULAR_NOT_ALLOWED
Definition: cellular_types.h:102
@ CELLULAR_RESOURCE_CREATION_FAIL
Definition: cellular_types.h:100
@ CELLULAR_BAD_PARAMETER
Definition: cellular_types.h:94
@ CELLULAR_SOCKET_CLOSED
Definition: cellular_types.h:97
@ CELLULAR_LIBRARY_NOT_OPEN
Definition: cellular_types.h:92
@ CELLULAR_UNSUPPORTED
Definition: cellular_types.h:101
@ CELLULAR_UNKNOWN
Definition: cellular_types.h:103
@ CELLULAR_SOCKET_NOT_CONNECTED
Definition: cellular_types.h:98
@ CELLULAR_INTERNAL_FAILURE
Definition: cellular_types.h:99
@ CELLULAR_SUCCESS
Definition: cellular_types.h:89
@ CELLULAR_MODEM_NOT_READY
Definition: cellular_types.h:91
@ CELLULAR_PDN_CONTEXT_IPV4V6
Definition: cellular_types.h:242
@ CELLULAR_PDN_CONTEXT_IPV4
Definition: cellular_types.h:240
@ CELLULAR_PDN_CONTEXT_IPV6
Definition: cellular_types.h:241
@ CELLULAR_PDN_CONTEXT_TYPE_MAX
Definition: cellular_types.h:243
@ CELLULAR_SOCKET_DOMAIN_AF_INET6
Definition: cellular_types.h:265
@ CELLULAR_SOCKET_DOMAIN_AF_INET
Definition: cellular_types.h:264
@ CELLULAR_MODEM_EVENT_BOOTUP_OR_REBOOT
Definition: cellular_types.h:229
@ CELLULAR_MODEM_EVENT_POWERED_DOWN
Definition: cellular_types.h:230
@ CELLULAR_MODEM_EVENT_PSM_ENTER
Definition: cellular_types.h:231
@ OPERATOR_NAME_FORMAT_MAX
Definition: cellular_types.h:204
@ OPERATOR_NAME_FORMAT_SHORT
Definition: cellular_types.h:201
@ OPERATOR_NAME_FORMAT_NUMERIC
Definition: cellular_types.h:202
@ OPERATOR_NAME_FORMAT_LONG
Definition: cellular_types.h:200
@ OPERATOR_NAME_FORMAT_NOT_PRESENT
Definition: cellular_types.h:203
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(* CellularSocketClosedCallback_t)(CellularSocketHandle_t socketHandle, void *pCallbackContext)
Callback used to inform that remote end closed the connection for a connected socket.
Definition: cellular_types.h:826
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
void(* CellularSocketDataReadyCallback_t)(CellularSocketHandle_t socketHandle, void *pCallbackContext)
Callback used to inform that data is ready for reading on a socket.
Definition: cellular_types.h:813
void(* CellularSocketOpenCallback_t)(CellularUrcEvent_t urcEvent, CellularSocketHandle_t socketHandle, void *pCallbackContext)
Callback used to inform about the status of socket open.
Definition: cellular_types.h:801
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
struct CellularSocketContext * CellularSocketHandle_t
Opaque socket handle.
Definition: cellular_types.h:81
Represents A singly-lined list of intermediate AT responses.
Definition: cellular_types.h:473
struct CellularATCommandLine * pNext
Definition: cellular_types.h:474
char * pLine
Definition: cellular_types.h:475
Represents AT Command response.
Definition: cellular_types.h:483
CellularATCommandLine_t * pItm
Definition: cellular_types.h:485
bool status
Definition: cellular_types.h:484
Parameters involved in maintaining the context for the modem.
Definition: cellular_common_internal.h:111
Represents e-I-DRX settings.
Definition: cellular_types.h:572
uint8_t mode
Definition: cellular_types.h:580
uint8_t nwProvidedEdrxValue
Definition: cellular_types.h:612
uint8_t pagingTimeWindow
Definition: cellular_types.h:655
uint8_t rat
Definition: cellular_types.h:588
uint8_t requestedEdrxValue
Definition: cellular_types.h:611
Cellular Represents e-I-DRX settings Lists.
Definition: cellular_types.h:663
uint8_t count
Definition: cellular_types.h:665
Represents IP Address.
Definition: cellular_types.h:673
CellularIPAddressType_t ipAddressType
Definition: cellular_types.h:674
Modem information.
Definition: cellular_types.h:408
Represents a PDN config.
Definition: cellular_types.h:683
CellularPdnContextType_t pdnContextType
Definition: cellular_types.h:684
CellularPdnAuthType_t pdnAuthType
Definition: cellular_types.h:685
Represents status of a PDN context.
Definition: cellular_types.h:696
CellularIPAddress_t ipAddress
Definition: cellular_types.h:700
uint8_t contextId
Definition: cellular_types.h:697
uint8_t state
Definition: cellular_types.h:698
CellularPdnContextType_t pdnContextType
Definition: cellular_types.h:699
Public Land Mobile Network (PLMN) information.
Definition: cellular_types.h:387
Represents PSM settings.
Definition: cellular_types.h:493
uint32_t activeTimeValue
Definition: cellular_types.h:564
uint32_t periodicTauValue
Definition: cellular_types.h:515
uint8_t mode
Definition: cellular_types.h:498
uint32_t gprsReadyTimer
Definition: cellular_types.h:549
uint32_t periodicRauValue
Definition: cellular_types.h:532
Represents network service status.
Definition: cellular_types.h:454
CellularNetworkRegistrationStatus_t csRegistrationStatus
Definition: cellular_types.h:457
CellularRat_t rat
Definition: cellular_types.h:455
CellularPlmnInfo_t plmnInfo
Definition: cellular_types.h:459
CellularOperatorNameFormat_t operatorNameFormat
Definition: cellular_types.h:460
uint8_t psRejectionType
Definition: cellular_types.h:464
uint8_t csRejectionType
Definition: cellular_types.h:462
CellularNetworkRegistrationStatus_t psRegistrationStatus
Definition: cellular_types.h:458
uint8_t psRejectionCause
Definition: cellular_types.h:465
uint8_t csRejectionCause
Definition: cellular_types.h:463
CellularNetworkRegistrationMode_t networkRegistrationMode
Definition: cellular_types.h:456
Represents signal information.
Definition: cellular_types.h:440
uint8_t bars
Definition: cellular_types.h:446
int16_t rsrq
Definition: cellular_types.h:443
int16_t rsrp
Definition: cellular_types.h:442
int16_t ber
Definition: cellular_types.h:445
int16_t sinr
Definition: cellular_types.h:444
int16_t rssi
Definition: cellular_types.h:441
SIM Card information.
Definition: cellular_types.h:397
CellularPlmnInfo_t plmn
Definition: cellular_types.h:400
SIM Card status.
Definition: cellular_types.h:377
CellularSimCardState_t simCardState
Definition: cellular_types.h:378
CellularSimCardLockState_t simCardLockState
Definition: cellular_types.h:379
Represents socket address.
Definition: cellular_types.h:708
uint16_t port
Definition: cellular_types.h:710
CellularIPAddress_t ipAddress
Definition: cellular_types.h:709
Represents time.
Definition: cellular_types.h:422
uint8_t minute
Definition: cellular_types.h:426
uint8_t second
Definition: cellular_types.h:427
uint8_t month
Definition: cellular_types.h:423
uint8_t day
Definition: cellular_types.h:424
uint16_t year
Definition: cellular_types.h:428
uint8_t dst
Definition: cellular_types.h:430
int32_t timeZone
Definition: cellular_types.h:429
uint8_t hour
Definition: cellular_types.h:425