Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
14:cc916fa8dd11
Parent:
13:c80c283f9db2
Child:
17:dfa2c53b3f38
Child:
19:9bc8fabeddfa
--- a/src/ConfigurationHandler/Controls/SetpointControl.cpp	Wed Sep 07 13:52:25 2016 +0000
+++ b/src/ConfigurationHandler/Controls/SetpointControl.cpp	Wed Sep 07 14:51:00 2016 +0000
@@ -1,6 +1,31 @@
+/******************************************************************************
+ *
+ * File:                SetpointControl.c
+ * Desciption:          ICE Timer Control Class implementation 
+ *
+ *****************************************************************************/
 #include "SetpointControl.h"
+#include "mDot.h"
 
+extern mDot *GLOBAL_mdot;
+
+/*****************************************************************************
+ * Function:            SetpointControl()
+ * Description:         Setpoint control constructor
+ *
+ * @param               filename (unused)
+ * @return              none
+ *****************************************************************************/
 SetpointControl::SetpointControl(string filename) : controlFile(filename)
 {
-    printf("\r%s invoked with control file %s\n", __func__, controlFile.c_str());
-}
+    // attempt to open the control file (established by the data handlers)
+    printf("\r%s: opening control file %s\n", __func__, controlFile.c_str());
+    mDot::mdot_file file = GLOBAL_mdot->openUserFile(controlFile.c_str(), mDot::FM_RDONLY);
+    
+    printf("\r %s: file.fd = %d\n", __func__, file.fd); 
+    
+    // use the jSON parser to extract the data
+        
+    // close the file
+    GLOBAL_mdot->closeUserFile(file);
+}
\ No newline at end of file