Get Alarm Object

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
JonLor
Hero Member
Hero Member
Posts: 48
Joined: 30 Jan 2014, 11:05

Get Alarm Object

Post by JonLor »

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

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Get Alarm Object

Post by Support Team »

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

JonLor
Hero Member
Hero Member
Posts: 48
Joined: 30 Jan 2014, 11:05

Re: Get Alarm Object

Post by JonLor »

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

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Get Alarm Object

Post by Support Team »

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

Post Reply