Etherios Cloud Connector very first porting for mbed. Tested in an LPC1768

Etherios Cloud Connector for Embedded v2.1.0.3 library for mbed. Early porting.

This port is centered mainly in the platform code. So it should work properly with the provided examples of send_data, device_request, data_points, RCI and firmware_update (stub implementation, not a real one... yet ;-)). Filesystem is not implemented yet, and some examples might need changes.

To run, it needs the following libraries: - mbed - mbed-rtos - EthernetInterface

Find more information (and the source code!) about Etherios Cloud Connector for Embedded here: http://www.etherios.com/products/devicecloud/support/connector and in: http://www.etherios.com

Committer:
spastor
Date:
Tue Dec 03 13:34:02 2013 +0000
Revision:
0:1c358ea10753
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
spastor 0:1c358ea10753 1 /*
spastor 0:1c358ea10753 2 * Copyright (c) 2013 Digi International Inc.,
spastor 0:1c358ea10753 3 * All rights not expressly granted are reserved.
spastor 0:1c358ea10753 4 *
spastor 0:1c358ea10753 5 * This Source Code Form is subject to the terms of the Mozilla Public
spastor 0:1c358ea10753 6 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
spastor 0:1c358ea10753 7 * You can obtain one at http://mozilla.org/MPL/2.0/.
spastor 0:1c358ea10753 8 *
spastor 0:1c358ea10753 9 * Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
spastor 0:1c358ea10753 10 * =======================================================================
spastor 0:1c358ea10753 11 */
spastor 0:1c358ea10753 12 #ifndef CONNECTOR_API_CONFIG_H
spastor 0:1c358ea10753 13 #define CONNECTOR_API_CONFIG_H
spastor 0:1c358ea10753 14
spastor 0:1c358ea10753 15 /**
spastor 0:1c358ea10753 16 * @defgroup connector_request_id_config_t Configuration Request IDs
spastor 0:1c358ea10753 17 * @{
spastor 0:1c358ea10753 18 */
spastor 0:1c358ea10753 19 /**
spastor 0:1c358ea10753 20 * Configuration Request Id passed to the application's callback for requesting configuration data.
spastor 0:1c358ea10753 21 * The class id for this connector_request_id_config_t is connector_class_id_config.
spastor 0:1c358ea10753 22 */
spastor 0:1c358ea10753 23 typedef enum {
spastor 0:1c358ea10753 24 connector_request_id_config_device_id, /**< Requesting callback to return a unique device id which is used to identify the device.*/
spastor 0:1c358ea10753 25 connector_request_id_config_set_device_id, /**< Requesting callback to set a new device ID given by Device Cloud (when provisioning is enabled) */
spastor 0:1c358ea10753 26 connector_request_id_config_vendor_id, /**< Requesting callback to return a unique vendor id identifying the manufacturer of a device. */
spastor 0:1c358ea10753 27 connector_request_id_config_device_type, /**< Requesting callback to return device type that identifies the type of the device */
spastor 0:1c358ea10753 28 connector_request_id_config_device_cloud_url, /**< Requesting callback to return the Device Cloud URL which will be connected to */
spastor 0:1c358ea10753 29 connector_request_id_config_get_device_cloud_phone,/**< Requesting callback to get the Device Cloud Phone Number where to send SMSs (Only used for SMS transport) */
spastor 0:1c358ea10753 30 connector_request_id_config_set_device_cloud_phone,/**< Requesting callback to set the Device Cloud Phone Number where to send SMSs (Only used for SMS transport) */
spastor 0:1c358ea10753 31 connector_request_id_config_device_cloud_service_id,/**< Requesting callback to return the Device Cloud Phone Number service-id (if used)
spastor 0:1c358ea10753 32 where to send SMSs (Only used for SMS transport) */
spastor 0:1c358ea10753 33 connector_request_id_config_connection_type, /**< Requesting callback to return LAN or WAN connection type */
spastor 0:1c358ea10753 34 connector_request_id_config_mac_addr, /**< Requesting callback to return device's MAC addresss */
spastor 0:1c358ea10753 35 connector_request_id_config_link_speed, /**< Requesting callback to return link speed for WAN connection type */
spastor 0:1c358ea10753 36 connector_request_id_config_phone_number, /**< Requesting callback to return phone number dialed for WAN connection type */
spastor 0:1c358ea10753 37 connector_request_id_config_tx_keepalive, /**< Requesting callback to return Device Cloud's Tx keep alive interval in seconds */
spastor 0:1c358ea10753 38 connector_request_id_config_rx_keepalive, /**< Requesting callback to return Device Cloud's Rx keep alive interval in seconds */
spastor 0:1c358ea10753 39 connector_request_id_config_wait_count, /**< Requesting callback to return the number of intervals of not receiving a keep alive message after which a connection should be considered lost. */
spastor 0:1c358ea10753 40 connector_request_id_config_ip_addr, /**< Requesting callback to return device's IP address */
spastor 0:1c358ea10753 41 connector_request_id_config_error_status, /**< Error status notification which tells callback that error is encountered. */
spastor 0:1c358ea10753 42 connector_request_id_config_firmware_facility, /**< Requesting callback to return whether firmware facility is supported or not. */
spastor 0:1c358ea10753 43 connector_request_id_config_data_service, /**< Requesting callback to return whether data service is supported or not. */
spastor 0:1c358ea10753 44 connector_request_id_config_file_system, /**< Requesting callback to return whether file system is supported or not. */
spastor 0:1c358ea10753 45 connector_request_id_config_remote_configuration, /**< Requesting callback to return whether remote configuration is supported or not. */
spastor 0:1c358ea10753 46 connector_request_id_config_max_transaction, /**< Requesting callback to obtain maximum messaging sessions supported by client. */
spastor 0:1c358ea10753 47 connector_request_id_config_device_id_method, /**< Requesting callback to obtain method on how device id is generated */
spastor 0:1c358ea10753 48 connector_request_id_config_imei_number, /**< Requesting callback to return GSM IMEI number */
spastor 0:1c358ea10753 49 connector_request_id_config_network_tcp, /**< Requesting callback to return whether connection over TCP need to start now. */
spastor 0:1c358ea10753 50 connector_request_id_config_network_udp, /**< Requesting callback to return whether connection over UDP need to start now. */
spastor 0:1c358ea10753 51 connector_request_id_config_network_sms, /**< Requesting callback to return whether connection over SMS need to start now. */
spastor 0:1c358ea10753 52 connector_request_id_config_wan_type, /**< Requesting callback to return WAN type used. It tells Cloud Connector whether it's GSM IMEI, CDMA ESN or CDMA MEID. */
spastor 0:1c358ea10753 53 connector_request_id_config_esn, /**< Requesting callback to return CDMA ESN (Electronic Serial Number) */
spastor 0:1c358ea10753 54 connector_request_id_config_meid, /**< Requesting callback to return CDMA MEID (Mobile Equipment Identifier) */
spastor 0:1c358ea10753 55 connector_request_id_config_identity_verification, /**< Requesting callback to return identity verification form. */
spastor 0:1c358ea10753 56 connector_request_id_config_password /**< Requesting callback to return password for the password identity verification form */
spastor 0:1c358ea10753 57 } connector_request_id_config_t;
spastor 0:1c358ea10753 58 /**
spastor 0:1c358ea10753 59 * @}
spastor 0:1c358ea10753 60 */
spastor 0:1c358ea10753 61
spastor 0:1c358ea10753 62 /**
spastor 0:1c358ea10753 63 * @defgroup connector_config_pointer_data_t Data Pointer Configuration
spastor 0:1c358ea10753 64 * @{
spastor 0:1c358ea10753 65 */
spastor 0:1c358ea10753 66 /**
spastor 0:1c358ea10753 67 * Application Binary Data Pointer Configuration for the following callbacks:
spastor 0:1c358ea10753 68 * -# @ref connector_request_id_config_device_id
spastor 0:1c358ea10753 69 * -# @ref connector_request_id_config_mac_addr
spastor 0:1c358ea10753 70 * -# @ref connector_request_id_config_imei_number
spastor 0:1c358ea10753 71 * -# @ref connector_request_id_config_esn
spastor 0:1c358ea10753 72 * -# @ref connector_request_id_config_meid
spastor 0:1c358ea10753 73 *
spastor 0:1c358ea10753 74 * @see @ref device_id
spastor 0:1c358ea10753 75 * @see @ref mac_address
spastor 0:1c358ea10753 76 * @see @ref imei_number
spastor 0:1c358ea10753 77 * @see @ref esn_number
spastor 0:1c358ea10753 78 * @see @ref meid_number
spastor 0:1c358ea10753 79 *
spastor 0:1c358ea10753 80 */
spastor 0:1c358ea10753 81 typedef struct {
spastor 0:1c358ea10753 82 uint8_t * data; /**< Application data pointer */
spastor 0:1c358ea10753 83 size_t CONST bytes_required; /**< Number of bytes required and needed on the application data pointer */
spastor 0:1c358ea10753 84 } connector_config_pointer_data_t;
spastor 0:1c358ea10753 85 /**
spastor 0:1c358ea10753 86 * @}
spastor 0:1c358ea10753 87 */
spastor 0:1c358ea10753 88
spastor 0:1c358ea10753 89
spastor 0:1c358ea10753 90 /**
spastor 0:1c358ea10753 91 * @defgroup connector_config_vendor_t Vendor ID Configuration
spastor 0:1c358ea10753 92 * @{
spastor 0:1c358ea10753 93 */
spastor 0:1c358ea10753 94 /**
spastor 0:1c358ea10753 95 * Vendor ID configuration for @ref connector_request_id_config_vendor_id callback
spastor 0:1c358ea10753 96 *
spastor 0:1c358ea10753 97 * @see @ref vendor_id
spastor 0:1c358ea10753 98 *
spastor 0:1c358ea10753 99 */
spastor 0:1c358ea10753 100 typedef struct {
spastor 0:1c358ea10753 101 uint32_t id; /**< Vendor ID */
spastor 0:1c358ea10753 102 } connector_config_vendor_id_t;
spastor 0:1c358ea10753 103 /**
spastor 0:1c358ea10753 104 * @}
spastor 0:1c358ea10753 105 */
spastor 0:1c358ea10753 106
spastor 0:1c358ea10753 107
spastor 0:1c358ea10753 108 /**
spastor 0:1c358ea10753 109 * @defgroup connector_config_name_data_t String Pointer Configuration
spastor 0:1c358ea10753 110 * @{
spastor 0:1c358ea10753 111 */
spastor 0:1c358ea10753 112 /**
spastor 0:1c358ea10753 113 * Application String Pointer Configuration for the following callbacks:
spastor 0:1c358ea10753 114 *
spastor 0:1c358ea10753 115 * -# @ref connector_request_id_config_device_type
spastor 0:1c358ea10753 116 * -# @ref connector_request_id_config_device_cloud_url
spastor 0:1c358ea10753 117 * -# @ref connector_request_id_config_phone_number
spastor 0:1c358ea10753 118 * -# @ref connector_request_id_config_password
spastor 0:1c358ea10753 119 *
spastor 0:1c358ea10753 120 * @see @ref device_type
spastor 0:1c358ea10753 121 * @see @ref device_cloud_url
spastor 0:1c358ea10753 122 * @see @ref phone_number
spastor 0:1c358ea10753 123 * @see @ref password
spastor 0:1c358ea10753 124 *
spastor 0:1c358ea10753 125 */
spastor 0:1c358ea10753 126 typedef struct {
spastor 0:1c358ea10753 127 char * string; /**< Application string pointer */
spastor 0:1c358ea10753 128 size_t length; /**< Number of bytes in the application string pointer */
spastor 0:1c358ea10753 129 } connector_config_pointer_string_t;
spastor 0:1c358ea10753 130 /**
spastor 0:1c358ea10753 131 * @}
spastor 0:1c358ea10753 132 */
spastor 0:1c358ea10753 133
spastor 0:1c358ea10753 134 /**
spastor 0:1c358ea10753 135 * @defgroup connector_connection_type_t Connection Types
spastor 0:1c358ea10753 136 * @{
spastor 0:1c358ea10753 137 */
spastor 0:1c358ea10753 138 /**
spastor 0:1c358ea10753 139 * Connection type configuration of the device
spastor 0:1c358ea10753 140 *
spastor 0:1c358ea10753 141 * @see connector_config_connection_type_t
spastor 0:1c358ea10753 142 */
spastor 0:1c358ea10753 143 typedef enum {
spastor 0:1c358ea10753 144 connector_connection_type_lan, /**< LAN connection type for Ethernet or WiFi */
spastor 0:1c358ea10753 145 connector_connection_type_wan /**< WAN connection type for PPP over Modem */
spastor 0:1c358ea10753 146 } connector_connection_type_t;
spastor 0:1c358ea10753 147 /**
spastor 0:1c358ea10753 148 * @}
spastor 0:1c358ea10753 149 */
spastor 0:1c358ea10753 150
spastor 0:1c358ea10753 151 /**
spastor 0:1c358ea10753 152 * @defgroup connector_config_connection_type_t Connection Type Configuration
spastor 0:1c358ea10753 153 * @{
spastor 0:1c358ea10753 154 */
spastor 0:1c358ea10753 155 /**
spastor 0:1c358ea10753 156 * Device connection type configuration for @ref connector_request_id_config_connection_type callback
spastor 0:1c358ea10753 157 *
spastor 0:1c358ea10753 158 * @see @ref connection_type
spastor 0:1c358ea10753 159 *
spastor 0:1c358ea10753 160 */
spastor 0:1c358ea10753 161 typedef struct {
spastor 0:1c358ea10753 162 connector_connection_type_t type; /**< Device connection type */
spastor 0:1c358ea10753 163 } connector_config_connection_type_t;
spastor 0:1c358ea10753 164 /**
spastor 0:1c358ea10753 165 * @}
spastor 0:1c358ea10753 166 */
spastor 0:1c358ea10753 167
spastor 0:1c358ea10753 168
spastor 0:1c358ea10753 169 /**
spastor 0:1c358ea10753 170 * @defgroup connector_config_link_speed_t Link Speed Configuration
spastor 0:1c358ea10753 171 * @{
spastor 0:1c358ea10753 172 */
spastor 0:1c358ea10753 173 /**
spastor 0:1c358ea10753 174 * Device link speed configuration for WAN connection type for @ref connector_request_id_config_link_speed callback
spastor 0:1c358ea10753 175 *
spastor 0:1c358ea10753 176 * @see @ref link_speed
spastor 0:1c358ea10753 177 * @see @ref connection_type
spastor 0:1c358ea10753 178 */
spastor 0:1c358ea10753 179 typedef struct {
spastor 0:1c358ea10753 180 uint32_t speed; /**< Device link speed */
spastor 0:1c358ea10753 181 } connector_config_link_speed_t;
spastor 0:1c358ea10753 182 /**
spastor 0:1c358ea10753 183 * @}
spastor 0:1c358ea10753 184 */
spastor 0:1c358ea10753 185
spastor 0:1c358ea10753 186
spastor 0:1c358ea10753 187 /**
spastor 0:1c358ea10753 188 * @defgroup connector_config_keepalive_t Keep-Alive Interval Configuration
spastor 0:1c358ea10753 189 * @{
spastor 0:1c358ea10753 190 */
spastor 0:1c358ea10753 191 /**
spastor 0:1c358ea10753 192 * Keep-alive interval configuration used for the following callbacks:
spastor 0:1c358ea10753 193 * -# @ref connector_request_id_config_tx_keepalive
spastor 0:1c358ea10753 194 * -# @ref connector_request_id_config_rx_keepalive
spastor 0:1c358ea10753 195 *
spastor 0:1c358ea10753 196 * @see @ref tx_keepalive
spastor 0:1c358ea10753 197 * @see @ref rx_keepalive
spastor 0:1c358ea10753 198 *
spastor 0:1c358ea10753 199 */
spastor 0:1c358ea10753 200 typedef struct {
spastor 0:1c358ea10753 201 uint16_t interval_in_seconds; /**< Device keep-alive interval */
spastor 0:1c358ea10753 202 } connector_config_keepalive_t;
spastor 0:1c358ea10753 203 /**
spastor 0:1c358ea10753 204 * @}
spastor 0:1c358ea10753 205 */
spastor 0:1c358ea10753 206
spastor 0:1c358ea10753 207
spastor 0:1c358ea10753 208 /**
spastor 0:1c358ea10753 209 * @defgroup connector_config_wait_count_t Wait Count Configuration
spastor 0:1c358ea10753 210 * @{
spastor 0:1c358ea10753 211 */
spastor 0:1c358ea10753 212 /**
spastor 0:1c358ea10753 213 * Device wait count configuration for @ref connector_request_id_config_wait_count callback
spastor 0:1c358ea10753 214 *
spastor 0:1c358ea10753 215 * @see @ref wait_count
spastor 0:1c358ea10753 216 * @see @ref tx_keepalive
spastor 0:1c358ea10753 217 */
spastor 0:1c358ea10753 218 typedef struct {
spastor 0:1c358ea10753 219 uint16_t count; /**< wait count */
spastor 0:1c358ea10753 220 } connector_config_wait_count_t;
spastor 0:1c358ea10753 221 /**
spastor 0:1c358ea10753 222 * @}
spastor 0:1c358ea10753 223 */
spastor 0:1c358ea10753 224
spastor 0:1c358ea10753 225 /**
spastor 0:1c358ea10753 226 * @defgroup connector_config_ip_address_type_t IP Address Configuration Types
spastor 0:1c358ea10753 227 * @{
spastor 0:1c358ea10753 228 */
spastor 0:1c358ea10753 229 /**
spastor 0:1c358ea10753 230 * Device IP address types
spastor 0:1c358ea10753 231 *
spastor 0:1c358ea10753 232 * @see connector_config_ip_address_t
spastor 0:1c358ea10753 233 */
spastor 0:1c358ea10753 234 typedef enum {
spastor 0:1c358ea10753 235 connector_ip_address_ipv4, /**< IPv4 address type */
spastor 0:1c358ea10753 236 connector_ip_address_ipv6 /**< IPv6 address type */
spastor 0:1c358ea10753 237 } connector_config_ip_address_type_t;
spastor 0:1c358ea10753 238 /**
spastor 0:1c358ea10753 239 * @}
spastor 0:1c358ea10753 240 */
spastor 0:1c358ea10753 241
spastor 0:1c358ea10753 242 /**
spastor 0:1c358ea10753 243 * @defgroup connector_config_ip_addr_t Device IP Address Configuration
spastor 0:1c358ea10753 244 * @{
spastor 0:1c358ea10753 245 */
spastor 0:1c358ea10753 246 /**
spastor 0:1c358ea10753 247 * Device IP Address Configuration for @ref connector_request_id_config_ip_addr callback
spastor 0:1c358ea10753 248 *
spastor 0:1c358ea10753 249 * @see @ref ip_address
spastor 0:1c358ea10753 250 */
spastor 0:1c358ea10753 251 typedef struct {
spastor 0:1c358ea10753 252 uint8_t * address; /**< Device's IP address */
spastor 0:1c358ea10753 253 connector_config_ip_address_type_t ip_address_type; /**< IPv4 or IPv6 device IP address type */
spastor 0:1c358ea10753 254 } connector_config_ip_address_t;
spastor 0:1c358ea10753 255 /**
spastor 0:1c358ea10753 256 * @}
spastor 0:1c358ea10753 257 */
spastor 0:1c358ea10753 258
spastor 0:1c358ea10753 259
spastor 0:1c358ea10753 260 /**
spastor 0:1c358ea10753 261 * @defgroup connector_config_support_status_t Service Supported Configuration
spastor 0:1c358ea10753 262 * @{
spastor 0:1c358ea10753 263 */
spastor 0:1c358ea10753 264 /**
spastor 0:1c358ea10753 265 * Service supported status configuration for the following callbacks:
spastor 0:1c358ea10753 266 * -# @ref connector_request_id_config_firmware_facility
spastor 0:1c358ea10753 267 * -# @ref connector_request_id_config_data_service
spastor 0:1c358ea10753 268 * -# @ref connector_request_id_config_file_system
spastor 0:1c358ea10753 269 *
spastor 0:1c358ea10753 270 * @see @ref firmware_support
spastor 0:1c358ea10753 271 * @see @ref data_service_support
spastor 0:1c358ea10753 272 * @see @ref file_system_support
spastor 0:1c358ea10753 273 * @see @ref rci_support
spastor 0:1c358ea10753 274 *
spastor 0:1c358ea10753 275 */
spastor 0:1c358ea10753 276 typedef struct {
spastor 0:1c358ea10753 277 connector_bool_t supported; /**< Application service supported status */
spastor 0:1c358ea10753 278 } connector_config_supported_t;
spastor 0:1c358ea10753 279 /**
spastor 0:1c358ea10753 280 * @}
spastor 0:1c358ea10753 281 */
spastor 0:1c358ea10753 282
spastor 0:1c358ea10753 283
spastor 0:1c358ea10753 284 /**
spastor 0:1c358ea10753 285 * @defgroup connector_device_id_method_t Device ID Method Types
spastor 0:1c358ea10753 286 * @{
spastor 0:1c358ea10753 287 *
spastor 0:1c358ea10753 288 */
spastor 0:1c358ea10753 289 /**
spastor 0:1c358ea10753 290 * Device ID method type which is used in the application's callback telling
spastor 0:1c358ea10753 291 * the connector how to obtain a device ID.
spastor 0:1c358ea10753 292 *
spastor 0:1c358ea10753 293 * @see connector_config_device_id_method_t
spastor 0:1c358ea10753 294 */
spastor 0:1c358ea10753 295 typedef enum {
spastor 0:1c358ea10753 296 connector_device_id_method_auto, /**< Callback returns this type telling Cloud Connector to
spastor 0:1c358ea10753 297 generate the device ID from MAC address (See @ref mac_address callback)
spastor 0:1c358ea10753 298 for LAN connection type or generate the device ID according to the @ref wan_type.
spastor 0:1c358ea10753 299 @note Cloud Connector will not call @ref device_id callback. */
spastor 0:1c358ea10753 300 connector_device_id_method_manual /**< Callback returns this type telling Cloud Connector to retrieve device ID from
spastor 0:1c358ea10753 301 @ref device_id callback */
spastor 0:1c358ea10753 302 } connector_device_id_method_t;
spastor 0:1c358ea10753 303 /**
spastor 0:1c358ea10753 304 * @}
spastor 0:1c358ea10753 305 */
spastor 0:1c358ea10753 306
spastor 0:1c358ea10753 307
spastor 0:1c358ea10753 308 /**
spastor 0:1c358ea10753 309 * @defgroup connector_config_device_id_method_t Device ID Method Configuration
spastor 0:1c358ea10753 310 * @{
spastor 0:1c358ea10753 311 */
spastor 0:1c358ea10753 312 /**
spastor 0:1c358ea10753 313 * Device ID method configuration returned by the application's callback for @ref connector_request_id_config_device_id_method callback.
spastor 0:1c358ea10753 314 *
spastor 0:1c358ea10753 315 * @see @ref device_id_method
spastor 0:1c358ea10753 316 */
spastor 0:1c358ea10753 317 typedef struct {
spastor 0:1c358ea10753 318 connector_device_id_method_t method; /**< Device ID method */
spastor 0:1c358ea10753 319 } connector_config_device_id_method_t;
spastor 0:1c358ea10753 320 /**
spastor 0:1c358ea10753 321 * @}
spastor 0:1c358ea10753 322 */
spastor 0:1c358ea10753 323
spastor 0:1c358ea10753 324
spastor 0:1c358ea10753 325 /**
spastor 0:1c358ea10753 326 * @defgroup connector_connect_auto_type_t Network Connection Action Types
spastor 0:1c358ea10753 327 * @{
spastor 0:1c358ea10753 328 */
spastor 0:1c358ea10753 329 /**
spastor 0:1c358ea10753 330 * Network connection action used to tell Cloud Connector to automatic or manual connect.
spastor 0:1c358ea10753 331 *
spastor 0:1c358ea10753 332 * @see connector_config_connect_type_t
spastor 0:1c358ea10753 333 */
spastor 0:1c358ea10753 334 typedef enum {
spastor 0:1c358ea10753 335
spastor 0:1c358ea10753 336 connector_connect_auto, /**< Automatic connect to Device Cloud */
spastor 0:1c358ea10753 337 connector_connect_manual /**< Manual connect to Device Cloud */
spastor 0:1c358ea10753 338 } connector_connect_auto_type_t;
spastor 0:1c358ea10753 339 /**
spastor 0:1c358ea10753 340 * @}
spastor 0:1c358ea10753 341 */
spastor 0:1c358ea10753 342
spastor 0:1c358ea10753 343
spastor 0:1c358ea10753 344 /**
spastor 0:1c358ea10753 345 * @defgroup connector_config_connect_status_t Network Connection Action Type Configuration
spastor 0:1c358ea10753 346 * @{
spastor 0:1c358ea10753 347 */
spastor 0:1c358ea10753 348 /**
spastor 0:1c358ea10753 349 * Connection action which is used to to tell the connector to make connection to
spastor 0:1c358ea10753 350 * Device Cloud automatically or manually. It's used for the following callbacks:
spastor 0:1c358ea10753 351 * -# @ref connector_request_id_config_network_tcp
spastor 0:1c358ea10753 352 * -# @ref connector_request_id_config_network_udp
spastor 0:1c358ea10753 353 * -# @ref connector_request_id_config_network_sms
spastor 0:1c358ea10753 354 *
spastor 0:1c358ea10753 355 * @see @ref network_tcp_start
spastor 0:1c358ea10753 356 * @see @ref network_udp_start
spastor 0:1c358ea10753 357 * @see @ref network_sms_start
spastor 0:1c358ea10753 358 */
spastor 0:1c358ea10753 359 typedef struct {
spastor 0:1c358ea10753 360 connector_connect_auto_type_t type; /**< Connection action */
spastor 0:1c358ea10753 361 } connector_config_connect_type_t;
spastor 0:1c358ea10753 362 /**
spastor 0:1c358ea10753 363 * @}
spastor 0:1c358ea10753 364 */
spastor 0:1c358ea10753 365
spastor 0:1c358ea10753 366
spastor 0:1c358ea10753 367 /**
spastor 0:1c358ea10753 368 * @defgroup connector_wan_type_t Device WAN Types
spastor 0:1c358ea10753 369 * @{
spastor 0:1c358ea10753 370 */
spastor 0:1c358ea10753 371 /**
spastor 0:1c358ea10753 372 * Device WAN connection type which tells the connector the device WAN type for the device WAN ID.
spastor 0:1c358ea10753 373 *
spastor 0:1c358ea10753 374 * @see connector_config_wan_type_t
spastor 0:1c358ea10753 375 */
spastor 0:1c358ea10753 376 typedef enum {
spastor 0:1c358ea10753 377 connector_wan_type_imei, /**< IMEI number for GSM network */
spastor 0:1c358ea10753 378 connector_wan_type_esn, /**< ESN for CDMA network */
spastor 0:1c358ea10753 379 connector_wan_type_meid /**< MEID for CDMA network */
spastor 0:1c358ea10753 380 } connector_wan_type_t;
spastor 0:1c358ea10753 381 /**
spastor 0:1c358ea10753 382 * @}
spastor 0:1c358ea10753 383 */
spastor 0:1c358ea10753 384
spastor 0:1c358ea10753 385
spastor 0:1c358ea10753 386 /**
spastor 0:1c358ea10753 387 * @defgroup connector_config_wan_type_t Device WAN Type Configuration
spastor 0:1c358ea10753 388 * @{
spastor 0:1c358ea10753 389 */
spastor 0:1c358ea10753 390 /**
spastor 0:1c358ea10753 391 * Device WAN type configuration for @ref connector_request_id_config_wan_type callback.
spastor 0:1c358ea10753 392 * This is used to tell the connector the device WAN type. The connector uses this WAN type to
spastor 0:1c358ea10753 393 * get a corresponding WAN ID.
spastor 0:1c358ea10753 394 *
spastor 0:1c358ea10753 395 * @ref wan_type
spastor 0:1c358ea10753 396 * @ref imei_number
spastor 0:1c358ea10753 397 * @ref esn_number
spastor 0:1c358ea10753 398 * @ref meid_number
spastor 0:1c358ea10753 399 **/
spastor 0:1c358ea10753 400 typedef struct {
spastor 0:1c358ea10753 401 connector_wan_type_t type; /**< WAN type */
spastor 0:1c358ea10753 402 } connector_config_wan_type_t;
spastor 0:1c358ea10753 403 /**
spastor 0:1c358ea10753 404 * @}
spastor 0:1c358ea10753 405 */
spastor 0:1c358ea10753 406
spastor 0:1c358ea10753 407
spastor 0:1c358ea10753 408 /**
spastor 0:1c358ea10753 409 * @defgroup connector_identity_verification_t Identity Verification Form Types
spastor 0:1c358ea10753 410 * @{
spastor 0:1c358ea10753 411 */
spastor 0:1c358ea10753 412 /**
spastor 0:1c358ea10753 413 * Identify verification tells the connector to use simple or password identity verification for TCP connection.
spastor 0:1c358ea10753 414 *
spastor 0:1c358ea10753 415 * @see connector_config_identity_verification_t
spastor 0:1c358ea10753 416 */
spastor 0:1c358ea10753 417 typedef enum {
spastor 0:1c358ea10753 418 connector_identity_verification_simple, /**< Callback returns this form for simple identity verification. Cloud Connector just transmits the
spastor 0:1c358ea10753 419 device ID and the Device Cloud URL. */
spastor 0:1c358ea10753 420 connector_identity_verification_password /**< Callback returns this form for password identity verification. Cloud Connector exchanges a pre-shared
spastor 0:1c358ea10753 421 secret password with Device Cloud. The password must match the password set in Device Cloud.
spastor 0:1c358ea10753 422 @note Cloud Connector will call @ref connector_request_id_config_password callback for the password. */
spastor 0:1c358ea10753 423 } connector_identity_verification_t;
spastor 0:1c358ea10753 424 /**
spastor 0:1c358ea10753 425 * @}
spastor 0:1c358ea10753 426 */
spastor 0:1c358ea10753 427
spastor 0:1c358ea10753 428
spastor 0:1c358ea10753 429 /**
spastor 0:1c358ea10753 430 * @defgroup connector_config_identity_verification_t Device Identity Verification Configuration
spastor 0:1c358ea10753 431 * @{
spastor 0:1c358ea10753 432 */
spastor 0:1c358ea10753 433 /**
spastor 0:1c358ea10753 434 * Identify verification configuration for @ref connector_request_id_config_identity_verification callback.
spastor 0:1c358ea10753 435 * It tells the connector to use simple or password identity verification for TCP connection.
spastor 0:1c358ea10753 436 *
spastor 0:1c358ea10753 437 * @see @ref identity_verification
spastor 0:1c358ea10753 438 * @see @ref password
spastor 0:1c358ea10753 439 * @see @ref connector_request_id_config_password
spastor 0:1c358ea10753 440 **/
spastor 0:1c358ea10753 441 typedef struct {
spastor 0:1c358ea10753 442 connector_identity_verification_t type; /**< Identity verification type */
spastor 0:1c358ea10753 443
spastor 0:1c358ea10753 444 } connector_config_identity_verification_t;
spastor 0:1c358ea10753 445 /**
spastor 0:1c358ea10753 446 * @}
spastor 0:1c358ea10753 447 */
spastor 0:1c358ea10753 448
spastor 0:1c358ea10753 449
spastor 0:1c358ea10753 450 /**
spastor 0:1c358ea10753 451 * @defgroup connector_config_max_transaction_t Device Maximum Transaction Configuration
spastor 0:1c358ea10753 452 * @{
spastor 0:1c358ea10753 453 */
spastor 0:1c358ea10753 454 /**
spastor 0:1c358ea10753 455 * Device maximum transaction configuration for @ref connector_request_id_config_max_transaction callback.
spastor 0:1c358ea10753 456 *
spastor 0:1c358ea10753 457 * @see @ref max_msg_transactions
spastor 0:1c358ea10753 458 **/
spastor 0:1c358ea10753 459 typedef struct {
spastor 0:1c358ea10753 460 uint8_t count; /**< Maximum transaction count */
spastor 0:1c358ea10753 461 } connector_config_max_transaction_t;
spastor 0:1c358ea10753 462 /**
spastor 0:1c358ea10753 463 * @}
spastor 0:1c358ea10753 464 */
spastor 0:1c358ea10753 465
spastor 0:1c358ea10753 466 #if !defined _CONNECTOR_API_H
spastor 0:1c358ea10753 467 #error "Illegal inclusion of connector_api_config.h. You should only include connector_api.h in user code."
spastor 0:1c358ea10753 468 #endif
spastor 0:1c358ea10753 469
spastor 0:1c358ea10753 470 #else
spastor 0:1c358ea10753 471 #error "Illegal inclusion of connector_api_config.h. You should only include connector_api.h in user code."
spastor 0:1c358ea10753 472 #endif
spastor 0:1c358ea10753 473
spastor 0:1c358ea10753 474