Hi!
I want to have DialogConditionType instance in my OPC-UA server and use it to show dialogs for clients. Test client is UAExpert.
It is not clear for me what exactly should i do for this.
I've made next steps:
1) Created model design xml for model compiler
2) Created TestObjectType with instance of DialogConditionType and ShowDialog method
3) Created TestObject as instance of TestObjectType
4) Created TestNodeManager and loaded compiled uanodes file in it
5) override AddBehaviourToPredefinedNode method and set ShowDialog.OnCallMethod handler, Dialog.OnRespond method handler and some parameters for dialog as in samples
6) In ShowDialog.OnCallMethod i do next things:
Dialog.Message.Value = "The dialog was activated";
Dialog.Retain.Value = true;
Dialog.SetEnableState(context, true);// activate the dialog.
Dialog.Activate(context);
7) In UAExpert i made subscription to TestObject
And here i have problems. If i call ShowDialog before subscription then dialog shown only once after i made subscription. If i call ShowDialog after subscription then it has no effect. Also i can't show dialog second time in any case.
Maybe someone can give advice about what i'm doing wrong...
Best regards!
05/30/2017
The dialog is a state machine like any condition or alarm.
Clients depend on events being raised whenever there is a state change.
They also depend all active conditions getting returned in ConditionRefresh.
i.e. when UAExpect creates an event subscription it calls ConditionRefresh.
The server needs to return all conditions with Retain=true.
If your server is not returning the dialog state then UAExpert will not know about until the state changes again.
1 Guest(s)