Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Need help in implementing AggregateFilter .
January 25, 2019
17:48, EEST
Avatar
dipankar.invi@gmail.com
Member
Members
Forum Posts: 10
Member Since:
December 6, 2018
sp_UserOfflineSmall Offline

Hi Experts,

Does Prosys supports aggregate filter ?
Could you please provide some example showing implementation of aggregate filter ?

Thanks in advance Smile

Regards,
Dipankar

January 28, 2019
15:07, EEST
Avatar
Teppo Uimonen
Moderator
Members

Moderators
Forum Posts: 14
Member Since:
November 28, 2018
sp_UserOfflineSmall Offline

Hi Dipankar,

Nice to hear that you found use for Aggregate Filters. Do you need an example for the Client or the Server side implementation?

Unfortunately, our Server side doesn’t support aggregate filters at the moment so that we cannot provide. However, the Client side does but of course requires a Server that supports them too.

We aim to add Server support and improve the Aggregate Filter situation in future releases Smile

January 31, 2019
12:58, EEST
Avatar
dipankar.invi@gmail.com
Member
Members
Forum Posts: 10
Member Since:
December 6, 2018
sp_UserOfflineSmall Offline

Hi Teppo,

Thanks for your response Smile
I want client side example .

January 31, 2019
16:51, EEST
Avatar
Teppo Uimonen
Moderator
Members

Moderators
Forum Posts: 14
Member Since:
November 28, 2018
sp_UserOfflineSmall Offline

Most importantly, you define the used Aggregate Function with class “Identifiers”. If you need average calculation, for example, you can create an AggregateFilter for a MonitoredDataItem as follows:

MonitoredDataItem dataItem = new MonitoredDataItem(nodeId, attributeId, MonitoringMode.Reporting, subscription.getPublishingInterval());
AggregateConfiguration configuration = new AggregateConfiguration();
AggregateFilter filter = new AggregateFilter(DateTime.currentTime(), Identifiers.AggregateFunction_Average, new Double(10000), configuration);
dataItem.setAggregateFilter(filter);

This sample will start calculating average values from now on every ten seconds. Again, I remind you that AggregateFilters in Subscription are rarely supported by OPC UA Servers. In this case you may need to use a regular Subscription and do the calculation in your own code.

If you, however, want to use an AggregateFilter for HistoryRead you need to use the historyReadProcessed function of UaClient:

DataValue[] values = client.historyReadProcessed(nodeId, startTime, endTime, processingInterval, Identifiers.AggregateFunction_Average,
aggregateConfiguration, indexRange, TimestampsToReturn.Source);
January 31, 2019
19:36, EEST
Avatar
dipankar.invi@gmail.com
Member
Members
Forum Posts: 10
Member Since:
December 6, 2018
sp_UserOfflineSmall Offline

Thanks for providing the sample code and suggestions.

February 1, 2019
7:10, EEST
Avatar
nisha.kale1122
New Member
Members
Forum Posts: 1
Member Since:
February 1, 2019
sp_UserOfflineSmall Offline

Excellent topic. Great answers by experts. It was helpful for me. Thank you.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 78

Currently Online:
7 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 89

pramanj: 86

ibrahim: 68

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 36

Rainer Versteeg: 32

vonGohren: 25

Member Stats:

Guest Posters: 0

Members: 815

Moderators: 11

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 841

Posts: 3556

Newest Members:

waldlatscher, keithwalmar, shanjaved, opcua-user, DmitryPervukhin, DPer, YeaTeshy, marttin, bouncycastlerentals, Sayan B

Moderators: Jouni Aro: 824, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 336, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 14

Administrators: admin: 0