research application on sending data to headend

Dependencies:   DataStore JobScheduler NetworkServices W5500Interface nanopb protocol

See "main.cpp" documentation on "API Documentation" tab for details about application.

Revision:
7:c4123a87abe2
Parent:
4:b360d4f0bf34
Child:
9:d6a9210bfd41
--- a/source/main.cpp	Fri Jul 14 17:02:45 2017 +0000
+++ b/source/main.cpp	Fri Jul 14 22:02:28 2017 +0000
@@ -42,7 +42,8 @@
         exit(0);
     }
     
-    LceProxy lce(*nif);
+    const char* sn = "Nucleo1";
+    LceProxy lce(*nif, sn);
     
     JobScheduler::JobService js;   
     JobScheduler::Scheduler scheduler(&js);
@@ -57,9 +58,11 @@
     
     // inject test case
     time_t nowSecs = time(NULL);
+    // NOTE: don't schedule run once with at 0, because 0 means never.
     JobScheduler::Response<JobScheduler::JobID> res =
-        scheduler.JobAdd(1, new JobScheduler::RunOnceSchedule(nowSecs + 2), NULL);
-    res = scheduler.JobAdd(2, new JobScheduler::RunPeriodicSchedule(2, 5), NULL);
+        scheduler.JobAdd(2, new JobScheduler::RunOnceSchedule(1), NULL);
+        //scheduler.JobAdd(1, new JobScheduler::RunOnceSchedule(nowSecs + 2), NULL);
+    //res = scheduler.JobAdd(2, new JobScheduler::RunPeriodicSchedule(2, 5), NULL);
     
     // block forever unless there is a job that calls scheduler.Stop()
     scheduler.WaitToStop();