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 C027_Support by
Diff: MDM.h
- Revision:
- 25:4045d02e44f1
- Parent:
- 24:0e287a85ac9e
- Child:
- 26:07be5faf8925
--- a/MDM.h Tue Apr 08 11:15:33 2014 +0000
+++ b/MDM.h Tue Apr 08 11:59:28 2014 +0000
@@ -42,6 +42,9 @@
#define SOCKET_ERROR -1
#define SOCKET_OK 0
typedef uint32_t IP;
+ typedef enum { NET_UNKNOWN, NET_DENIED, NET_NONE, NET_HOME, NET_ROAMING } Net;
+ typedef enum { ACT_UNKNOWN, ACT_GSM, ACT_EDGE, ACT_UTRAN, ACT_CDMA } AcT;
+ typedef struct { const char* num; const char* opr; int rssi; Net net; AcT act; } Status;
MDMParser(void);
@@ -54,7 +57,7 @@
// network
bool init(const char* pin = NULL);
- bool checkNetStatus(void);
+ bool checkNetStatus(Status* info = NULL);
bool powerOff(void);
// internet connection
bool join(const char* apn, const char* user = NULL, const char* password = NULL);
@@ -84,7 +87,6 @@
virtual int _send(const void* buf, int len) = 0;
private:
typedef enum { MODEL_UNKNOWN, MODEL_SARA_G350, MODEL_LISA_U200, MODEL_LISA_C200 } Model;
- typedef enum { NET_UNKNOWN, NET_DENIED, NET_NONE, NET_HOME, NET_ROAMING } Net;
typedef enum { SIM_UNKNOWN, SIM_PIN, SIM_READY } Sim;
static int _cbATI(int type, const char* buf, int len, Model* model);
static int _cbUDNSRN(int type, const char* buf, int len, IP* ip);
@@ -100,7 +102,9 @@
Model _model;
Sim _sim;
Net _net;
+ AcT _act;
char _num[32];
+ char _opr[32];
int _rssi;
private:
typedef enum { SOCK_FREE, SOCK_CREATED, SOCK_CONNECTED } SockState;
