Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: main.cpp
- Revision:
- 174:e8f11d1b5e3f
- Parent:
- 166:8e63cd2c003a
- Child:
- 175:d17460899bc9
--- a/main.cpp Fri Aug 01 12:15:46 2014 +0000 +++ b/main.cpp Thu Aug 28 20:56:35 2014 +0000 @@ -73,6 +73,12 @@ ErrorHandler *error_handler = NULL; MBEDEndpoint *endpoint = NULL; + #if SF_STATUS_REPORTING + // include Saleforce status reporting + #include "StatusReporter.h" + StatusReporter *sf_status_reporter = NULL; + #endif + #ifdef MAC_ADDRESS extern "C" void mbed_mac_address(char *s); char mac[6] = {MAC_ADDRESS}; @@ -136,15 +142,20 @@ sprintf(fmt_mac,"%02x:%02x:%02x:%02x:%02x:%02x",mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]); #endif error_handler = new ErrorHandler(&pc,&lcd); + +#if SF_STATUS_REPORTING + sf_status_reporter = new StatusReporter(error_handler); +#endif + #ifdef CELLULAR_NETWORK #ifdef NSP_CELLULAR_NETWORK MDMRtos<MDMSerial> modem; #else MDMSerial modem; #endif - endpoint = new MBEDEndpoint(error_handler,&modem,NULL); + endpoint = new MBEDEndpoint(error_handler,&modem,sf_status_reporter,NULL); #else - endpoint = new MBEDEndpoint(error_handler,ðernet,NULL); + endpoint = new MBEDEndpoint(error_handler,ðernet,sf_status_reporter,NULL); #endif if (endpoint != NULL) endpoint->run(); }