Base class for the ublox-xxx-cellular-xxx classes. Cannot be used standalone, only inherited by classes that do properly useful stuff. Or, to put it another way, if you are using any of the ublox-xxx-cellular-xxx classes, you will need this class also.
Dependents: example-ublox-cellular-interface example-ublox-cellular-driver-gen HelloMQTT example-ublox-cellular-interface_r410M ... more
Revision 13:158a035b1b50, committed 2018-01-09
- Comitter:
- fahim alavi
- Date:
- Tue Jan 09 15:08:31 2018 +0500
- Parent:
- 12:aa3cbc3f88c5
- Child:
- 14:e420232ee4e7
- Commit message:
- Method moved in public area of code
Changed in this revision
| UbloxCellularBase.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/UbloxCellularBase.cpp Tue Jan 09 12:34:53 2018 +0500
+++ b/UbloxCellularBase.cpp Tue Jan 09 15:08:31 2018 +0500
@@ -209,31 +209,6 @@
return success;
}
-/** Get the IMEI.
- *
- * @return true if successful, otherwise false.
- */
-bool UbloxCellularBase::get_imei(char *imei_to_send, int size)
-{
- bool success;
- LOCK();
-
- MBED_ASSERT(_at != NULL);
-
- // International mobile equipment identifier
- // AT Command Manual UBX-13002752, section 4.7
- success = _at->send("AT+CGSN") && _at->recv("%15[^\n]\nOK\n", _dev_info.imei);
- tr_info("DevInfo: IMEI=%s", _dev_info.imei);
-
- if (success) {
- memcpy(imei_to_send,_dev_info.imei,size);
- imei_to_send[size-1] = '\0';
- }
-
- UNLOCK();
- return success;
-}
-
bool UbloxCellularBase::get_meid()
{
bool success;
@@ -934,5 +909,30 @@
return success;
}
+/** Get the IMEI.
+ *
+ * @return true if successful, otherwise false.
+ */
+bool UbloxCellularBase::get_imei(char *imei_to_send, int size)
+{
+ bool success;
+ LOCK();
+
+ MBED_ASSERT(_at != NULL);
+
+ // International mobile equipment identifier
+ // AT Command Manual UBX-13002752, section 4.7
+ success = _at->send("AT+CGSN") && _at->recv("%15[^\n]\nOK\n", _dev_info.imei);
+ tr_info("DevInfo: IMEI=%s", _dev_info.imei);
+
+ if (success) {
+ memcpy(imei_to_send,_dev_info.imei,size);
+ imei_to_send[size-1] = '\0';
+ }
+
+ UNLOCK();
+ return success;
+}
+
// End of File
u-blox