Page 1 of 1
Data Change Filters
Posted: 27 Jul 2021, 16:48
by MAJS
When I search through the documentation for the C++ SDK, I find no coverage of Data Change Filters. When I search through the header files, I do find a class OpcUa_DataChangeFilter.
Does the C++ SDK support Data Change Filters?
Re: Data Change Filters
Posted: 22 Sep 2021, 13:14
by uasdkcpp
Hello MAJS,
Yes, the CPP SDK supports the Data Change Filters.
You can find the snippet of code for the creation of data change filter in demo client example
// Sample code for creation of data change filter
OpcUa_DataChangeFilter* pDataChangeFilter = NULL;
OpcUa_EncodeableObject_CreateExtension(
&OpcUa_DataChangeFilter_EncodeableType,
&monitoredItemCreateRequests.RequestedParameters.Filter,
(OpcUa_Void**)&pDataChangeFilter);
if ( pDataChangeFilter )
{
// Deadband setting
pDataChangeFilter->DeadbandType = OpcUa_DeadbandType_Absolute;
pDataChangeFilter->DeadbandValue = 0.1; // 0.1% of last value
// Trigger setting (default is StatusValue)
pDataChangeFilter->Trigger = OpcUa_DataChangeTrigger_StatusValue;
}