30#ifndef __CELLULAR_TYPES_H__
31#define __CELLULAR_TYPES_H__
47#define CELLULAR_INVALID_SIGNAL_VALUE ( -32768 )
53#define CELLULAR_INVALID_SIGNAL_BAR_VALUE ( 0xFFU )
59struct CellularContext;
73struct CellularSocketContext;
85typedef enum CellularError
108typedef enum CellularRat
127typedef enum CellularSimCardState
139typedef enum CellularSimCardLockState
164typedef enum CellularNetworkRegistrationMode
178typedef enum CellularNetworkRegistrationStatus
196typedef enum CellularOperatorNameFormat
209typedef enum CellularUrcEvent
225typedef enum CellularModemEvent
236typedef enum CellularPdnContextType
248typedef enum CellularPdnAuthType
260typedef enum CellularSocketDomain
270typedef enum CellularSocketType
280typedef enum CellularSocketProtocol
282 CELLULAR_SOCKET_PROTOCOL_UDP,
283 CELLULAR_SOCKET_PROTOCOL_TCP
290typedef enum CellularSocketAccessMode
292 CELLULAR_ACCESSMODE_BUFFER = 0,
293 CELLULAR_ACCESSMODE_DIRECT_PUSH,
294 CELLULAR_ACCESSMODE_TRANSPARENT,
295 CELLULAR_ACCESSMODE_NOT_SET
302typedef enum CellularIPAddressType
312typedef enum CellularSocketOptionLevel
322typedef enum CellularSocketOption
334typedef enum CellularPktStatus
336 CELLULAR_PKT_STATUS_OK = 0,
337 CELLULAR_PKT_STATUS_TIMED_OUT,
338 CELLULAR_PKT_STATUS_FAILURE,
339 CELLULAR_PKT_STATUS_BAD_REQUEST,
340 CELLULAR_PKT_STATUS_BAD_RESPONSE,
341 CELLULAR_PKT_STATUS_SIZE_MISMATCH,
342 CELLULAR_PKT_STATUS_BAD_PARAM,
343 CELLULAR_PKT_STATUS_SEND_ERROR,
344 CELLULAR_PKT_STATUS_INVALID_HANDLE,
345 CELLULAR_PKT_STATUS_CREATION_FAIL,
346 CELLULAR_PKT_STATUS_PREFIX_MISMATCH,
347 CELLULAR_PKT_STATUS_INVALID_DATA,
348 CELLULAR_PKT_STATUS_PENDING_DATA,
349 CELLULAR_PKT_STATUS_PENDING_BUFFER
356typedef enum CellularATCommandType
371typedef struct CellularSimCardStatus
381typedef struct CellularPlmnInfo
391typedef struct CellularSimCardInfo
402typedef struct CellularModemInfo
416typedef struct CellularTime
434typedef struct CellularSignalInfo
448typedef struct CellularServiceStatus
467typedef struct CellularATCommandLine
469 struct CellularATCommandLine *
pNext;
477typedef struct CellularATCommandResponse
487typedef struct CellularPsmSettings
566typedef struct CellularEidrxSettings
657typedef struct CellularEidrxSettingsList
667typedef struct CellularIPAddress
677typedef struct CellularPdnConfig
690typedef struct CellularPdnStatus
702typedef struct CellularSocketAddress
737 void * pCallbackContext );
750 void * pCallbackContext );
763 void * pCallbackContext );
774 void * pCallbackContext );
785 void * pCallbackContext );
798 void * pCallbackContext );
809 void * pCallbackContext );
822 void * pCallbackContext );
#define CELLULAR_MODEL_ID_MAX_SIZE
Cellular module ID max size.
Definition: cellular_config_defaults.h:231
#define CELLULAR_IMSI_MAX_SIZE
International Mobile Subscriber Identity max size.
Definition: cellular_config_defaults.h:101
#define CELLULAR_FW_VERSION_MAX_SIZE
Cellular module firmware version max size.
Definition: cellular_config_defaults.h:111
#define CELLULAR_PDN_USERNAME_MAX_SIZE
Packet data network username max size.
Definition: cellular_config_defaults.h:171
#define CELLULAR_IP_ADDRESS_MAX_SIZE
Cellular data network IP address max size.
Definition: cellular_config_defaults.h:191
#define CELLULAR_EDRX_LIST_MAX_SIZE
Cellular EDRX list max size.
Definition: cellular_config_defaults.h:241
#define CELLULAR_PDN_PASSWORD_MAX_SIZE
Packet data network password max size.
Definition: cellular_config_defaults.h:181
#define CELLULAR_ICCID_MAX_SIZE
Integrate circuit card identity max size.
Definition: cellular_config_defaults.h:91
#define CELLULAR_MNC_MAX_SIZE
Mobile network code max size.
Definition: cellular_config_defaults.h:81
#define CELLULAR_APN_MAX_SIZE
Access point name max size.
Definition: cellular_config_defaults.h:161
#define CELLULAR_MCC_MAX_SIZE
Mobile country code max size.
Definition: cellular_config_defaults.h:71
#define CELLULAR_IMEI_MAX_SIZE
International Mobile Equipment Identity number max size.
Definition: cellular_config_defaults.h:141
#define CELLULAR_MANUFACTURE_ID_MAX_SIZE
Cellular module manufacture ID max size.
Definition: cellular_config_defaults.h:221
#define CELLULAR_NETWORK_NAME_MAX_SIZE
Registered network operator name max size.
Definition: cellular_config_defaults.h:151
#define CELLULAR_SERIAL_NUM_MAX_SIZE
Cellular module serial number max size.
Definition: cellular_config_defaults.h:131
#define CELLULAR_HW_VERSION_MAX_SIZE
Cellular module hardware version max size.
Definition: cellular_config_defaults.h:121
CellularUrcEvent_t
Represents URC events.
Definition: cellular_types.h:210
CellularNetworkRegistrationStatus_t
Represents network registration status. Reference 3GPP TS 27.007 network registration status.
Definition: cellular_types.h:179
CellularPktStatus_t
packet Status Names.
Definition: cellular_types.h:335
CellularATCommandType_t
Represents AT Command type.
Definition: cellular_types.h:357
CellularPdnAuthType_t
Represents PDN authentication type.
Definition: cellular_types.h:249
CellularSocketType_t
Represents socket type.
Definition: cellular_types.h:271
CellularSimCardLockState_t
SIM card lock state codes. Reference 3GPP TS 27.007 Enter PIN +CPIN.
Definition: cellular_types.h:140
CellularNetworkRegistrationMode_t
Represents network registration mode. Reference 3GPP TS 27.007 PLMN selection +COPS.
Definition: cellular_types.h:165
CellularSocketOption_t
Socket option names.
Definition: cellular_types.h:323
CellularSocketAccessMode_t
Represents data access modes.
Definition: cellular_types.h:291
CellularIPAddressType_t
Represents IP address.
Definition: cellular_types.h:303
CellularRat_t
Enums representing Radio Access Technologies (RATs). Reference 3GPP TS 27.007 PLMN selection +COPS.
Definition: cellular_types.h:109
CellularSocketOptionLevel_t
Represents socket option level.
Definition: cellular_types.h:313
CellularSimCardState_t
SIM card state codes.
Definition: cellular_types.h:128
CellularError_t
Status code returns from APIs.
Definition: cellular_types.h:86
CellularPdnContextType_t
Represents PDN context type.
Definition: cellular_types.h:237
CellularSocketDomain_t
Represents socket domain.
Definition: cellular_types.h:261
CellularSocketProtocol_t
Represents socket protocol.
Definition: cellular_types.h:281
CellularModemEvent_t
Represents Modem events.
Definition: cellular_types.h:226
CellularOperatorNameFormat_t
Represents operator name format.
Definition: cellular_types.h:197
@ CELLULAR_URC_EVENT_PDN_ACTIVATED
Definition: cellular_types.h:213
@ CELLULAR_URC_EVENT_SIGNAL_CHANGED
Definition: cellular_types.h:215
@ CELLULAR_URC_EVENT_PDN_DEACTIVATED
Definition: cellular_types.h:214
@ CELLULAR_URC_EVENT_NETWORK_CS_REGISTRATION
Definition: cellular_types.h:211
@ CELLULAR_URC_EVENT_OTHER
Definition: cellular_types.h:218
@ CELLULAR_URC_SOCKET_OPENED
Definition: cellular_types.h:216
@ CELLULAR_URC_SOCKET_OPEN_FAILED
Definition: cellular_types.h:217
@ CELLULAR_URC_EVENT_NETWORK_PS_REGISTRATION
Definition: cellular_types.h:212
@ REGISTRATION_STATUS_REGISTRATION_DENIED
Definition: cellular_types.h:183
@ REGISTRATION_STATUS_ROAMING_REGISTERED
Definition: cellular_types.h:185
@ REGISTRATION_STATUS_HOME_SMS_ONLY_REGISTERED
Definition: cellular_types.h:186
@ REGISTRATION_STATUS_NO_REGISTERED_SEARCHING
Definition: cellular_types.h:180
@ REGISTRATION_STATUS_NOT_REGISTERED_SEARCHING
Definition: cellular_types.h:182
@ REGISTRATION_STATUS_SMS_ONLY_ROAMING_REGISTERED
Definition: cellular_types.h:187
@ REGISTRATION_STATUS_UNKNOWN
Definition: cellular_types.h:184
@ REGISTRATION_STATUS_MAX
Definition: cellular_types.h:189
@ REGISTRATION_STATUS_ATTACHED_EMERG_SERVICES_ONLY
Definition: cellular_types.h:188
@ REGISTRATION_STATUS_REGISTERED_HOME
Definition: cellular_types.h:181
@ CELLULAR_AT_NO_RESULT
Definition: cellular_types.h:358
@ CELLULAR_AT_WITH_PREFIX
Definition: cellular_types.h:360
@ CELLULAR_AT_WO_PREFIX
Definition: cellular_types.h:359
@ CELLULAR_AT_MULTI_WO_PREFIX
Definition: cellular_types.h:362
@ CELLULAR_AT_MULTI_WITH_PREFIX
Definition: cellular_types.h:361
@ CELLULAR_AT_MULTI_DATA_WO_PREFIX
Definition: cellular_types.h:363
@ CELLULAR_AT_NO_COMMAND
Definition: cellular_types.h:364
@ CELLULAR_PDN_AUTH_PAP_OR_CHAP
Definition: cellular_types.h:253
@ CELLULAR_PDN_AUTH_NONE
Definition: cellular_types.h:250
@ CELLULAR_PDN_AUTH_PAP
Definition: cellular_types.h:251
@ CELLULAR_PDN_AUTH_CHAP
Definition: cellular_types.h:252
@ CELLULAR_SOCKET_TYPE_DGRAM
Definition: cellular_types.h:272
@ CELLULAR_SOCKET_TYPE_STREAM
Definition: cellular_types.h:273
@ CELLULAR_SIM_CARD_INVALID
Definition: cellular_types.h:156
@ CELLULAR_SIM_CARD_CORP_PIN
Definition: cellular_types.h:152
@ CELLULAR_SIM_CARD_PH_NETSUB_PIN
Definition: cellular_types.h:148
@ CELLULAR_SIM_CARD_PUK
Definition: cellular_types.h:143
@ CELLULAR_SIM_CARD_LOCK_UNKNOWN
Definition: cellular_types.h:157
@ CELLULAR_SIM_CARD_PH_NETSUB_PUK
Definition: cellular_types.h:149
@ CELLULAR_SIM_CARD_CORP_PUK
Definition: cellular_types.h:153
@ CELLULAR_SIM_CARD_PIN2
Definition: cellular_types.h:144
@ CELLULAR_SIM_CARD_PH_NET_PIN
Definition: cellular_types.h:146
@ CELLULAR_SIM_CARD_IMSI_PUK
Definition: cellular_types.h:155
@ CELLULAR_SIM_CARD_PIN
Definition: cellular_types.h:142
@ CELLULAR_SIM_CARD_IMSI_PIN
Definition: cellular_types.h:154
@ CELLULAR_SIM_CARD_PUK2
Definition: cellular_types.h:145
@ CELLULAR_SIM_CARD_SP_PUK
Definition: cellular_types.h:151
@ CELLULAR_SIM_CARD_PH_NET_PUK
Definition: cellular_types.h:147
@ CELLULAR_SIM_CARD_SP_PIN
Definition: cellular_types.h:150
@ CELLULAR_SIM_CARD_READY
Definition: cellular_types.h:141
@ REGISTRATION_MODE_MAX
Definition: cellular_types.h:170
@ REGISTRATION_MODE_MANUAL_THEN_AUTO
Definition: cellular_types.h:169
@ REGISTRATION_MODE_MANUAL
Definition: cellular_types.h:167
@ REGISTRATION_MODE_UNKNOWN
Definition: cellular_types.h:171
@ REGISTRATION_MODE_DEREGISTER
Definition: cellular_types.h:168
@ REGISTRATION_MODE_AUTO
Definition: cellular_types.h:166
@ CELLULAR_SOCKET_OPTION_PDN_CONTEXT_ID
Definition: cellular_types.h:327
@ CELLULAR_SOCKET_OPTION_MAX_IP_PACKET_SIZE
Definition: cellular_types.h:324
@ CELLULAR_SOCKET_OPTION_RECV_TIMEOUT
Definition: cellular_types.h:326
@ CELLULAR_SOCKET_OPTION_SEND_TIMEOUT
Definition: cellular_types.h:325
@ CELLULAR_IP_ADDRESS_V4
Definition: cellular_types.h:304
@ CELLULAR_IP_ADDRESS_V6
Definition: cellular_types.h:305
@ CELLULAR_RAT_EDGE
Definition: cellular_types.h:112
@ CELLULAR_RAT_GSM
Definition: cellular_types.h:110
@ CELLULAR_RAT_HSDPA
Definition: cellular_types.h:113
@ CELLULAR_RAT_WCDMA
Definition: cellular_types.h:111
@ CELLULAR_RAT_HSUPA
Definition: cellular_types.h:114
@ CELLULAR_RAT_LTE
Definition: cellular_types.h:116
@ CELLULAR_RAT_HSDPAHSUPA
Definition: cellular_types.h:115
@ CELLULAR_RAT_CATM1
Definition: cellular_types.h:117
@ CELLULAR_RAT_NBIOT
Definition: cellular_types.h:118
@ CELLULAR_RAT_MAX
Definition: cellular_types.h:119
@ CELLULAR_RAT_INVALID
Definition: cellular_types.h:120
@ CELLULAR_SOCKET_OPTION_LEVEL_TRANSPORT
Definition: cellular_types.h:315
@ CELLULAR_SOCKET_OPTION_LEVEL_IP
Definition: cellular_types.h:314
@ CELLULAR_SIM_CARD_REMOVED
Definition: cellular_types.h:129
@ CELLULAR_SIM_CARD_INSERTED
Definition: cellular_types.h:130
@ CELLULAR_SIM_CARD_STATUS_MAX
Definition: cellular_types.h:131
@ CELLULAR_SIM_CARD_UNKNOWN
Definition: cellular_types.h:132
@ CELLULAR_NO_MEMORY
Definition: cellular_types.h:93
@ CELLULAR_LIBRARY_ALREADY_OPEN
Definition: cellular_types.h:91
@ CELLULAR_INVALID_HANDLE
Definition: cellular_types.h:88
@ CELLULAR_TIMEOUT
Definition: cellular_types.h:94
@ CELLULAR_NOT_ALLOWED
Definition: cellular_types.h:100
@ CELLULAR_RESOURCE_CREATION_FAIL
Definition: cellular_types.h:98
@ CELLULAR_BAD_PARAMETER
Definition: cellular_types.h:92
@ CELLULAR_SOCKET_CLOSED
Definition: cellular_types.h:95
@ CELLULAR_LIBRARY_NOT_OPEN
Definition: cellular_types.h:90
@ CELLULAR_UNSUPPORTED
Definition: cellular_types.h:99
@ CELLULAR_UNKNOWN
Definition: cellular_types.h:101
@ CELLULAR_SOCKET_NOT_CONNECTED
Definition: cellular_types.h:96
@ CELLULAR_INTERNAL_FAILURE
Definition: cellular_types.h:97
@ CELLULAR_SUCCESS
Definition: cellular_types.h:87
@ CELLULAR_MODEM_NOT_READY
Definition: cellular_types.h:89
@ CELLULAR_PDN_CONTEXT_IPV4V6
Definition: cellular_types.h:240
@ CELLULAR_PDN_CONTEXT_IPV4
Definition: cellular_types.h:238
@ CELLULAR_PDN_CONTEXT_IPV6
Definition: cellular_types.h:239
@ CELLULAR_PDN_CONTEXT_TYPE_MAX
Definition: cellular_types.h:241
@ CELLULAR_SOCKET_DOMAIN_AF_INET6
Definition: cellular_types.h:263
@ CELLULAR_SOCKET_DOMAIN_AF_INET
Definition: cellular_types.h:262
@ CELLULAR_MODEM_EVENT_BOOTUP_OR_REBOOT
Definition: cellular_types.h:227
@ CELLULAR_MODEM_EVENT_POWERED_DOWN
Definition: cellular_types.h:228
@ CELLULAR_MODEM_EVENT_PSM_ENTER
Definition: cellular_types.h:229
@ OPERATOR_NAME_FORMAT_MAX
Definition: cellular_types.h:202
@ OPERATOR_NAME_FORMAT_SHORT
Definition: cellular_types.h:199
@ OPERATOR_NAME_FORMAT_NUMERIC
Definition: cellular_types.h:200
@ OPERATOR_NAME_FORMAT_LONG
Definition: cellular_types.h:198
@ OPERATOR_NAME_FORMAT_NOT_PRESENT
Definition: cellular_types.h:201
void(* CellularModemEventCallback_t)(CellularModemEvent_t modemEvent, void *pCallbackContext)
Callback used to inform about modem events.
Definition: cellular_types.h:784
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:761
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:821
void(* CellularUrcPdnEventCallback_t)(CellularUrcEvent_t urcEvent, uint8_t contextId, void *pCallbackContext)
Callback used to inform about PDN URC events.
Definition: cellular_types.h:748
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:735
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:808
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:796
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:721
void(* CellularUrcGenericCallback_t)(const char *pRawData, void *pCallbackContext)
Generic callback used to inform all other URC events.
Definition: cellular_types.h:773
struct CellularSocketContext * CellularSocketHandle_t
Opaque socket handle.
Definition: cellular_types.h:79
struct CellularContext CellularContext_t
Opaque Cellular context structure type.
Definition: cellular_types.h:65
struct CellularContext * CellularHandle_t
Opaque Cellular handle.
Definition: cellular_types.h:71
Represents A singly-lined list of intermediate AT responses.
Definition: cellular_types.h:468
struct CellularATCommandLine * pNext
Definition: cellular_types.h:469
char * pLine
Definition: cellular_types.h:470
Represents AT Command response.
Definition: cellular_types.h:478
CellularATCommandLine_t * pItm
Definition: cellular_types.h:480
bool status
Definition: cellular_types.h:479
Represents e-I-DRX settings.
Definition: cellular_types.h:567
uint8_t mode
Definition: cellular_types.h:575
uint8_t pagingTimeWindow
Definition: cellular_types.h:650
uint8_t nwProvidedEdrxVaue
Definition: cellular_types.h:607
uint8_t requestedEdrxVaue
Definition: cellular_types.h:606
uint8_t rat
Definition: cellular_types.h:583
Cellular Represents e-I-DRX settings Lists.
Definition: cellular_types.h:658
uint8_t count
Definition: cellular_types.h:660
Represents IP Address.
Definition: cellular_types.h:668
CellularIPAddressType_t ipAddressType
Definition: cellular_types.h:669
Modem information.
Definition: cellular_types.h:403
Represents a PDN config.
Definition: cellular_types.h:678
CellularPdnContextType_t pdnContextType
Definition: cellular_types.h:679
CellularPdnAuthType_t pdnAuthType
Definition: cellular_types.h:680
Represents status of a PDN context.
Definition: cellular_types.h:691
CellularIPAddress_t ipAddress
Definition: cellular_types.h:695
uint8_t contextId
Definition: cellular_types.h:692
uint8_t state
Definition: cellular_types.h:693
CellularPdnContextType_t pdnContextType
Definition: cellular_types.h:694
Public Land Mobile Network (PLMN) information.
Definition: cellular_types.h:382
Represents PSM settings.
Definition: cellular_types.h:488
uint32_t activeTimeValue
Definition: cellular_types.h:559
uint32_t periodicTauValue
Definition: cellular_types.h:510
uint8_t mode
Definition: cellular_types.h:493
uint32_t gprsReadyTimer
Definition: cellular_types.h:544
uint32_t periodicRauValue
Definition: cellular_types.h:527
Represents network service status.
Definition: cellular_types.h:449
CellularNetworkRegistrationStatus_t csRegistrationStatus
Definition: cellular_types.h:452
CellularRat_t rat
Definition: cellular_types.h:450
CellularPlmnInfo_t plmnInfo
Definition: cellular_types.h:454
CellularOperatorNameFormat_t operatorNameFormat
Definition: cellular_types.h:455
uint8_t psRejectionType
Definition: cellular_types.h:459
uint8_t csRejectionType
Definition: cellular_types.h:457
CellularNetworkRegistrationStatus_t psRegistrationStatus
Definition: cellular_types.h:453
uint8_t psRejectionCause
Definition: cellular_types.h:460
uint8_t csRejectionCause
Definition: cellular_types.h:458
CellularNetworkRegistrationMode_t networkRegistrationMode
Definition: cellular_types.h:451
Represents signal information.
Definition: cellular_types.h:435
uint8_t bars
Definition: cellular_types.h:441
int16_t rsrq
Definition: cellular_types.h:438
int16_t rsrp
Definition: cellular_types.h:437
int16_t ber
Definition: cellular_types.h:440
int16_t sinr
Definition: cellular_types.h:439
int16_t rssi
Definition: cellular_types.h:436
SIM Card information.
Definition: cellular_types.h:392
CellularPlmnInfo_t plmn
Definition: cellular_types.h:395
SIM Card status.
Definition: cellular_types.h:372
CellularSimCardState_t simCardState
Definition: cellular_types.h:373
CellularSimCardLockState_t simCardLockState
Definition: cellular_types.h:374
Represents socket address.
Definition: cellular_types.h:703
uint16_t port
Definition: cellular_types.h:705
CellularIPAddress_t ipAddress
Definition: cellular_types.h:704
Represents time.
Definition: cellular_types.h:417
uint8_t minute
Definition: cellular_types.h:421
uint8_t second
Definition: cellular_types.h:422
uint8_t month
Definition: cellular_types.h:418
uint8_t day
Definition: cellular_types.h:419
uint16_t year
Definition: cellular_types.h:423
uint8_t dst
Definition: cellular_types.h:425
int32_t timeZone
Definition: cellular_types.h:424
uint8_t hour
Definition: cellular_types.h:420