Login  •  Register


Client Set select clause

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

Client Set select clause

Postby tzeyang » 09 Jul 2019, 08:50

Hi,
I'm building an OPCUA Client program with sdk version 1.61.
I followed the tutorial lesson 6 example to select the event fields.

Below is the part of my code:

selectElement.setBrowsePathElement(0, UaQualifiedName("EventId", 0), 1);
eventFilter.setSelectClauseElement(0, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("EventType", 0), 1);
eventFilter.setSelectClauseElement(1, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("ReceiveTime", 0), 1);
eventFilter.setSelectClauseElement(2, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("Message", 0), 1);
eventFilter.setSelectClauseElement(3, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("SourceNode", 0), 1);
eventFilter.setSelectClauseElement(4, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("Severity", 0), 1);
eventFilter.setSelectClauseElement(5, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("SourceName", 0), 1);
eventFilter.setSelectClauseElement(6, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("Time", 0), 1);
eventFilter.setSelectClauseElement(7, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("LimitState", 0), 1);
eventFilter.setSelectClauseElement(8, selectElement, 10);
selectElement.setBrowsePathElement(0, UaQualifiedName("ActiveState", 0), 1);
eventFilter.setSelectClauseElement(9, selectElement, 10);

While I was not able to get any meaningful data from LimitState, all other fields worked.
What I wanted to get is actually the LimitState/CurrentState/Id.

My question is how to get that field? Isnt UaQualifiedName constructor expects a "Browse name" + namespace?
tzeyang
Jr. Member
Jr. Member
 
Posts: 1
Joined: 03 Dec 2018, 04:37

Return to C++ based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 0 guests

cron