From 69e359b03fef852e780de69e61fe07310ed153dd Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Mon, 21 Sep 2020 15:43:52 +0200 Subject: [PATCH] - added new DataAttributeType value IEC61850_TYPE_UNKNOWN --- src/iec61850/inc/iec61850_model.h | 1 + src/iec61850/server/mms_mapping/control.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/iec61850/inc/iec61850_model.h b/src/iec61850/inc/iec61850_model.h index 18de227c..a57dc228 100644 --- a/src/iec61850/inc/iec61850_model.h +++ b/src/iec61850/inc/iec61850_model.h @@ -87,6 +87,7 @@ typedef struct sLogControlBlock LogControlBlock; typedef struct sLog Log; typedef enum { + IEC61850_UNKNOWN_TYPE = -1, IEC61850_BOOLEAN = 0,/* int */ IEC61850_INT8 = 1, /* int8_t */ IEC61850_INT16 = 2, /* int16_t */ diff --git a/src/iec61850/server/mms_mapping/control.c b/src/iec61850/server/mms_mapping/control.c index 68465ee0..66a4c6ad 100644 --- a/src/iec61850/server/mms_mapping/control.c +++ b/src/iec61850/server/mms_mapping/control.c @@ -979,9 +979,9 @@ ControlObject_initialize(ControlObject* self) char* daName = NULL; DataAttribute* da = NULL; - DataAttributeType ctlValType = -1; - DataAttributeType stValType = -1; - DataAttributeType mxValType = -1; + DataAttributeType ctlValType = IEC61850_UNKNOWN_TYPE; + DataAttributeType stValType = IEC61850_UNKNOWN_TYPE; + DataAttributeType mxValType = IEC61850_UNKNOWN_TYPE; daName = StringUtils_createStringInBuffer(strBuf, 6, self->mmsDomain->domainName, "/", self->lnName, ".", self->name, ".Oper.ctlVal"); da = (DataAttribute*) IedModel_getModelNodeByObjectReference(self->iedServer->model, daName);