Smart_Miun

Dependencies:   libmDot-mbed5 LoRa_Miun_lib

Fork of Dot-Examples by MultiTech

Files at this revision

API Documentation at this revision

Comitter:
biwa1400
Date:
Wed Oct 11 10:29:54 2017 +0000
Parent:
22:7230c1ce7bc2
Commit message:
20171011;

Changed in this revision

lib/LoRa_Miun.lib Show annotated file Show diff for this revision Revisions of this file
lib/SmartApp_Miun.lib Show diff for this revision Revisions of this file
project/inc/example.h Show diff for this revision Revisions of this file
project/src/example.cpp Show diff for this revision Revisions of this file
project/src/main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/lib/LoRa_Miun.lib	Thu Apr 20 07:03:29 2017 +0000
+++ b/lib/LoRa_Miun.lib	Wed Oct 11 10:29:54 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/biwa1400/code/LoRa_Miun_lib/#5d835ae2a591
+https://developer.mbed.org/users/biwa1400/code/LoRa_Miun_lib/#522bba1c5fa1
--- a/lib/SmartApp_Miun.lib	Thu Apr 20 07:03:29 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://developer.mbed.org/users/biwa1400/code/SmartApp_Miun/#5b29579a065e
--- a/project/inc/example.h	Thu Apr 20 07:03:29 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#ifndef __EXAMPLE_H__
-#define __EXAMPLE_H__
-
-#include "AppUnit.h"
-#include "SmartApp.h"
-
-
-class Application1: public MIUN::AppUnit 
-{
-public:
-    Application1(uint8_t appNumber):AppUnit(appNumber){};
-    
-    //@override
-     virtual void run(std::string payload);
-     
-     virtual void interrupt();
-
-};
-
-class Application2: public MIUN::AppUnit 
-{
-public:
-    Application2(uint8_t appNumber):AppUnit(appNumber){};
-    
-    //@override
-    //virtual void interrupt();
-
-};
-
-
-class SmartApp_Example: public MIUN::SmartApp 
-{
-public:    
-    //@override
-     virtual uint8_t measuredBattery();
-};
-
-#endif
\ No newline at end of file
--- a/project/src/example.cpp	Thu Apr 20 07:03:29 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-
-#include "example.h"
-#include "LoRa.h"
-#include "MTSLog.h"
-
-int main()
-{
-
-    SmartApp_Example smartApp;
-    Application1 app1(1);
-    Application2 app2(2);
-    smartApp.addApp(app1);
-    smartApp.addApp(app2);
-    smartApp.setSleepTime(30);
-    //smartApp.showAppMap();
-    smartApp.startRunning();
-
-    return 0;
-}
-
-
-void Application1::run(std::string payload)
-{
-    logInfo("In app 1 ", payload.c_str());
-    send("Test Packet");
-}
-
-void Application1::interrupt()
-{
-    logInfo("app1 interrupt");
-    send("Hello World");
-}
-
-uint8_t  SmartApp_Example::measuredBattery()
-{
-    return 90;
-}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project/src/main.cpp	Wed Oct 11 10:29:54 2017 +0000
@@ -0,0 +1,11 @@
+#include "MIUN.LoRa.h"
+
+int main()
+{
+    MIUN::LoRa lora;
+    if(lora.joinNetwork()==true)
+    {
+         lora.sendReceive("hello world!", 1, NULL); 
+    }
+    while(true);
+}
\ No newline at end of file