Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of VodafoneUSBModem by
Diff: VodafoneUSBModem.h
- Revision:
- 41:8bec5a8ea878
- Parent:
- 33:f505faeda8e7
--- a/VodafoneUSBModem.h Thu Sep 20 08:04:43 2012 +0000 +++ b/VodafoneUSBModem.h Fri Sep 21 11:10:32 2012 +0000 @@ -105,34 +105,49 @@ int power(bool enable); protected: - bool power(); + bool power(); //< Turn power to USB dongle ON. + /** Initialise dongle. + * The following actions are performed: + * 1) Power up + * 2) Establish USB connection to dongle + * 3) Start AT interface thread + * 4) Wait for network registration + */ int init(); + + /** De-initialise dongle. + * The following actions are performed: + * 1) Tear down PPP session + * 2) Set SMS,USSD, and LinkMonitor subsystems to un-initialised + * 3) Close the AT commands interface + * 4) Tear down the USB connection to dongle + */ int cleanup(); private: - WANDongle m_dongle; + WANDongle m_dongle; //< Interface to USB connected WAN dongle - USBSerialStream m_atStream; - USBSerialStream m_pppStream; + USBSerialStream m_atStream; //< Serial interface to AT channel on modem + USBSerialStream m_pppStream; //< Serial interface to PPP channel on modem - ATCommandsInterface m_at; + ATCommandsInterface m_at; //< Interface to AT commands processing - SMSInterface m_sms; - USSDInterface m_ussd; - LinkMonitor m_linkMonitor; + SMSInterface m_sms; //< Interface to SMS manager (send/receive etc) + USSDInterface m_ussd; //< Interface to USSD manager (send etc) + LinkMonitor m_linkMonitor; //< Interface to link monitor (RSSI) - PPPIPInterface m_ppp; + PPPIPInterface m_ppp; //< Interface to PPP conection manager (IP assignment etc) - bool m_dongleConnected; - bool m_ipInit; - bool m_smsInit; - bool m_ussdInit; - bool m_linkMonitorInit; - bool m_atOpen; + bool m_dongleConnected; //< Is the dongle physically connected (does the USB stack respond)? true/false + bool m_ipInit; //< Has PPIPInterface object (m_ppp) been initialised? true/false + bool m_smsInit; //< Has SMSInterface object (m_sms) been initialised? true/false + bool m_ussdInit; //< Has USSDInterface object (m_ussd) been initialised? true/false + bool m_linkMonitorInit; //< Has LinkMonitor object (m_linkMonitor) been initialised? true/false + bool m_atOpen; //< Is the interface to the ATCommandsInterface open? true/false - PinName m_powerGatingPin; - bool m_powerGatingOnWhenPinHigh; + PinName m_powerGatingPin; //< Pin which toggles power gating + bool m_powerGatingOnWhenPinHigh; //< Semantics of power gating (whether high or low toggles power gating) };