Condition ID in UaSubscriptionCallback::newEvents()

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

Moderator: uasdkcpp

Post Reply
ThomasZ
Sr. Member
Sr. Member
Posts: 12
Joined: 02 Mar 2023, 13:41

Condition ID in UaSubscriptionCallback::newEvents()

Post by ThomasZ »

Hi,
after updating from 1.6.5 to 1.7.7 my software is unable to get the ConditionID in UaSubscriptionCallback::newEvents() from the eventFieldList.

Up to 1.6.5 I was able to get it from the first entry in EventFields: eventFieldList[i].EventFields[0], but now this entry is always empty.
UaExpert is still able to show the Condition ID, so it must still be there.

Can you tell me how I can access the Condition ID in UaSubscriptionCallback::newEvents()?

The condition I'm sending, is a OpcUa::AcknowledgeableConditionType.

Thanks,
Thomas

Edit: I just tried version 1.7.0 and already in this version I'm not able to get the Condition ID from the eventFieldList.

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

Re: Condition ID in UaSubscriptionCallback::newEvents()

Post by Support Team »

Hello Thomas,

I assume there's some issue when you create the EventMonitoredItem in the part filling the SelectClause:

Please check the example coming with the SDK (client_cpp_sdk.cpp function -> subscribeAlarms)

Code: Select all

 
        // Select Condition NodeId
        // This is special - the path is empty and the requested Attribute is NodeId
        selectElement.setTypeId(UaNodeId(OpcUaId_ConditionType));
        selectElement.setAttributeId(OpcUa_Attributes_NodeId);
        selectElement.clearBrowsePath();
        eventFilter.setSelectClauseElement(14, selectElement, 15);
Best regards
Unified Automation Support Team

Post Reply