history data of slow data source

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

Moderator: uasdknet

Post Reply
Rolf Kistler
Jr. Member
Jr. Member
Posts: 3
Joined: 10 Sep 2020, 14:54

history data of slow data source

Post by Rolf Kistler »

Hello
I'm implementing an OPC UA server which provides historical data access.
Fetching history data is a slow process because data needs to be queried from a remote server.

There is very helpful code for reading and writing slow variables in the demo server (threadpool, queueing, callback).
Are there some code samples how to implement historical data access for slow variables, e.g. how to implement HistoryReadRaw and so on?

Regards

Rolf

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

Re: history data of slow data source

Post by Support Team »

Hello,

You can use the DemoServer as starting point. For slow history data sources the implementation can be analog to the implementation vor the variables with the slow data access.

Each method for the history services has two override. One taking one HistoryDataHandle as argument (this one is implemented in the DemoServer) and one talking the a list of HistoryDataOperationHandles. As is the example for the slow variables, the first method should return null. The other method should start the historical access in a separate thread whihch should call the Callback as in the example.
Best regards
Unified Automation Support Team

Rolf Kistler
Jr. Member
Jr. Member
Posts: 3
Joined: 10 Sep 2020, 14:54

Re: history data of slow data source

Post by Rolf Kistler »

Thanks for the response.

How do I return a continuation point with the HistoryReadDataCompleteEventHandler callback?
The result is of type HistoryReadResult and its ContinuationPoint property is of type byte[],
but continuation points are typically of type HistoryContinuationPoint.

Rolf

Post Reply