1#include "../../Inc/Utils/Updateable.h"
2#include "../../Inc/Utils/Common.h"
15 updateable->
type = utype;
17 updateable->
child = child;
41 FILE* file = fopen(filename,
"w");
43 perror(
"Failed to open file");
47 printf(
"Writing data to file %s\n", filename);
#define ANSI_COLOR_YELLOW
int defaultEnable(struct Updateable *self)
Default enable function for Updateable objects.
int defaultDisable(struct Updateable *self)
Default disable function for Updateable objects.
int defaultUpdate(Updateable *self)
Default update function for Updateable objects.
void initUpdateable(Updateable *updateable, const char *name, int hz, UpdateableType utype, void *child)
int writeDataToFileImplementation(const char *filename, void *self)
Write data to a file.
int defaultStatus(struct Updateable *self)
Default status function for Updateable objects.
int(* disable)(struct Updateable *self)
int(* status)(struct Updateable *self)
int(* update)(struct Updateable *self)
char name[MAX_NAME_LENGTH]
int(* enable)(struct Updateable *self)