Should calling HistoryReadRaw function with UNSPECIFIED EndTime return continuation points|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Should calling HistoryReadRaw function with UNSPECIFIED EndTime return continuation points
Avatar
Hua Zhang
Member
Members
Forum Posts: 4
Member Since:
07/19/2015
sp_UserOfflineSmall Offline
1
01/16/2017 - 01:25
sp_Permalink sp_Print

Hi,

Suppose we have values stored at 5:00, 5:02, 5:03, 5:05 and 5:06.

If we call HistoryReadRaw with parameters as following:

HistoryReadDetails = {

    StartTime: 5:00,

    EndTime:  UNSPECIFIED,

    NumValuesPerNode: 1,

    returnBounds: true

}

What ContinuationPoint.length of result should be? Greater than 0?

And I was confused when reading Compliance Test Tool's scripts.

In C:\PATH_OF_CTT\UA 1.02\Compliance Test Tool\ServerProjects\Standard\maintree\History\Historical Access Read Raw\Test Cases folder,

Case 014.js

if( CUVariables.Debug ) print( "
TEST 5: no endTime and 1 value per response
" );
haparams.HistoryReadDetails.EndTime = new UaDateTime();
haparams.HistoryReadDetails.StartTime = CUVariables.Items[0].FirstValueInHistory.SourceTimestamp;
haparams.HistoryReadDetails.NumValuesPerNode = 1;
for( var i=0; i<DATESKIP; i++ ) {
...
  if( Assert.True( HistoryReadHelper.Execute( haparams ), "HistoryRead() success expected." ) ) {
...
    if( i < DATESKIP ) if( !Assert.GreaterThan( 0, HistoryReadHelper.Response.Results[0].ContinuationPoint.length, "Wrong, no continuationPoint received.", "Correct, continuationPoint received." ) ) {
      result = false;
      break;
    }
  } else result = false;
}

Case 016.js

const NUMVALUESPERNODE = 5;
var haparams = {
NodesToRead: CUVariables.Items[0],
HistoryReadDetails: UaReadRawModifiedDetails.New(
  { IsReadModified: false,
    StartTime: CUVariables.Items[0].FirstValueInHistory.SourceTimestamp,
    EndTime: new UaDateTime(),
    NumValuesPerNode: NUMVALUESPERNODE,
    ReturnBounds: true } ),
TimestampsToReturn: TimestampsToReturn.Source,
ReleaseContinuationPoints: false,
Debug: CUVariables.Debug };

var result = true;

// start/end bounds are valid, one node per response, request bounds; read until EOF
if( Assert.True( HistoryReadHelper.Execute( haparams ), "HistoryRead() success expected." ) ) {
...
} else result = false;
if( !Assert.Equal( 0, HistoryReadHelper.Response.Results[0].ContinuationPoint.length, "Wrong, ContinuationPoint received when it should be the end of the record.", "Correct, ContinuationPoint not received." ) ) result = false;

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 112
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
2
01/16/2017 - 20:59
sp_Permalink sp_Print

Hi,

I did not dig into the test scripts, but I did ask nathan to look at them (he will report back on them).  the answer to what you should get back is simple -

for test case 14 - 1 value no continuation point. (start time matches the 5:00 value and numvalues = 1 - so just the value at 5:00 is returned.

for test case 16 - 5 values no continuation point (start time is 5:00 also and number of value is 5, data set has 5 values - all are returned)

Paul 

Paul Hunkar - DSInteroperability

Avatar
Hua Zhang
Member
Members
Forum Posts: 4
Member Since:
07/19/2015
sp_UserOfflineSmall Offline
3
01/17/2017 - 02:43
sp_Permalink sp_Print

I understand. Thanks a lot.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 36
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855