FIAP (IEEE1888) library

Dependents:   Fetch_IEEE1888_Storage IEEE1888_MULTI_SENSOR_GW

Fork of FiapV2 by Yasushi TAUCHI

Revision:
15:3bd6f70e57e2
Parent:
14:a9ec0e6e22c8
Child:
19:101d8775b33d
--- a/fiap.h	Sun Feb 24 05:57:19 2013 +0000
+++ b/fiap.h	Wed Feb 27 14:19:33 2013 +0000
@@ -19,10 +19,7 @@
 #define FIAP_UPLOAD_FIAPERR  4  // FIAP Server error
 
 // use fetch_last_data(struct fiap_element* v, unsigned int esize) if true
-#define USE_FETCH_MULTI  false
-
-// use fetch_last_data(struct fiap_element* v) if true, but it seems to be broken
-#define USE_FETCH_ONLY_1 false
+#define USE_FETCH  true
 
 /** fiap_element
  *@param char*     cid    Point ID
@@ -63,38 +60,43 @@
      */
     void setStorage(char Storage[]);
 
+    /* Set mode
+     * @param _use_fetch use fetch mode if true, write mode if false
+     */
+    void setMode(bool _use_fetch);
+
     /** post
      * @param v data vaule
      * @param esize  number of data
      */
     int post(struct fiap_element* v, unsigned int esize);
 
-    /** fetch_maximum 
+    /** fetch last data
      * @param cid Point ID s
      * @param v Return Values
      * @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);
+
+    /** get status text
+     * @param r HTTPResult
+     * @preturn status text
+     */
+    char* HTTPStatusText(HTTPResult r);
 
     /** debug_mode
      *  Output XML and Error
      */
     bool debug_mode;
-    
+   
 private:
     bool _use_fetch;//use fetch mode if true, write mode if false
     char _fiap_storage[100];//FIAP Storage Addrees
-    //char _fiap_id_prefix[100];
     char _soap_header[256];
     char _soap_footer[256];
     char _soap_action[32];
     char _soap_text[2000];
-    char _uuid[37];
-    void xml_initialize(void);
-    void generateUUID();
-    char* HTTPStatusText(HTTPResult r);
     void myprintf(char*);
 };