Multi-Hackers / SocketModem

Dependents:   M2X_dev axeda_wrapper_dev MTS_M2x_Example1 MTS_Cellular_Connect_Example ... more

Revision:
71:82205735732b
Parent:
68:c490e4a51778
Child:
82:5aa75004e553
--- a/cellular/Cellular.h	Tue Dec 24 01:15:44 2013 +0000
+++ b/cellular/Cellular.h	Thu Dec 26 16:12:49 2013 +0000
@@ -10,20 +10,6 @@
 namespace mts
 {
 
-#define PINGDELAY 3 //Time to wait on each ping for a response before timimg out (seconds)
-#define PINGNUM 4 //Number of pings to try on ping command
-
-//Special Payload Characters
-const char ETX = 0x03;  //Ends socket connection
-const char DLE = 0x10;  //Escapes ETX and DLE within Payload
-
-// An array of strings for printing the names of the Code enum.
-//const string CodeNames[] = {"OK", "ERROR", "NO_RESPONSE", "FAILURE"};
-
-// An array of strings for printing the names of the Registration enum.
-//const string RegistrationNames[] = {"NOT_REGISTERED", "REGISTERED", "SEARCHING", "DENIED", "UNKNOWN", "ROAMING"};
-
-
 /** This is a class for communicating with a Multi-Tech Systems SocketModem iCell. The
 * SocketModem iCell is a family of carrier certified embedded cellular radio modules with
 * a common hardware footprint and AT command set for built in IP-stack functionality.
@@ -233,15 +219,6 @@
 class Cellular : virtual mts::IPStack
 {
 public:
-    /// An enumeration for common responses to an AT command.
-    enum Code {
-        CELL_OK, CELL_ERROR, CELL_NO_RESPONSE, CELL_FAILURE
-    };
-
-    /// An enumeration for escape characters at the end of AT commands.
-    enum ESC_CHAR {
-        CR, CTRL_Z, NONE
-    };
 
     /// An enumeration of radio registration states with a cell tower.
     enum Registration {
@@ -342,10 +319,10 @@
     * @param command the command to send to the radio without the escape character.
     * @param timeoutMillis the time in millis to wait for a response before returning.
     * @param esc escape character to add at the end of the command, defaults to
-    * carriage return (CR).
+    * carriage return (CR).  Does not append any character if esc == 0.
     * @returns all data received from the radio after the command as a string.
     */
-    std::string sendCommand(const std::string& command, unsigned int timeoutMillis, ESC_CHAR esc = CR);
+    std::string sendCommand(const std::string& command, unsigned int timeoutMillis, char esc = CR);
 
     /** A method for sending a basic AT command to the radio. A basic AT command is
     * one that simply has a response of either OK or ERROR without any other information.
@@ -357,7 +334,7 @@
     * carriage return (CR).
     * @returns the standard AT Code enumeration.
     */
-    Code sendBasicCommand(const std::string& command, unsigned int timeoutMillis, ESC_CHAR esc = CR);
+    Code sendBasicCommand(const std::string& command, unsigned int timeoutMillis, char esc = CR);
 
     /** A method for testing command access to the radio.  This method sends the
     * command "AT" to the radio, which is a standard radio test to see if you
@@ -385,12 +362,6 @@
     */
     int getSignalStrength();
 
-    /** This method is used to get the phone number of the cellular radio if one exists.
-    *
-    * @returns the phone number as a string, otherwise "unknown" if it does not exist.
-    */
-    std::string getPhoneNumber();
-
     /** This method is used to check the registration state of the radio with the cell tower.
     * If not appropriatley registered with the tower you cannot make a cellular connection.
     *