24 #ifndef LIBIEC61850_SRC_LOGGING_LOGGING_API_H_
25 #define LIBIEC61850_SRC_LOGGING_LOGGING_API_H_
31 #include "libiec61850_common_api.h"
62 typedef bool (*
LogEntryCallback) (
void* parameter, uint64_t timestamp, uint64_t entryID,
bool moreFollow);
76 typedef bool (*
LogEntryDataCallback) (
void* parameter,
const char* dataRef, uint8_t* data,
int dataSize, uint8_t reasonCode,
bool moreFollow);
84 uint64_t (*
addEntry) (LogStorage
self, uint64_t timestamp);
86 bool (*
addEntryData) (LogStorage
self, uint64_t entryID,
const char* dataRef, uint8_t* data,
int dataSize, uint8_t reasonCode);
88 bool (*
getEntries) (LogStorage
self, uint64_t startingTime, uint64_t endingTime,
91 bool (*
getEntriesAfter) (LogStorage
self, uint64_t startingTime, uint64_t entryID,
95 uint64_t* oldEntry, uint64_t* oldEntryTime);
128 LIB61850_API uint64_t
144 LogStorage_addEntryData(LogStorage
self, uint64_t entryID,
const char* dataRef, uint8_t* data,
int dataSize, uint8_t reasonCode);
195 uint64_t* oldEntry, uint64_t* oldEntryTime);
LIB61850_API 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.
LIB61850_API 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.
LIB61850_API void LogStorage_setMaxLogEntries(LogStorage self, int maxEntries)
Set the maximum number of log entries for this log.
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:62
LIB61850_API 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.
LIB61850_API uint64_t LogStorage_addEntry(LogStorage self, uint64_t timestamp)
Add an entry to the log.
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:76
LIB61850_API int LogStorage_getMaxLogEntries(LogStorage self)
Get the maximum allowed number of log entries for this log.
LIB61850_API 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.
LIB61850_API void LogStorage_destroy(LogStorage self)
Destroy the LogStorage instance and free all related resources.
Definition: logging_api.h:78
bool(* addEntryData)(LogStorage self, uint64_t entryID, const char *dataRef, uint8_t *data, int dataSize, uint8_t reasonCode)
Definition: logging_api.h:86
void * instanceData
Definition: logging_api.h:80
int maxLogEntries
Definition: logging_api.h:82
bool(* getEntries)(LogStorage self, uint64_t startingTime, uint64_t endingTime, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void *parameter)
Definition: logging_api.h:88
bool(* getOldestAndNewestEntries)(LogStorage self, uint64_t *newEntry, uint64_t *newEntryTime, uint64_t *oldEntry, uint64_t *oldEntryTime)
Definition: logging_api.h:94
void(* destroy)(LogStorage self)
Definition: logging_api.h:97
bool(* getEntriesAfter)(LogStorage self, uint64_t startingTime, uint64_t entryID, LogEntryCallback entryCallback, LogEntryDataCallback entryDataCallback, void *parameter)
Definition: logging_api.h:91
uint64_t(* addEntry)(LogStorage self, uint64_t timestamp)
Definition: logging_api.h:84