mqtt specific components for the impact mbed endpoint library
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_mqtt_endpoint_nxp
Revision 23:34086bc15b02, committed 2014-04-02
- Comitter:
- ansond
- Date:
- Wed Apr 02 04:35:41 2014 +0000
- Parent:
- 22:afb208d1d79e
- Child:
- 24:e706feda4970
- Commit message:
- updates
Changed in this revision
MBEDEndpoint.cpp | Show annotated file Show diff for this revision Revisions of this file |
MBEDEndpoint.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MBEDEndpoint.cpp Wed Apr 02 02:30:33 2014 +0000 +++ b/MBEDEndpoint.cpp Wed Apr 02 04:35:41 2014 +0000 @@ -37,7 +37,7 @@ extern void closedown(int code); // default constructor - MBEDEndpoint::MBEDEndpoint(ErrorHandler *error_handler,void *ethernet) : BaseClass(error_handler,NULL) { + MBEDEndpoint::MBEDEndpoint(ErrorHandler *error_handler,void *transport,void *pinouts) : BaseClass(error_handler,NULL) { bool success = true; this->m_instance_id = 0; this->m_preferences = NULL; @@ -61,10 +61,10 @@ #ifdef CELLULAR_NETWORK this->m_cellular_modem = NULL; this->m_gps = NULL; - if (success) success = this->initializeCellularModem(); + if (success) success = this->initializeCellularModem(transport,pinouts); if (success) success = this->initializeGPSReceiver(); #else - if (success) success = this->initializeEthernet((EthernetInterface *)ethernet); + if (success) success = this->initializeEthernet((EthernetInterface *)transport); #endif if (success) this->logger()->turnLEDYellow(); if (success)this->m_map = new MBEDToIOCResourceMap(error_handler); @@ -230,11 +230,11 @@ } #ifdef CELLULAR_NETWORK - bool MBEDEndpoint::initializeCellularModem() { + bool MBEDEndpoint::initializeCellularModem(void *transport,void *pinouts) { bool success = false; // initialize - if (this->m_cellular_modem == NULL) this->m_cellular_modem = new MBEDUbloxCellRadio(this->logger(),this); + if (this->m_cellular_modem == NULL) this->m_cellular_modem = new MBEDUbloxCellRadio(this->logger(),this,(UBLOX_MODEM *)transport,(C027 *)pinouts); if (this->m_cellular_modem != NULL) success = this->m_cellular_modem->connect(); // return our status
--- a/MBEDEndpoint.h Wed Apr 02 02:30:33 2014 +0000 +++ b/MBEDEndpoint.h Wed Apr 02 04:35:41 2014 +0000 @@ -69,7 +69,7 @@ int m_instance_id; // instance ID for this endpoint public: - MBEDEndpoint(ErrorHandler *error_handler,void *ethernet); + MBEDEndpoint(ErrorHandler *error_handler,void *transport,void *pinouts); virtual ~MBEDEndpoint(); ResourceFactory *initResourceFactory(); void run(); @@ -111,7 +111,7 @@ bool closeTransports(); #ifdef CELLULAR_NETWORK - bool initializeCellularModem(); + bool initializeCellularModem(void *transports,void *pinouts); bool initializeGPSReceiver(); bool closeCellularModem(); bool closeGPSReceiver();