for u-blox
Fork of C027_Support by
Revision 120:0e718a4ea25e, committed 2015-07-01
- Comitter:
- mazgch
- Date:
- Wed Jul 01 13:21:31 2015 +0000
- Parent:
- 119:db878a234544
- Child:
- 124:65eb7d58f2da
- Commit message:
- add API to get current device status and ip
Changed in this revision
MDM.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MDM.h Thu Mar 12 17:10:17 2015 +0000 +++ b/MDM.h Wed Jul 01 13:21:31 2015 +0000 @@ -108,6 +108,11 @@ bool init(const char* simpin = NULL, DevStatus* status = NULL, PinName pn MDM_IF( = MDMPWRON, = D4)); + /** get the current device status + \param strocture holding the device information. + */ + void getDevStatus(MDMParser::DevStatus* dev) { memcpy(dev, &_dev, sizeof(DevStatus)); } + /** register to the network \param status an optional structure to with network information \param timeout_ms -1 blocking, else non blocking timeout in ms @@ -152,6 +157,11 @@ */ MDMParser::IP gethostbyname(const char* host); + /** get the current assigned IP address + \return the ip that is assigned + */ + MDMParser::IP getIpAddress(void) { return _ip; } + // ---------------------------------------------------------------- // Sockets // ----------------------------------------------------------------