Hello,
If one has used UaModeler to create an alarm, how to you get the alarm object from code? In all the samples I have found the alarm object is created in code.
Best regards
Get Alarm Object
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Get Alarm Object
Hello,
You can create the alarm object in the same way as shown in the example. For calling LinkModelToNode you need the NodeId of the alarm object node. This NodeId is specified in the XML file. If you are using the generated code, the NodeId of the node is specified in the file <ModelName>Identifiers.cs.
Best regards
Support Team
You can create the alarm object in the same way as shown in the example. For calling LinkModelToNode you need the NodeId of the alarm object node. This NodeId is specified in the XML file. If you are using the generated code, the NodeId of the node is specified in the file <ModelName>Identifiers.cs.
Best regards
Support Team
-
- Hero Member
- Posts: 48
- Joined: 30 Jan 2014, 11:05
Re: Get Alarm Object
Hello,
Ok, so creating an alarm in UAModeler and running the generated solution does not mean that there is an instance of an alarm class somewhere that you can access and modify? I have to create an alarm of a type matching that of the node and link that to the node using the LinkModelToNode method?
Best regards
Jonas
Ok, so creating an alarm in UAModeler and running the generated solution does not mean that there is an instance of an alarm class somewhere that you can access and modify? I have to create an alarm of a type matching that of the node and link that to the node using the LinkModelToNode method?
Best regards
Jonas
- Support Team
- Hero Member
- Posts: 3068
- Joined: 18 Mar 2011, 15:09
Re: Get Alarm Object
Hello Jonas,
Exactly. Importing the NodeSet XML file creates the nodes in address space. Connecting the nodes with real world data has to be done in code. This can be done by setting the NodeHandleType of a Variable to
- InternalPolled (implicitly when calling LinkModelToNode)
- ExternalPolled
- ExternalPush
Best regards
Support Team
Exactly. Importing the NodeSet XML file creates the nodes in address space. Connecting the nodes with real world data has to be done in code. This can be done by setting the NodeHandleType of a Variable to
- InternalPolled (implicitly when calling LinkModelToNode)
- ExternalPolled
- ExternalPush
Best regards
Support Team