FIAP (IEEE1888) library

Dependents:   Fetch_IEEE1888_Storage IEEE1888_MULTI_SENSOR_GW

Fork of FiapV2 by Yasushi TAUCHI

Revision:
12:f4e59ab2bab0
Parent:
11:db42339d6cce
Child:
13:13cceccf6bfb
--- a/fiap.h	Fri Feb 22 05:00:50 2013 +0000
+++ b/fiap.h	Fri Feb 22 16:41:51 2013 +0000
@@ -17,8 +17,8 @@
 #define FIAP_UPLOAD_HTTPERR  3  // HTTP Server error (The response was not "200 OK")
 #define FIAP_UPLOAD_FIAPERR  4  // FIAP Server error
 
-//if true, it uses FETCH instead of WRITE procedure.
-#define USE_FETCH_PROCEDURE false
+// fetch_last_data(struct fiap_element* v) seems to be broken
+#define USE_FETCH_ONLY_1 false
 
 /** fiap_element
  *@param char*     cid    Point ID
@@ -48,6 +48,8 @@
 public:
     /** Create fiap object */
     FIAP();
+    FIAP(char Storage[]);
+    FIAP(char Storage[], bool _use_fetch);
 
     /** Set Storage URL
      * @param Storage FIAP Storage Addrees (ie. "http://fiap.org/axis2/services/FIAPStorage")
@@ -66,15 +68,15 @@
      * @param esize <=2
      * @return network_error
      */
-    int fetch_last_data(struct fiap_element* v,unsigned int esize);
-    int fetch_last_data(struct fiap_element * v);
+    int fetch_last_data(struct fiap_element* v, unsigned int esize);
 
     /** debug_mode
      *  Output XML and Error
      */
     bool debug_mode;
-
+    
 private:
+    bool _use_fetch;
     char _fiap_storage[100];
     //char _fiap_id_prefix[100];
     char _soap_header[256];