Page 1 of 1

Condition ID in UaSubscriptionCallback::newEvents()

Posted: 09 Mar 2023, 09:11
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.

Re: Condition ID in UaSubscriptionCallback::newEvents()

Posted: 09 Mar 2023, 16:15
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);