|
|
@ -882,7 +882,7 @@ IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError*
|
|
|
|
|
|
|
|
|
|
|
|
if ((domainId == NULL) || (itemId == NULL)) {
|
|
|
|
if ((domainId == NULL) || (itemId == NULL)) {
|
|
|
|
*error = IED_ERROR_OBJECT_REFERENCE_INVALID;
|
|
|
|
*error = IED_ERROR_OBJECT_REFERENCE_INVALID;
|
|
|
|
goto cleanup_and_exit;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
IedConnectionOutstandingCall call = iedConnection_allocateOutstandingCall(self);
|
|
|
|
IedConnectionOutstandingCall call = iedConnection_allocateOutstandingCall(self);
|
|
|
@ -904,8 +904,6 @@ IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError*
|
|
|
|
if (err != MMS_ERROR_NONE)
|
|
|
|
if (err != MMS_ERROR_NONE)
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
|
|
|
|
|
|
|
|
|
cleanup_and_exit:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return invokeId;
|
|
|
|
return invokeId;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1419,6 +1417,8 @@ IedConnection_writeObject(IedConnection self, IedClientError* error, const char*
|
|
|
|
*brace = 0;
|
|
|
|
*brace = 0;
|
|
|
|
|
|
|
|
|
|
|
|
MmsConnection_writeSingleArrayElementWithComponent(self->connection, &mmsError, domainId, itemId, index, component, value);
|
|
|
|
MmsConnection_writeSingleArrayElementWithComponent(self->connection, &mmsError, domainId, itemId, index, component, value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(mmsError);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
@ -1426,10 +1426,11 @@ IedConnection_writeObject(IedConnection self, IedClientError* error, const char*
|
|
|
|
else
|
|
|
|
else
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
MmsConnection_writeVariable(self->connection, &mmsError, domainId, itemId, value);
|
|
|
|
MmsConnection_writeVariable(self->connection, &mmsError, domainId, itemId, value);
|
|
|
|
|
|
|
|
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(mmsError);
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(mmsError);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
static void
|
|
|
@ -1489,7 +1490,7 @@ IedConnection_writeObjectAsync(IedConnection self, IedClientError* error, const
|
|
|
|
call->callbackParameter = parameter;
|
|
|
|
call->callbackParameter = parameter;
|
|
|
|
call->invokeId = 0;
|
|
|
|
call->invokeId = 0;
|
|
|
|
|
|
|
|
|
|
|
|
MmsError err = MMS_ERROR_NONE;
|
|
|
|
MmsError err;
|
|
|
|
|
|
|
|
|
|
|
|
/* check if item ID contains an array "(..)" */
|
|
|
|
/* check if item ID contains an array "(..)" */
|
|
|
|
char* brace = strchr(itemId, '(');
|
|
|
|
char* brace = strchr(itemId, '(');
|
|
|
@ -1512,6 +1513,8 @@ IedConnection_writeObjectAsync(IedConnection self, IedClientError* error, const
|
|
|
|
|
|
|
|
|
|
|
|
call->invokeId = MmsConnection_writeSingleArrayElementWithComponentAsync(self->connection, &err, domainId, itemId, index, component, value,
|
|
|
|
call->invokeId = MmsConnection_writeSingleArrayElementWithComponentAsync(self->connection, &err, domainId, itemId, index, component, value,
|
|
|
|
writeVariableHandler, self);
|
|
|
|
writeVariableHandler, self);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
@ -1519,12 +1522,13 @@ IedConnection_writeObjectAsync(IedConnection self, IedClientError* error, const
|
|
|
|
else
|
|
|
|
else
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
|
*error = IED_ERROR_USER_PROVIDED_INVALID_ARGUMENT;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else {
|
|
|
|
call->invokeId = MmsConnection_writeVariableAsync(self->connection, &err, domainId, itemId, value, writeVariableHandler, self);
|
|
|
|
call->invokeId = MmsConnection_writeVariableAsync(self->connection, &err, domainId, itemId, value, writeVariableHandler, self);
|
|
|
|
|
|
|
|
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(err);
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (err != MMS_ERROR_NONE) {
|
|
|
|
if (*error != IED_ERROR_OK) {
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -3282,8 +3286,6 @@ IedConnection_readDataSetValuesAsync(IedConnection self, IedClientError* error,
|
|
|
|
const char* domainId = NULL;
|
|
|
|
const char* domainId = NULL;
|
|
|
|
const char* itemId = NULL;
|
|
|
|
const char* itemId = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
*error = IED_ERROR_OK;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isAssociationSpecific = false;
|
|
|
|
bool isAssociationSpecific = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (dataSetReference[0] != '@') {
|
|
|
|
if (dataSetReference[0] != '@') {
|
|
|
@ -3322,7 +3324,6 @@ IedConnection_readDataSetValuesAsync(IedConnection self, IedClientError* error,
|
|
|
|
isAssociationSpecific = true;
|
|
|
|
isAssociationSpecific = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IedConnectionOutstandingCall call = iedConnection_allocateOutstandingCall(self);
|
|
|
|
IedConnectionOutstandingCall call = iedConnection_allocateOutstandingCall(self);
|
|
|
|
|
|
|
|
|
|
|
|
if (call == NULL) {
|
|
|
|
if (call == NULL) {
|
|
|
@ -3348,11 +3349,10 @@ IedConnection_readDataSetValuesAsync(IedConnection self, IedClientError* error,
|
|
|
|
call->invokeId = MmsConnection_readNamedVariableListValuesAsync(self->connection, &err,
|
|
|
|
call->invokeId = MmsConnection_readNamedVariableListValuesAsync(self->connection, &err,
|
|
|
|
domainId, itemId, true, getDataSetHandlerInternal, self);
|
|
|
|
domainId, itemId, true, getDataSetHandlerInternal, self);
|
|
|
|
|
|
|
|
|
|
|
|
if ((err != MMS_ERROR_NONE) || (*error != IED_ERROR_OK)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err != MMS_ERROR_NONE)
|
|
|
|
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(err);
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(err);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err != MMS_ERROR_NONE) {
|
|
|
|
|
|
|
|
|
|
|
|
GLOBAL_FREEMEM(call->specificParameter2.pointer);
|
|
|
|
GLOBAL_FREEMEM(call->specificParameter2.pointer);
|
|
|
|
|
|
|
|
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
@ -3504,11 +3504,9 @@ IedConnection_writeDataSetValuesAsync(IedConnection self, IedClientError* error,
|
|
|
|
|
|
|
|
|
|
|
|
call->invokeId = MmsConnection_writeNamedVariableListAsync(self->connection, &err, isAssociationSpecific, domainId, itemId, values, writeDataSetHandlerInternal, self);
|
|
|
|
call->invokeId = MmsConnection_writeNamedVariableListAsync(self->connection, &err, isAssociationSpecific, domainId, itemId, values, writeDataSetHandlerInternal, self);
|
|
|
|
|
|
|
|
|
|
|
|
if ((err != MMS_ERROR_NONE) || (*error != IED_ERROR_OK)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err != MMS_ERROR_NONE)
|
|
|
|
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(err);
|
|
|
|
*error = iedConnection_mapMmsErrorToIedError(err);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (err != MMS_ERROR_NONE) {
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
|
iedConnection_releaseOutstandingCall(self, call);
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|