- fixed ctlNum bug in client control implementation
This commit is contained in:
parent
ebe82435e8
commit
2f771f6e29
2 changed files with 12 additions and 3 deletions
|
@ -17,7 +17,7 @@
|
|||
#define DEBUG_COTP 0
|
||||
#define DEBUG_ISO_SERVER 0
|
||||
#define DEBUG_ISO_CLIENT 0
|
||||
#define DEBUG_IED_SERVER 1
|
||||
#define DEBUG_IED_SERVER 0
|
||||
#define DEBUG_IED_CLIENT 0
|
||||
#define DEBUG_MMS_CLIENT 0
|
||||
#define DEBUG_MMS_SERVER 0
|
||||
|
|
|
@ -371,7 +371,12 @@ ControlObjectClient_operate(ControlObjectClient self, MmsValue* ctlVal, uint64_t
|
|||
MmsValue* origin = createOriginValue(self);
|
||||
MmsValue_setElement(operParameters, index++, origin);
|
||||
|
||||
if (!((self->ctlModel == CONTROL_MODEL_SBO_NORMAL) ||
|
||||
(self->ctlModel == CONTROL_MODEL_SBO_ENHANCED)))
|
||||
{
|
||||
self->ctlNum++;
|
||||
}
|
||||
|
||||
MmsValue* ctlNum = MmsValue_newUnsignedFromUint32(self->ctlNum);
|
||||
MmsValue_setElement(operParameters, index++, ctlNum);
|
||||
|
||||
|
@ -471,7 +476,9 @@ ControlObjectClient_selectWithValue(ControlObjectClient self, MmsValue* ctlVal)
|
|||
MmsValue* origin = createOriginValue(self);
|
||||
MmsValue_setElement(selValParameters, index++, origin);
|
||||
|
||||
MmsValue* ctlNum = MmsValue_newUnsignedFromUint32(self->ctlNum + 1);
|
||||
self->ctlNum++;
|
||||
|
||||
MmsValue* ctlNum = MmsValue_newUnsignedFromUint32(self->ctlNum);
|
||||
MmsValue_setElement(selValParameters, index++, ctlNum);
|
||||
|
||||
|
||||
|
@ -536,6 +543,8 @@ ControlObjectClient_select(ControlObjectClient self)
|
|||
|
||||
bool selected = false;
|
||||
|
||||
self->ctlNum++;
|
||||
|
||||
if (value == NULL) {
|
||||
if (DEBUG_IED_CLIENT)
|
||||
printf("IED_CLIENT: select: read SBO failed!\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue