Flying Sea Glider / Mbed 2 deprecated 2019_13sep_jcw_nosd

Dependencies:   mbed MODSERIAL FATFileSystem

Revision:
32:f2f8ae34aadc
Child:
34:9b66c5188051
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MbedLogger/MbedLogger.hpp	Wed Dec 20 13:52:50 2017 +0000
@@ -0,0 +1,41 @@
+#ifndef MBEDLOGGER_HPP
+#define MBEDLOGGER_HPP
+ 
+#include "mbed.h"
+#include <string>
+using namespace std;
+
+#include    "DirectoryList.h"
+  
+class MbedLogger {
+public:
+    MbedLogger();           //constructor
+    void createTestLog();   //test log function
+    
+    //one log file type for now
+    void createFile();
+    
+    //save float array to file (append each time)
+    void saveArrayToFile(float *input);
+    
+    //save the sequence title to file (append each time)
+    void saveSequenceStringToFile(string str_input);
+    
+    //print the data to the serial terminal
+    void printFromLogFile();
+    
+    //print the directory to the screen
+    void printMbedDirectory();
+    
+    //close the current file stream [before creating a new one]
+    void closeFile();
+        
+private:
+    int _f;                 //file name number
+    char _file_name[128];   //file name placeholder
+    int _file_number;
+    
+    FILE *_fp;              //the file is a class member variable
+};
+ 
+#endif
\ No newline at end of file