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
335typedef enum CellularPktStatus
337 CELLULAR_PKT_STATUS_OK = 0,
338 CELLULAR_PKT_STATUS_TIMED_OUT,
339 CELLULAR_PKT_STATUS_FAILURE,
340 CELLULAR_PKT_STATUS_BAD_REQUEST,
341 CELLULAR_PKT_STATUS_BAD_RESPONSE,
342 CELLULAR_PKT_STATUS_SIZE_MISMATCH,
343 CELLULAR_PKT_STATUS_BAD_PARAM,
344 CELLULAR_PKT_STATUS_SEND_ERROR,
345 CELLULAR_PKT_STATUS_INVALID_HANDLE,
346 CELLULAR_PKT_STATUS_CREATION_FAIL,
347 CELLULAR_PKT_STATUS_PREFIX_MISMATCH,
348 CELLULAR_PKT_STATUS_INVALID_DATA,
349 CELLULAR_PKT_STATUS_PENDING_DATA,
350 CELLULAR_PKT_STATUS_PENDING_BUFFER
357typedef enum CellularATCommandType
372typedef struct CellularSimCardStatus
382typedef struct CellularPlmnInfo
392typedef struct CellularSimCardInfo
403typedef struct CellularModemInfo
417typedef struct CellularTime
435typedef struct CellularSignalInfo
449typedef struct CellularServiceStatus
468typedef struct CellularATCommandLine
470 struct CellularATCommandLine *
pNext;
478typedef struct CellularATCommandResponse
488typedef struct CellularPsmSettings
567typedef struct CellularEidrxSettings
658typedef struct CellularEidrxSettingsList
668typedef struct CellularIPAddress
678typedef struct CellularPdnConfig
691typedef struct CellularPdnStatus
703typedef struct CellularSocketAddress
738 void * pCallbackContext );
751 void * pCallbackContext );
764 void * pCallbackContext );
775 void * pCallbackContext );
786 void * pCallbackContext );
799 void * pCallbackContext );
810 void * pCallbackContext );
823 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:336
CellularATCommandType_t
Represents AT Command type.
Definition: cellular_types.h:358
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:359
@ CELLULAR_AT_WITH_PREFIX
Definition: cellular_types.h:361
@ CELLULAR_AT_WO_PREFIX
Definition: cellular_types.h:360
@ CELLULAR_AT_MULTI_WO_PREFIX
Definition: cellular_types.h:363
@ CELLULAR_AT_MULTI_WITH_PREFIX
Definition: cellular_types.h:362
@ CELLULAR_AT_MULTI_DATA_WO_PREFIX
Definition: cellular_types.h:364
@ CELLULAR_AT_NO_COMMAND
Definition: cellular_types.h:365
@ 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_SET_LOCAL_PORT
Definition: cellular_types.h:328
@ 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:785
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:762
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:822
void(* CellularUrcPdnEventCallback_t)(CellularUrcEvent_t urcEvent, uint8_t contextId, void *pCallbackContext)
Callback used to inform about PDN URC events.
Definition: cellular_types.h:749
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:736
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:809
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:797
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:722
void(* CellularUrcGenericCallback_t)(const char *pRawData, void *pCallbackContext)
Generic callback used to inform all other URC events.
Definition: cellular_types.h:774
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:469
struct CellularATCommandLine * pNext
Definition: cellular_types.h:470
char * pLine
Definition: cellular_types.h:471
Represents AT Command response.
Definition: cellular_types.h:479
CellularATCommandLine_t * pItm
Definition: cellular_types.h:481
bool status
Definition: cellular_types.h:480
Represents e-I-DRX settings.
Definition: cellular_types.h:568
uint8_t mode
Definition: cellular_types.h:576
uint8_t pagingTimeWindow
Definition: cellular_types.h:651
uint8_t nwProvidedEdrxVaue
Definition: cellular_types.h:608
uint8_t requestedEdrxVaue
Definition: cellular_types.h:607
uint8_t rat
Definition: cellular_types.h:584
Cellular Represents e-I-DRX settings Lists.
Definition: cellular_types.h:659
uint8_t count
Definition: cellular_types.h:661
Represents IP Address.
Definition: cellular_types.h:669
CellularIPAddressType_t ipAddressType
Definition: cellular_types.h:670
Modem information.
Definition: cellular_types.h:404
Represents a PDN config.
Definition: cellular_types.h:679
CellularPdnContextType_t pdnContextType
Definition: cellular_types.h:680
CellularPdnAuthType_t pdnAuthType
Definition: cellular_types.h:681
Represents status of a PDN context.
Definition: cellular_types.h:692
CellularIPAddress_t ipAddress
Definition: cellular_types.h:696
uint8_t contextId
Definition: cellular_types.h:693
uint8_t state
Definition: cellular_types.h:694
CellularPdnContextType_t pdnContextType
Definition: cellular_types.h:695
Public Land Mobile Network (PLMN) information.
Definition: cellular_types.h:383
Represents PSM settings.
Definition: cellular_types.h:489
uint32_t activeTimeValue
Definition: cellular_types.h:560
uint32_t periodicTauValue
Definition: cellular_types.h:511
uint8_t mode
Definition: cellular_types.h:494
uint32_t gprsReadyTimer
Definition: cellular_types.h:545
uint32_t periodicRauValue
Definition: cellular_types.h:528
Represents network service status.
Definition: cellular_types.h:450
CellularNetworkRegistrationStatus_t csRegistrationStatus
Definition: cellular_types.h:453
CellularRat_t rat
Definition: cellular_types.h:451
CellularPlmnInfo_t plmnInfo
Definition: cellular_types.h:455
CellularOperatorNameFormat_t operatorNameFormat
Definition: cellular_types.h:456
uint8_t psRejectionType
Definition: cellular_types.h:460
uint8_t csRejectionType
Definition: cellular_types.h:458
CellularNetworkRegistrationStatus_t psRegistrationStatus
Definition: cellular_types.h:454
uint8_t psRejectionCause
Definition: cellular_types.h:461
uint8_t csRejectionCause
Definition: cellular_types.h:459
CellularNetworkRegistrationMode_t networkRegistrationMode
Definition: cellular_types.h:452
Represents signal information.
Definition: cellular_types.h:436
uint8_t bars
Definition: cellular_types.h:442
int16_t rsrq
Definition: cellular_types.h:439
int16_t rsrp
Definition: cellular_types.h:438
int16_t ber
Definition: cellular_types.h:441
int16_t sinr
Definition: cellular_types.h:440
int16_t rssi
Definition: cellular_types.h:437
SIM Card information.
Definition: cellular_types.h:393
CellularPlmnInfo_t plmn
Definition: cellular_types.h:396
SIM Card status.
Definition: cellular_types.h:373
CellularSimCardState_t simCardState
Definition: cellular_types.h:374
CellularSimCardLockState_t simCardLockState
Definition: cellular_types.h:375
Represents socket address.
Definition: cellular_types.h:704
uint16_t port
Definition: cellular_types.h:706
CellularIPAddress_t ipAddress
Definition: cellular_types.h:705
Represents time.
Definition: cellular_types.h:418
uint8_t minute
Definition: cellular_types.h:422
uint8_t second
Definition: cellular_types.h:423
uint8_t month
Definition: cellular_types.h:419
uint8_t day
Definition: cellular_types.h:420
uint16_t year
Definition: cellular_types.h:424
uint8_t dst
Definition: cellular_types.h:426
int32_t timeZone
Definition: cellular_types.h:425
uint8_t hour
Definition: cellular_types.h:421