24 #ifndef LIBIEC61850_SRC_LOGGING_LOGGING_API_H_ 25 #define LIBIEC61850_SRC_LOGGING_LOGGING_API_H_ 63 typedef bool (*
LogEntryCallback) (
void* parameter, uint64_t timestamp, uint64_t entryID,
bool moreFollow);
77 typedef bool (*
LogEntryDataCallback) (
void* parameter,
const char* dataRef, uint8_t* data,
int dataSize, uint8_t reasonCode,
bool moreFollow);
85 uint64_t (*
addEntry) (LogStorage
self, uint64_t timestamp);
87 bool (*
addEntryData) (LogStorage
self, uint64_t entryID,
const char* dataRef, uint8_t* data,
int dataSize, uint8_t reasonCode);
89 bool (*
getEntries) (LogStorage
self, uint64_t startingTime, uint64_t endingTime,
92 bool (*
getEntriesAfter) (LogStorage
self, uint64_t startingTime, uint64_t entryID,
96 uint64_t* oldEntry, uint64_t* oldEntryTime);
135 LogStorage_addEntryData(LogStorage
self, uint64_t entryID,
const char* dataRef, uint8_t* data,
int dataSize, uint8_t reasonCode);
186 uint64_t* oldEntry, uint64_t* oldEntryTime);
void LogStorage_setMaxLogEntries(LogStorage self, int maxEntries)
Set the maximum number of log entries for this log.
bool LogStorage_getEntries(LogStorage self, uint64_t startingTime, uint64_t endingTime, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void *parameter)
Get log entries specified by a time range.
void LogStorage_destroy(LogStorage self)
Destroy the LogStorage instance and free all related resources.
uint64_t LogStorage_addEntry(LogStorage self, uint64_t timestamp)
Add an entry to the log.
bool(* getEntriesAfter)(LogStorage self, uint64_t startingTime, uint64_t entryID, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void *parameter)
Definition: logging_api.h:92
void(* destroy)(LogStorage self)
Definition: logging_api.h:98
Definition: logging_api.h:79
void * instanceData
Definition: logging_api.h:81
bool(* getOldestAndNewestEntries)(LogStorage self, uint64_t *newEntry, uint64_t *newEntryTime, uint64_t *oldEntry, uint64_t *oldEntryTime)
Definition: logging_api.h:95
int maxLogEntries
Definition: logging_api.h:83
bool LogStorage_addEntryData(LogStorage self, uint64_t entryID, const char *dataRef, uint8_t *data, int dataSize, uint8_t reasonCode)
Add new entry data to an existing log entry.
bool(* addEntryData)(LogStorage self, uint64_t entryID, const char *dataRef, uint8_t *data, int dataSize, uint8_t reasonCode)
Definition: logging_api.h:87
uint64_t(* addEntry)(LogStorage self, uint64_t timestamp)
Definition: logging_api.h:85
bool LogStorage_getEntriesAfter(LogStorage self, uint64_t startingTime, uint64_t entryID, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void *parameter)
Get log entries specified by a start log entry.
bool(* LogEntryCallback)(void *parameter, uint64_t timestamp, uint64_t entryID, bool moreFollow)
Will be called for each new LogEntry by the getEntries and getEntriesAfter functions.
Definition: logging_api.h:63
bool(* getEntries)(LogStorage self, uint64_t startingTime, uint64_t endingTime, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void *parameter)
Definition: logging_api.h:89
bool(* LogEntryDataCallback)(void *parameter, const char *dataRef, uint8_t *data, int dataSize, uint8_t reasonCode, bool moreFollow)
Will be called for each new LogEntryData by the getEntries and getEntriesAfter functions.
Definition: logging_api.h:77
bool LogStorage_getOldestAndNewestEntries(LogStorage self, uint64_t *newEntry, uint64_t *newEntryTime, uint64_t *oldEntry, uint64_t *oldEntryTime)
Get the entry time and entryID of the oldest and the newest log entries.