NSDL C library

Dependents:   NSDL_HelloWorld_WiFi UbloxModemNanoServiceClient IOT-NSDL_HelloWorld LWM2M_NanoService_Ethernet ... more

Fork of nsdl_lib by Tero Heinonen

Note that use of this software requires acceptance of the Sensinode EULA: http://mbed.org/teams/Sensinode/code/nsdl_lib/wiki/EULA

Revision:
5:da1db64e7fb9
Parent:
0:58c4f13c4b9a
Child:
6:1caf76131c9a
diff -r 58c4f13c4b9a -r da1db64e7fb9 sn_nsdl.h
--- a/sn_nsdl.h	Wed Oct 09 09:20:29 2013 +0000
+++ b/sn_nsdl.h	Mon Oct 14 11:00:30 2013 +0000
@@ -26,7 +26,7 @@
 #endif
 
 #ifndef SN_NSDL_HAVE_HTTPS_CAPABILITY
-#define SN_NSDL_HAVE_HTTPS_CAPABILITY	0
+#define SN_NSDL_HAVE_HTTPS_CAPABILITY		0
 #endif
 
 #ifndef SN_NSDL_HAVE_COAP_CAPABILITY
@@ -43,32 +43,35 @@
 /* * * * * * * * * * * * * * */
 
 
+/**
+ * \brief Used protocol
+ */
 typedef enum sn_nsdl_capab_
 {
-    SN_NSDL_PROTOCOL_HTTP           = 0x01,
-    SN_NSDL_PROTOCOL_HTTPS          = 0x02,
-    SN_NSDL_PROTOCOL_COAP           = 0x04
+    SN_NSDL_PROTOCOL_HTTP           = 0x01,			/**< Unsupported */
+    SN_NSDL_PROTOCOL_HTTPS          = 0x02,			/**< Unsupported */
+    SN_NSDL_PROTOCOL_COAP           = 0x04			/**< Supported */
 } sn_nsdl_capab_e;
 
+/**
+ * \brief Address type of given address
+ */
 typedef enum sn_nsdl_addr_type_
 {
-    SN_NSDL_ADDRESS_TYPE_IPV6       = 0x01,
-    SN_NSDL_ADDRESS_TYPE_IPV4       = 0x02,
-    SN_NSDL_ADDRESS_TYPE_HOSTNAME   = 0x03,
+    SN_NSDL_ADDRESS_TYPE_IPV6       = 0x01,			/**< Supported */
+    SN_NSDL_ADDRESS_TYPE_IPV4       = 0x02,			/**< Supported */
+    SN_NSDL_ADDRESS_TYPE_HOSTNAME   = 0x03,			/**< Unsupported */
     SN_NSDL_ADDRESS_TYPE_NONE       = 0xFF
 } sn_nsdl_addr_type_e;
 
 
-#define SN_NDSL_RESOURCE_NOT_REGISTERED	0
-#define SN_NDSL_RESOURCE_REGISTERING	1
-#define SN_NDSL_RESOURCE_REGISTERED		2
-
-
 /* * * * * * * * * * * * * */
 /* * * * STRUCTURES  * * * */
 /* * * * * * * * * * * * * */
 
-/* Address structure of Packet data */
+/**
+ * \brief Address structure of Packet data
+ */
 typedef struct sn_nsdl_addr_
 {
     sn_nsdl_addr_type_e     type;
@@ -82,32 +85,24 @@
 
 } sn_nsdl_addr_s;
 
-/* This structure is returned by sn_coap_exec() for sending */
-typedef struct sn_nsdl_transmit_
-{
-    sn_nsdl_addr_s         *dst_addr_ptr;
-
-    sn_nsdl_capab_e         protocol;
-
-    uint16_t                packet_len;
-    uint8_t                *packet_ptr;
-} sn_nsdl_transmit_s;
-
+/**
+ * \brief Used for creating manually NSP registration message with sn_coap_register()
+ */
 typedef struct registration_info_
 {
-	uint8_t *endpoint_ptr;
+	uint8_t *endpoint_ptr;			/**< Endpoint name */
 	uint8_t endpoint_len;
 
-	uint8_t *endpoint_type_ptr;
+	uint8_t *endpoint_type_ptr;		/**< Endpoint type */
 	uint8_t endpoint_type_len;
 
-	uint8_t *links_ptr;
+	uint8_t *links_ptr;				/**< Resource registration string */
 	uint16_t links_len;
 
-}registration_info_t;
+} registration_info_t;
 
 #endif /* SN_NSDL_H_ */
 
 #ifdef __cplusplus
 }
-#endif
\ No newline at end of file
+#endif