C++ Wrapper around the IBM LMiC LoRaWAN implementation

Dependencies:   LMiC SX1276Lib

Files at this revision

API Documentation at this revision

Comitter:
Sille Van Landschoot
Date:
Sun Oct 16 09:57:58 2016 +0200
Parent:
8:8ce065f8c62f
Child:
10:9bf05e9b4cde
Commit message:
add linkcheck control

Changed in this revision

Node.cpp Show annotated file Show diff for this revision Revisions of this file
Node.h Show annotated file Show diff for this revision Revisions of this file
--- a/Node.cpp	Sun Oct 16 08:16:29 2016 +0200
+++ b/Node.cpp	Sun Oct 16 09:57:58 2016 +0200
@@ -85,5 +85,20 @@
     os_runloop_once();
 }
 
+void Node::enableLinkCheck()
+{
+    setLinkCheck(true);
+}
+
+void Node::disableLinkCheck()
+{
+    setLinkCheck(false);
+}
+
+void Node::setLinkCheck(int state)
+{
+    LMIC_setLinkCheckMode(state);
+}
+
 
 } /* namespace SimpleLoRaWAN */
--- a/Node.h	Sun Oct 16 08:16:29 2016 +0200
+++ b/Node.h	Sun Oct 16 09:57:58 2016 +0200
@@ -39,9 +39,13 @@
     static void onEvent(ev_t ev);
     void process();
 
+    void enableLinkCheck();
+    void disableLinkCheck();
+    void setLinkCheck(int state);
+
 private:
     void init();
-
+    void setLinkCheck();
 };
 
 } /* namespace SimpleLoRaWAN */