FIAP (IEEE1888) library

Dependents:   Fetch_IEEE1888_Storage IEEE1888_MULTI_SENSOR_GW

Fork of FiapV2 by Yasushi TAUCHI

Revision:
4:edbcc1833b58
Parent:
3:7b144e1a52db
Child:
5:f0b636449aa3
--- a/fiap.cpp	Mon Aug 20 12:47:43 2012 +0000
+++ b/fiap.cpp	Mon Aug 20 12:52:50 2012 +0000
@@ -86,9 +86,9 @@
     char rstr[800];
     HTTPText stream(rstr,800);
     //stream.readNext((byte*)outBuffer,1500);
-    printf("post.start \n\r");
+     if (debug_mode)printf("post.start \n\r");
     HTTPResult r = http.postXML(_fiap_storage,"http://soap.fiap.org/query",InData,&stream);
-    printf("post.end \n\r");
+    if (debug_mode) printf("post.end \n\r");
     if(!r) {
         if (debug_mode)printf("Success \n");
     } else {
@@ -141,7 +141,7 @@
         SP_XmlElementNode * fiapError = transport.getChild("header").getChild("error").toElement();
         int yy,mo,dd,hh,mm,ss;
         char str[50];
-        printf ("%s \n",transport.toElement()->getName());
+        if (debug_mode) printf ("%s \n",transport.toElement()->getName());
         if (fiapError==NULL) {
             SP_XmlElementNode * values =transport.getChild("body").toElement();
             points=(SP_XmlNodeList *)values->getChildren() ;
@@ -209,9 +209,9 @@
     HTTPText InData(_soap_text);
     HTTPText stream(rstr,800);
 //    stream.readNext((byte*)outBuffer,strlen(outBuffer));
-    printf("post.start \n\r");
+     if (debug_mode)printf("post.start \n\r");
     HTTPResult r = http.postXML(_fiap_storage,"http://soap.fiap.org/query",InData,&stream);
-    printf("post.end \n\r");
+     if (debug_mode)printf("post.end \n\r");
     if(!r) {
         if (debug_mode)printf("Success \n");
     } else {
@@ -258,15 +258,15 @@
         SP_XmlDomParser parser;
         // if (debug_mode)printf("stream readlen = %d \n\r",stream.readLen());
         // outBuffer[stream.readLen()]=0;
-        printf("check0\n\r");
+         if (debug_mode)printf("check0\n\r");
         parser.append(rstr,strlen(rstr));
-        printf("check1\n\r");
+         if (debug_mode)printf("check1\n\r");
         SP_XmlHandle rootHandle(parser.getDocument()->getRootElement());
         SP_XmlHandle transport = rootHandle.getChild(0).getChild(0).getChild(0);
         SP_XmlElementNode * fiapError = transport.getChild("header").getChild("error").toElement();
         int yy,mo,dd,hh,mm,ss;
         char str[50];
-        printf ("%s \n\r",transport.toElement()->getName());
+         if (debug_mode)printf ("%s \n\r",transport.toElement()->getName());
         if (fiapError==NULL) {
             SP_XmlElementNode * values =transport.getChild("body").toElement();
             points=(SP_XmlNodeList *)values->getChildren() ;