- fixed problems in control service tracking

pull/266/head
Michael Zillgith 5 years ago
parent 00a821e67e
commit e4fcb923a0

@ -217,6 +217,9 @@ copyControlValuesToTrackingObject(MmsMapping* self, ControlObject* controlObject
case CST_INCTRK: case CST_INCTRK:
trkInst = self->incTrk; trkInst = self->incTrk;
break; break;
case CST_ENCTRK1:
trkInst = self->encTrk1;
break;
case CST_APCFTRK: case CST_APCFTRK:
trkInst = self->apcFTrk; trkInst = self->apcFTrk;
break; break;
@ -340,9 +343,39 @@ updateGenericTrackingObjectValues(MmsMapping* self, ControlObject* controlObject
ServiceTrkInstance trkInst = NULL; ServiceTrkInstance trkInst = NULL;
if (controlObject->ctlVal) { if (controlObject->ctlVal) {
if (MmsValue_getType(controlObject->ctlVal) == MMS_BOOLEAN) { switch(controlObject->cdc)
// assume SPC (could also be binary controller step position or analog control!!!) {
trkInst = (ServiceTrkInstance) self->spcTrk; case CST_SPCTRK:
trkInst = (ServiceTrkInstance) self->spcTrk;
break;
case CST_DPCTRK:
trkInst = (ServiceTrkInstance) self->dpcTrk;
break;
case CST_INCTRK:
trkInst = (ServiceTrkInstance) self->incTrk;
break;
case CST_ENCTRK1:
trkInst = (ServiceTrkInstance) self->encTrk1;
break;
case CST_APCFTRK:
trkInst = (ServiceTrkInstance) self->apcFTrk;
break;
case CST_APCINTTRK:
trkInst = (ServiceTrkInstance) self->apcIntTrk;
break;
case CST_BSCTRK:
trkInst = (ServiceTrkInstance) self->bscTrk;
break;
case CST_ISCTRK:
trkInst = (ServiceTrkInstance) self->iscTrk;
break;
case CST_BACTRK:
trkInst = (ServiceTrkInstance) self->bacTrk;
break;
default:
if (DEBUG_IED_SERVER)
printf("IED_SERVER: could not determine servicetracking type\n");
break;
} }
} }

@ -1311,7 +1311,7 @@ checkForServiceTrackingVariables(MmsMapping* self, LogicalNode* logicalNode)
if (!strcmp(modelNode->name, "SpcTrk")) if (!strcmp(modelNode->name, "SpcTrk"))
actInstance = &self->spcTrk; actInstance = &self->spcTrk;
else if (!strcmp(modelNode->name, "DpcTrk")) else if (!strcmp(modelNode->name, "DpcTrk"))
actInstance = &self->spcTrk; actInstance = &self->dpcTrk;
else if (!strcmp(modelNode->name, "IncTrk")) else if (!strcmp(modelNode->name, "IncTrk"))
actInstance = &self->incTrk; actInstance = &self->incTrk;
else if (!strcmp(modelNode->name, "EncTrk1")) else if (!strcmp(modelNode->name, "EncTrk1"))

Loading…
Cancel
Save