use TCP to connect to mbed connector

Fork of mbedConnectorInterfaceWithDM by Doug Anson

Revision:
10:3f79b5e67c22
Parent:
9:faa43faea4ca
Child:
12:d0e61bac8c27
--- a/mbed-connector-interface/Options.h	Wed Feb 24 14:50:03 2016 +0000
+++ b/mbed-connector-interface/Options.h	Fri Mar 04 19:16:57 2016 +0000
@@ -48,6 +48,9 @@
 typedef vector<DynamicResource *> DynamicResourcesList;
 typedef vector<ResourceObserver *> ResourceObserversList;
 
+// Default CoAP URL
+#define DEF_COAP_PORT		5683
+
 // WiFi Security types
 typedef enum {
     WIFI_WPA_PERSONAL,
@@ -63,6 +66,20 @@
     MESH_NUM_TYPES
 } MeshTypes;
 
+// Connection Types for CoAP
+typedef enum {
+    COAP_TCP,
+    COAP_UDP,
+    COAP_NUM_TYPES
+} CoAPConnectionTypes;
+
+// IP Address Types
+typedef enum {
+    IP_ADDRESS_TYPE_IPV4,
+    IP_ADDRESS_TYPE_IPV6,
+    IP_ADDRESS_TYPE_NUM_TYPES
+} IPAddressTypes;
+
 namespace Connector {
 
 /** Options class
@@ -88,7 +105,7 @@
     /**
     Get the node lifetime
     */
-   int getLifetime();
+    int getLifetime();
 
     /**
     Get the NSP domain
@@ -115,7 +132,11 @@
     */
     char *getConnectorURL();
 
-
+	/**
+	Get the connector connection port from the URL
+	*/
+	uint16_t getConnectorPort();
+	
 	/**
     Get the list of device resources
     */
@@ -151,7 +172,7 @@
     */
     unsigned char *getPreSharedKey();
     
-    /**
+     /**
     Get the 802.15.4 Pre Shared Key Identity
     */
     unsigned char *getPreSharedKeyIdentity();
@@ -160,6 +181,16 @@
     Get the 802.15.14 Mesh Type
     */
     MeshTypes getMeshType();
+    
+    /**
+    Get the CoAP Connection Type
+    */
+    CoAPConnectionTypes getCoAPConnectionType();
+    
+     /**
+    Get the IP Address Type
+    */
+    IPAddressTypes getIPAddressType();
 
     /**
     Enable/Disable Immediate Observationing
@@ -214,11 +245,17 @@
     string               			m_wifi_ssid;
     string               			m_wifi_auth_key;
     WiFiAuthTypes        			m_wifi_auth_type;
+    
+    // CoAP Connection Types
+    CoAPConnectionTypes 			m_coap_connection_type;
+    
+    // IP Address Types
+    IPAddressTypes 					m_ip_address_type;
 
     // 802.15.4 Resources
     unsigned char 		    		m_psk[16];
     unsigned char		    		m_psk_identity[2];
-    MeshTypes						m_mesh_type;
+    MeshTypes			    		m_mesh_type;
     
     // DTLS/TLS Resources
     uint8_t 						m_server_cert[MAX_SERVER_CERT_LENGTH];
@@ -234,11 +271,11 @@
 
     // Endpoint Resources
     DeviceResourcesList   	m_device_resources;
-    StaticResourcesList   		m_static_resources;
+    StaticResourcesList   	m_static_resources;
     DynamicResourcesList  	m_dynamic_resources;
     ResourceObserversList 	m_resource_observers;
 };
 
 } // namespace Connector
 
-#endif // __OPTIONS_H__
+#endif // __OPTIONS_H__
\ No newline at end of file