nsp specific components for the NSP version of the impact endpoint
Dependents: mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet mbed_nsp_endpoint_nxp
Diff: MBEDEndpoint.h
- Revision:
- 11:c4d02616e10f
- Parent:
- 6:edf306673e54
- Child:
- 14:07b77fbb1985
--- a/MBEDEndpoint.h Mon Mar 31 20:48:11 2014 +0000 +++ b/MBEDEndpoint.h Tue Apr 01 04:53:50 2014 +0000 @@ -34,16 +34,25 @@ // Preferences Support #include "Preferences.h" -#ifndef CELLULAR_NETWORK - // MBED Ethernet Interface +// network selection +#ifdef CELLULAR_NETWORK + // Cellular + #include "MBEDUbloxCellRadio.h" + #include "MBEDUbloxGPS.h" +#else + // Ethernet #include "EthernetInterface.h" #endif class MBEDEndpoint : public BaseClass { private: -#ifndef CELLULAR_NETWORK - EthernetInterface *m_ethernet; // ethernet interface +#ifdef CELLULAR_NETWORK + MBEDUbloxCellRadio *m_cellular_modem; // cell modem + MBEDUbloxGPS *m_gps; // GPS receiver +#else + EthernetInterface *m_ethernet; // ethernet interface #endif + Transport *m_transports[NUM_TRANSPORTS]; // our transport Personality *m_personalities[NUM_PERSONALITY_INSTANCES]; // our personalities (at least 1 instance) char m_endpoint_name[PERSONALITY_NAME_LEN+1]; // our endpoint name (personalities[0]) @@ -79,10 +88,16 @@ bool closePersonalities(); bool closeTransport(int index,char *key); bool closeTransports(); -#ifndef CELLULAR_NETWORK + +#ifdef CELLULAR_NETWORK + bool initializeCellularModem(); + bool initializeGPSReceiver(); + bool closeCellularModem(); + bool closeGPSReceiver(); +#else bool initializeEthernet(EthernetInterface *ethernet); - bool closeEthernet(); -#endif + bool closeEthernet(); +#endif }; #endif // _MBED_ENDPOINT_H_