No update in UA Expert after node.Write(Attributes.Value,...

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

Moderator: uasdknet

Post Reply
thomas-jung
Jr. Member
Jr. Member
Posts: 3
Joined: 20 May 2015, 09:32

No update in UA Expert after node.Write(Attributes.Value,...

Post by thomas-jung »

Built a little server close to the Tutorials Parts 1 ... 3.

During startup the configuration of the variable node is set by:
SetVariableConfiguration(nidVariableCount, NodeHandleType.Internal, "MyCounter");

After the server started up, a timer is started which triggers following method:

private void timerElapsed(object sender, System.Timers.ElapsedEventArgs e)
{
Node n = this.FindInMemoryNode(nidVariableCount) ;

if (n != null)
{
n.Write(Attributes.Value, counter++);
}
}


The node seems to be found correctly, i can identify it by some userdata i added to it during startup. Also the attribute is actually updated as i can see the changing value in the debugger. My problem is: In the UA Expert i cannot see any change of the attribute value, it stays 0, no matter how often i trigger th refresh button. What is my mistake?

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

Re: No update in UA Expert after node.Write(Attributes.Value

Post by Support Team »

Hello,

The Node.Write method does not report the DataChanges implicitly. You have to call ReportChanges manually after each value-update:

NodeAttributeHandle handle;
GetNodeHandle(Server.DefaultRequestContext, nidVariableCount, Attributes.Value, out handle);
ReportDataChanges(Server.DefaultRequestContext, handle);

Best regards
Support Team

Post Reply