roneos
Operating System for the r-one robot
 All Data Structures Files Functions Variables Typedefs Groups
logger.h
1 /*
2  * logger.h
3  *
4  * Created on: Aug 3, 2012
5  * Author: Jeremy Hunt
6  */
7 
8 #ifndef LOGGER_H_
9 #define LOGGER_H_
10 
11 #define LOGGER_TASK_PRIORITY BACKGROUND_TASK_PRIORITY
12 
13 #define LOGGER_WRITE_BUFFER_SIZE 1024
14 #define LOGGER_PRINTF_TEXT_STRING_SIZE 256
15 
16 typedef struct {
17  char * filename;
18 } LoggerTaskParams;
19 
20 /* Results of Disk Functions */
21 typedef enum {
22  LOGGER_OK = 0, /* The function succeeded. */
23  LOGGER_NOINIT, /* The logger did not initialize correctly */
24  LOGGER_ERROR /* Any hard error occured during the write operation and could not recover it. */
25 } LoggerStatus;
26 
27 /* Function Prototypes */
28 LoggerStatus loggerInit(char * filename, uint32 writeBufferSize);
29 LoggerStatus loggerGetStatus(void);
30 LoggerStatus loggerPrintf(char * format, ...);
31 LoggerStatus loggerSync(void);
32 LoggerStatus loggerChangeFile(char * filename);
33 
34 
35 
36 #endif /* LOGGER_H_ */