NotifierParent
Posted: 13 Jun 2019, 15:12
Hello,
I've got some problems in monitoring events with the UaExpert Client.
I modeled Objects with the UaModeler and generated the code.
Normally I create Objects manually by code with the CreateObjectSetting, where it is possible to set the NotifierParent like this:
with this object I have no problems in monitoring events.
But when I try to monitor the UaModeler created Object I can not monitor the events. In the modeler I set the EventNotifier of the specific Object to 1 (EventNotifierSubscribeToEvents), but it is not possible to set the NotfierParent for this Object.
Do you have any example code how to set the NotifierParent to an existing / UaModeler created Object? (Do I have to add it in the XML file?)
Or is there anything else what I can do?
Thank you in advanced.
I've got some problems in monitoring events with the UaExpert Client.
I modeled Objects with the UaModeler and generated the code.
Normally I create Objects manually by code with the CreateObjectSetting, where it is possible to set the NotifierParent like this:
Code: Select all
CreateObjectSettings settings = new CreateObjectSettings()
{
ParentNodeId = new NodeId(1000, InstanceNamespaceIndex),
ReferenceTypeId = UnifiedAutomation.UaBase.ReferenceTypeIds.Organizes,
RequestedNodeId = new NodeId("CNC", DefaultNamespaceIndex),
BrowseName = new QualifiedName("CNC", InstanceNamespaceIndex),
TypeDefinitionId = new NodeId(ObjectTypes.MachineToolType, TypeNamespaceIndex),
// need to create a notifier hierarchy for events to propagate.
[b]NotifierParent = UnifiedAutomation.UaBase.ObjectIds.Server,[/b]
EventNotifier = UnifiedAutomation.UaBase.EventNotifiers.SubscribeToEvents, //
};
ObjectNode InterNode = CreateObject(Server.DefaultRequestContext, settings);
But when I try to monitor the UaModeler created Object I can not monitor the events. In the modeler I set the EventNotifier of the specific Object to 1 (EventNotifierSubscribeToEvents), but it is not possible to set the NotfierParent for this Object.
Do you have any example code how to set the NotifierParent to an existing / UaModeler created Object? (Do I have to add it in the XML file?)
Or is there anything else what I can do?
Thank you in advanced.