- added Log data structure

pull/6/head
Michael Zillgith 9 years ago
parent 379c2ac445
commit fb49549f66

@ -84,6 +84,8 @@ typedef struct sSVControlBlock SVControlBlock;
typedef struct sLogControlBlock LogControlBlock; typedef struct sLogControlBlock LogControlBlock;
typedef struct sLog Log;
typedef enum { typedef enum {
IEC61850_BOOLEAN = 0,/* int */ IEC61850_BOOLEAN = 0,/* int */
IEC61850_INT8 = 1, /* int8_t */ IEC61850_INT8 = 1, /* int8_t */
@ -167,6 +169,8 @@ struct sIedModel {
GSEControlBlock* gseCBs; GSEControlBlock* gseCBs;
SVControlBlock* svCBs; SVControlBlock* svCBs;
SettingGroupControlBlock* sgcbs; SettingGroupControlBlock* sgcbs;
LogControlBlock* lcbs;
Log* logs;
void (*initializer) (void); void (*initializer) (void);
}; };
@ -268,6 +272,16 @@ struct sLogControlBlock {
uint8_t trgOps; /* TrgOps - trigger conditions */ uint8_t trgOps; /* TrgOps - trigger conditions */
uint8_t options; /* OptFlds */ uint8_t options; /* OptFlds */
uint32_t intPeriod; /* IntgPd - integrity period */ uint32_t intPeriod; /* IntgPd - integrity period */
LogControlBlock* sibling; /* next control block in list or NULL if this is the last entry */
};
struct sLog {
LogicalNode* parent;
char* name;
Log* sibling; /* next log instance in list or NULL if this is the last entry */
}; };
struct sSettingGroupControlBlock { struct sSettingGroupControlBlock {

@ -1,7 +1,7 @@
/* /*
* mms_mapping_internal.h * mms_mapping_internal.h
* *
* Copyright 2013, 2015 Michael Zillgith * Copyright 2013-2016 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
@ -35,6 +35,10 @@ struct sMmsMapping {
MmsServer mmsServer; MmsServer mmsServer;
LinkedList reportControls; LinkedList reportControls;
#if (CONFIG_IEC61850_LOG_SERVICE == 1)
LinkedList* logControls;
#endif
#if (CONFIG_INCLUDE_GOOSE_SUPPORT == 1) #if (CONFIG_INCLUDE_GOOSE_SUPPORT == 1)
LinkedList gseControls; LinkedList gseControls;
const char* gooseInterfaceId; const char* gooseInterfaceId;

@ -23,6 +23,7 @@
#include "libiec61850_platform_includes.h" #include "libiec61850_platform_includes.h"
#include "stack_config.h" #include "stack_config.h"
#include "mms_mapping.h"
#include "logging.h" #include "logging.h"

@ -1193,6 +1193,10 @@ MmsMapping_create(IedModel* model)
self->reportControls = LinkedList_create(); self->reportControls = LinkedList_create();
#endif #endif
#if (CONFIG_IEC61850_LOG_SERVICE == 1)
self->logControls = LinkedList_create();
#endif
#if (CONFIG_INCLUDE_GOOSE_SUPPORT == 1) #if (CONFIG_INCLUDE_GOOSE_SUPPORT == 1)
self->gseControls = LinkedList_create(); self->gseControls = LinkedList_create();
self->gooseInterfaceId = NULL; self->gooseInterfaceId = NULL;

@ -31,10 +31,10 @@
#include "simple_allocator.h" #include "simple_allocator.h"
#include "mem_alloc_linked_list.h" #include "mem_alloc_linked_list.h"
#include "stack_config.h"
#include "mms_mapping_internal.h" #include "mms_mapping_internal.h"
#include "mms_value_internal.h" #include "mms_value_internal.h"
#include "conversions.h" #include "conversions.h"
#include "reporting.h"
#include <string.h> #include <string.h>
#ifndef DEBUG_IED_SERVER #ifndef DEBUG_IED_SERVER

@ -21,7 +21,9 @@
* See COPYING file for the complete license text. * See COPYING file for the complete license text.
*/ */
#include "libiec61850_platform_includes.h"
#include "mms_device_model.h" #include "mms_device_model.h"
#include "mms_server_internal.h"
MmsJournal MmsJournal
MmsJournal_create(const char* name) MmsJournal_create(const char* name)

Loading…
Cancel
Save