Basic xdot code to check how many memory is available for user APP after initializing libxdot lorawan stack

Revision:
15:364df461110f
Parent:
11:d2e31743433a
Child:
21:09d05faf0e13
diff -r 19fae4509473 -r 364df461110f examples/src/dot_util.cpp
--- a/examples/src/dot_util.cpp	Tue Oct 11 13:53:32 2016 -0500
+++ b/examples/src/dot_util.cpp	Tue Oct 11 16:33:45 2016 -0500
@@ -251,6 +251,25 @@
     }
 }
 
+void update_network_link_check_config(uint8_t link_check_count, uint8_t link_check_threshold) {
+    uint8_t current_link_check_count = dot->getLinkCheckCount();
+    uint8_t current_link_check_threshold = dot->getLinkCheckThreshold();
+
+    if (current_link_check_count != link_check_count) {
+	logInfo("changing link check count from %u to %u", current_link_check_count, link_check_count);
+	if (dot->setLinkCheckCount(link_check_count) != mDot::MDOT_OK) {
+	    logError("failed to set link check count to %u", link_check_count);
+	}
+    }
+
+    if (current_link_check_threshold != link_check_threshold) {
+	logInfo("changing link check threshold from %u to %u", current_link_check_threshold, link_check_threshold);
+	if (dot->setLinkCheckThreshold(link_check_threshold) != mDot::MDOT_OK) {
+	    logError("failed to set link check threshold to %u", link_check_threshold);
+	}
+    }
+}
+
 void join_network() {
     int32_t j_attempts = 0;
     int32_t ret = mDot::MDOT_ERROR;