- merge
This commit is contained in:
parent
ad89a0f26a
commit
3f1f6fd2fd
1 changed files with 9 additions and 13 deletions
|
@ -115,7 +115,7 @@ struct sControlObject
|
|||
};
|
||||
|
||||
void
|
||||
ControlObject_sendLastApplError(ControlObject* self, MmsServerConnection* connection, char* ctlVariable, int error,
|
||||
ControlObject_sendLastApplError(ControlObject* self, MmsServerConnection* connection, int error,
|
||||
ControlAddCause addCause, MmsValue* ctlNum, MmsValue* origin, bool handlerMode);
|
||||
|
||||
void
|
||||
|
@ -361,7 +361,7 @@ executeStateMachine:
|
|||
|
||||
if (dynamicCheckResult == CONTROL_RESULT_FAILED) {
|
||||
if (isTimeActivatedControl) {
|
||||
ControlObject_sendLastApplError(self, self->mmsConnection, "Oper",
|
||||
ControlObject_sendLastApplError(self, self->mmsConnection,
|
||||
CONTROL_ERROR_NO_ERROR, ADD_CAUSE_BLOCKED_BY_SYNCHROCHECK,
|
||||
self->ctlNum, self->origin, false);
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ Control_processControlActions(MmsMapping* self, uint64_t currentTimeInMs)
|
|||
executeControlTask(controlObject);
|
||||
}
|
||||
else {
|
||||
ControlObject_sendLastApplError(controlObject, controlObject->mmsConnection, "Oper",
|
||||
ControlObject_sendLastApplError(controlObject, controlObject->mmsConnection,
|
||||
CONTROL_ERROR_NO_ERROR, ADD_CAUSE_BLOCKED_BY_INTERLOCKING,
|
||||
controlObject->ctlNum, controlObject->origin, false);
|
||||
|
||||
|
@ -949,7 +949,7 @@ ControlObject_sendCommandTerminationNegative(ControlObject* self)
|
|||
|
||||
|
||||
void
|
||||
ControlObject_sendLastApplError(ControlObject* self, MmsServerConnection* connection, char* ctlVariable, int error,
|
||||
ControlObject_sendLastApplError(ControlObject* self, MmsServerConnection* connection, int error,
|
||||
ControlAddCause addCause, MmsValue* ctlNum, MmsValue* origin, bool handlerMode)
|
||||
{
|
||||
MmsValue lastApplErrorMemory;
|
||||
|
@ -962,13 +962,9 @@ ControlObject_sendLastApplError(ControlObject* self, MmsServerConnection* connec
|
|||
|
||||
lastApplError->value.structure.components =componentContainer;
|
||||
|
||||
char ctlObj[130];
|
||||
|
||||
createStringInBuffer(ctlObj, 3, self->ctlObjectName, "$", ctlVariable);
|
||||
|
||||
if (DEBUG_IED_SERVER) {
|
||||
printf("IED_SERVER: sendLastApplError:\n");
|
||||
printf("IED_SERVER: control object: %s\n", ctlObj);
|
||||
printf("IED_SERVER: control object: %s\n", self->ctlObjectName);
|
||||
printf("IED_SERVER: ctlNum: %u\n", MmsValue_toUint32(ctlNum));
|
||||
}
|
||||
|
||||
|
@ -976,8 +972,8 @@ ControlObject_sendLastApplError(ControlObject* self, MmsServerConnection* connec
|
|||
|
||||
MmsValue* ctlObjValue = &ctlObjValueMemory;
|
||||
ctlObjValue->type = MMS_VISIBLE_STRING;
|
||||
ctlObjValue->value.visibleString.buf = ctlObj;
|
||||
ctlObjValue->value.visibleString.size = sizeof(ctlObj);
|
||||
ctlObjValue->value.visibleString.buf = self->ctlObjectName;
|
||||
ctlObjValue->value.visibleString.size = sizeof(self->ctlObjectName);
|
||||
|
||||
MmsValue_setElement(lastApplError, 0, ctlObjValue);
|
||||
|
||||
|
@ -1313,10 +1309,10 @@ Control_writeAccessControlObject(MmsMapping* self, MmsDomain* domain, char* vari
|
|||
indication = DATA_ACCESS_ERROR_TEMPORARILY_UNAVAILABLE;
|
||||
|
||||
if (connection != controlObject->mmsConnection)
|
||||
ControlObject_sendLastApplError(controlObject, connection, "SBOw", 0,
|
||||
ControlObject_sendLastApplError(controlObject, connection, 0,
|
||||
ADD_CAUSE_LOCKED_BY_OTHER_CLIENT, ctlNum, origin, true);
|
||||
else
|
||||
ControlObject_sendLastApplError(controlObject, connection, "SBOw", 0,
|
||||
ControlObject_sendLastApplError(controlObject, connection, 0,
|
||||
ADD_CAUSE_OBJECT_ALREADY_SELECTED, ctlNum, origin, true);
|
||||
|
||||
if (DEBUG_IED_SERVER)
|
||||
|
|
Loading…
Add table
Reference in a new issue