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.
Dependencies: Chemical_Sensor_DMA GPRS DPG_FINAL MBed_Adafruit-GPS-Library SDFileSystem Socket mbed
GPRSInterface Class Reference
Interface using GPRS to connect to an IP-based network. More...
#include <GPRSInterface.h>
Public Member Functions | |
| GPRSInterface (PinName tx, PinName rx, int baudRate, const char *apn, const char *userName=NULL, const char *passWord=NULL) | |
| Constructor. | |
| int | init () |
| Initialize the interface(no connection at this point). | |
| int | connect () |
| Connect to the network and get IP address. | |
| int | disconnect () |
| Disconnect with the network. | |
| char * | getIPAddress () |
| Get IP address. | |
| char * | getPhoneNumber () |
| Get Phone Number. | |
Detailed Description
Interface using GPRS to connect to an IP-based network.
Definition at line 32 of file GPRSInterface.h.
Constructor & Destructor Documentation
| GPRSInterface | ( | PinName | tx, |
| PinName | rx, | ||
| int | baudRate, | ||
| const char * | apn, | ||
| const char * | userName = NULL, |
||
| const char * | passWord = NULL |
||
| ) |
Constructor.
- Parameters:
-
tx mbed pin to use for tx line of Serial interface rx mbed pin to use for rx line of Serial interface baudRate serial communicate baud rate apn name of the gateway for GPRS to connect to the network userName apn's username, usually is NULL passWord apn's password, usually is NULL
Definition at line 25 of file GPRSInterface.cpp.
Member Function Documentation
| int connect | ( | ) |
Connect to the network and get IP address.
- Returns:
- 0 on success, a negative number on failure
Definition at line 36 of file GPRSInterface.cpp.
| int disconnect | ( | ) |
Disconnect with the network.
- Returns:
- 0 on success, a negative number on failure
Definition at line 41 of file GPRSInterface.cpp.
| char * getIPAddress | ( | ) |
| char * getPhoneNumber | ( | ) |
| int init | ( | ) |
Initialize the interface(no connection at this point).
- Returns:
- 0 on success, a negative number on failure
Definition at line 30 of file GPRSInterface.cpp.
Generated on Thu Jul 14 2022 21:28:41 by
1.7.2