FIAP (IEEE1888) library
Dependents: Fetch_IEEE1888_Storage IEEE1888_MULTI_SENSOR_GW
Fork of FiapV2 by
Diff: fiap.cpp
- Revision:
- 13:13cceccf6bfb
- Parent:
- 12:f4e59ab2bab0
- Child:
- 14:a9ec0e6e22c8
--- a/fiap.cpp Fri Feb 22 16:41:51 2013 +0000 +++ b/fiap.cpp Sun Feb 24 05:53:20 2013 +0000 @@ -95,22 +95,22 @@ FIAP::FIAP() { - debug_mode=false; - _use_fetch =false; + debug_mode = false; + _use_fetch = false; xml_initialize(); } FIAP::FIAP(char Storage[]) { - debug_mode=false; - _use_fetch =false; + debug_mode = false; + _use_fetch = false; xml_initialize(); strcpy(_fiap_storage,Storage); } FIAP::FIAP(char Storage[], bool _use_fetch) { - debug_mode=false; + debug_mode = false; xml_initialize(); strcpy(_fiap_storage,Storage); } @@ -121,6 +121,7 @@ return; } +#if USE_FETCH_MULTI int FIAP::fetch_last_data(struct fiap_element* v, unsigned int esize) { HTTPClient http; @@ -235,12 +236,16 @@ myprintf("error\n\r"); } return 0; + +#else + return -1; +#endif //USE_FETCH_MULTI } -#if USE_FETCH_ONLY_1 - int FIAP::fetch_last_data(struct fiap_element* v) { +#if USE_FETCH_ONLY_1 + HTTPClient http; int ll; char rstr[800]; @@ -326,10 +331,12 @@ myprintf("error\n\r"); } return 0; + +#else + return -1; +#endif //USE_FETCH_ONLY_1 } -#endif //USE_FETCH_ONLY_1 - int FIAP::post(struct fiap_element* v, unsigned int esize) { HTTPClient http;