|
|
@ -271,14 +271,26 @@ updateOrClone(MmsValue** valuePtr, MmsValue* values, int index)
|
|
|
|
static bool
|
|
|
|
static bool
|
|
|
|
private_ClientGooseControlBlock_updateValues(ClientGooseControlBlock self, MmsValue* values)
|
|
|
|
private_ClientGooseControlBlock_updateValues(ClientGooseControlBlock self, MmsValue* values)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int elementCount = MmsValue_getArraySize(values);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (elementCount > 5) {
|
|
|
|
updateOrClone(&(self->goEna), values, 0);
|
|
|
|
updateOrClone(&(self->goEna), values, 0);
|
|
|
|
updateOrClone(&(self->goID), values, 1);
|
|
|
|
updateOrClone(&(self->goID), values, 1);
|
|
|
|
updateOrClone(&(self->datSet), values, 2);
|
|
|
|
updateOrClone(&(self->datSet), values, 2);
|
|
|
|
updateOrClone(&(self->confRev), values, 3);
|
|
|
|
updateOrClone(&(self->confRev), values, 3);
|
|
|
|
updateOrClone(&(self->ndsCom), values, 4);
|
|
|
|
updateOrClone(&(self->ndsCom), values, 4);
|
|
|
|
updateOrClone(&(self->dstAddress), values, 5);
|
|
|
|
updateOrClone(&(self->dstAddress), values, 5);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (elementCount > 6)
|
|
|
|
updateOrClone(&(self->minTime), values, 6);
|
|
|
|
updateOrClone(&(self->minTime), values, 6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (elementCount > 7)
|
|
|
|
updateOrClone(&(self->maxTime), values, 7);
|
|
|
|
updateOrClone(&(self->maxTime), values, 7);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (elementCount > 8)
|
|
|
|
updateOrClone(&(self->fixedOffs), values, 8);
|
|
|
|
updateOrClone(&(self->fixedOffs), values, 8);
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
@ -346,12 +358,13 @@ IedConnection_getGoCBValues(IedConnection self, IedClientError* error, const cha
|
|
|
|
if (returnGoCB == NULL)
|
|
|
|
if (returnGoCB == NULL)
|
|
|
|
returnGoCB = ClientGooseControlBlock_create(goCBReference);
|
|
|
|
returnGoCB = ClientGooseControlBlock_create(goCBReference);
|
|
|
|
|
|
|
|
|
|
|
|
private_ClientGooseControlBlock_updateValues(returnGoCB, goCB);
|
|
|
|
if (private_ClientGooseControlBlock_updateValues(returnGoCB, goCB))
|
|
|
|
|
|
|
|
*error = IED_ERROR_OK;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
*error = IED_ERROR_UNEXPECTED_VALUE_RECEIVED;
|
|
|
|
|
|
|
|
|
|
|
|
MmsValue_delete(goCB);
|
|
|
|
MmsValue_delete(goCB);
|
|
|
|
|
|
|
|
|
|
|
|
*error = IED_ERROR_OK;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return returnGoCB;
|
|
|
|
return returnGoCB;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|