Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed MODSERIAL FATFileSystem
MbedLogger/MbedLogger.hpp
- Committer:
- tnhnrl
- Date:
- 2017-12-21
- Revision:
- 39:58375ca6b6ff
- Parent:
- 36:966a86937e17
File content as of revision 39:58375ca6b6ff:
#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 openFile();
//save float array to file (append each time)
void saveDataToFile(int input_state, float *input);
//print the directory to the screen
void printMbedDirectory();
//close the current file stream [before creating a new one]
void closeFile();
//print the current MBED log file
void printCurrentLogFile();
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