Digi XBeeLib fixed for NonCopyable issue

Dependents:   XBeeZB_Receive_Data

Fork of XBeeLib by Digi International Inc.

This lib fixes NonCopyable<T> issues of Digi XBeeLib. Also, lib has been reworked in order to make it RTOS-aware, overcoming several others issues due to stdio Mutex operations.

Files at this revision

API Documentation at this revision

Comitter:
hbujanda
Date:
Thu Jul 28 15:36:36 2016 +0200
Parent:
6:06522f3a6642
Child:
8:b5f4a0e92249
Commit message:
Automatic upload

Changed in this revision

DigiLogger.lib Show annotated file Show diff for this revision Revisions of this file
XBeeDM/XBeeDM.cpp Show annotated file Show diff for this revision Revisions of this file
XBeeDM/XBeeDM.h Show annotated file Show diff for this revision Revisions of this file
XBeeLib.h Show annotated file Show diff for this revision Revisions of this file
--- a/DigiLogger.lib	Thu Jul 28 10:17:20 2016 +0200
+++ b/DigiLogger.lib	Thu Jul 28 15:36:36 2016 +0200
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/Digi-International-Inc/code/DigiLogger/#58c5158b5120
+http://developer.mbed.org/teams/Digi-International-Inc/code/DigiLogger/#
--- a/XBeeDM/XBeeDM.cpp	Thu Jul 28 10:17:20 2016 +0200
+++ b/XBeeDM/XBeeDM.cpp	Thu Jul 28 15:36:36 2016 +0200
@@ -548,3 +548,34 @@
 
     return Success;
 }
+
+RadioStatus XBeeDM::config_poll_destination(const RemoteXBee& destination)
+{
+    uint32_t dh;
+    uint32_t dl;
+
+    if (destination.is_valid_addr64b()) {
+        const uint64_t dest64 = destination.get_addr64();
+        dh = (uint32_t)((dest64 >> 32) & 0xFFFFFFFF);
+        dl = (uint32_t)((dest64 & 0xFFFFFFFF));
+    } else {
+        digi_log(LogLevelError, "config_poll_destination: Invalid destination");
+        return Failure;
+    }
+
+    AtCmdFrame::AtCmdResp cmdresp;
+
+    cmdresp = set_param("DH", dh);
+    if (cmdresp != AtCmdFrame::AtCmdRespOk) {
+        digi_log(LogLevelError, "config_poll_destination: error %d:\r\n", cmdresp);
+        return Failure;
+    }
+
+    cmdresp = set_param("DL", dl);
+    if (cmdresp != AtCmdFrame::AtCmdRespOk) {
+        digi_log(LogLevelError, "config_poll_destination: error %d:\r\n", cmdresp);
+        return Failure;
+    }
+
+    return Success;
+}
--- a/XBeeDM/XBeeDM.h	Thu Jul 28 10:17:20 2016 +0200
+++ b/XBeeDM/XBeeDM.h	Thu Jul 28 15:36:36 2016 +0200
@@ -374,6 +374,17 @@
          */
         RadioStatus enable_dio_change_detection(const RemoteXBee& remote, IoLine line, bool enable);
 
+        /** config_poll_destination - configures to which node poll messages will be sent once module awakes if configured as
+         *                            an Indirect Msg Poller (CE==0x4).
+         * Consult the module's reference manual for more information.
+         *
+         *  @param destination remote device where the poll messages will be sent
+         *  @returns the result of the data transfer
+         *     Success if the operation was successful,
+         *     Failure otherwise
+         */
+        RadioStatus config_poll_destination(const RemoteXBee& destination);
+
     protected:
 
         /** Frame handler used for the node discovery. Registered when a callback function
--- a/XBeeLib.h	Thu Jul 28 10:17:20 2016 +0200
+++ b/XBeeLib.h	Thu Jul 28 15:36:36 2016 +0200
@@ -16,7 +16,7 @@
 #ifndef __XBEE_H_
 #define __XBEE_H_
 
-#define XB_LIBRARY_VERSION          0x01000007U
+#define XB_LIBRARY_VERSION          0x01010000U
 #define XB_MAJOR_VERSION            ((XB_LIBRARY_VERSION >> 24) & 0xFFU)
 #define XB_MINOR_VERSION            ((XB_LIBRARY_VERSION >> 16) & 0xFFU)
 #define XB_PATCH_LEVEL              ((XB_LIBRARY_VERSION >> 8) & 0xFFU)