|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
/*
|
|
|
|
|
* logging.c
|
|
|
|
|
*
|
|
|
|
|
* Copyright 2016 Michael Zillgith
|
|
|
|
|
* Copyright 2016-2022 Michael Zillgith
|
|
|
|
|
*
|
|
|
|
|
* This file is part of libIEC61850.
|
|
|
|
|
*
|
|
|
|
@ -48,6 +48,7 @@ LogInstance_create(LogicalNode* parentLN, const char* name)
|
|
|
|
|
{
|
|
|
|
|
LogInstance* self = (LogInstance*) GLOBAL_MALLOC(sizeof(LogInstance));
|
|
|
|
|
|
|
|
|
|
if (self) {
|
|
|
|
|
self->name = StringUtils_copyString(name);
|
|
|
|
|
self->parentLN = parentLN;
|
|
|
|
|
self->logStorage = NULL;
|
|
|
|
@ -57,6 +58,7 @@ LogInstance_create(LogicalNode* parentLN, const char* name)
|
|
|
|
|
self->oldEntryTime = 0;
|
|
|
|
|
self->newEntryId = 0;
|
|
|
|
|
self->newEntryTime = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
@ -64,9 +66,11 @@ LogInstance_create(LogicalNode* parentLN, const char* name)
|
|
|
|
|
void
|
|
|
|
|
LogInstance_destroy(LogInstance* self)
|
|
|
|
|
{
|
|
|
|
|
if (self) {
|
|
|
|
|
GLOBAL_FREEMEM(self->name);
|
|
|
|
|
GLOBAL_FREEMEM(self);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
LogInstance_logSingleData(LogInstance* self, const char* dataRef, MmsValue* value, uint8_t flag)
|
|
|
|
@ -185,6 +189,7 @@ LogControl_create(LogicalNode* parentLN, MmsMapping* mmsMapping)
|
|
|
|
|
{
|
|
|
|
|
LogControl* self = (LogControl*) GLOBAL_MALLOC(sizeof(LogControl));
|
|
|
|
|
|
|
|
|
|
if (self) {
|
|
|
|
|
self->enabled = false;
|
|
|
|
|
self->dataSet = NULL;
|
|
|
|
|
self->isDynamicDataSet = false;
|
|
|
|
@ -196,6 +201,7 @@ LogControl_create(LogicalNode* parentLN, MmsMapping* mmsMapping)
|
|
|
|
|
self->intgPd = 0;
|
|
|
|
|
self->nextIntegrityScan = 0;
|
|
|
|
|
self->logRef = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
}
|
|
|
|
|