07/19/2015
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;
Moderators-Specifications
Moderators-Companion
Moderators-Implementation
Moderators-Certification
Moderators-COM
02/24/2014
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
1 Guest(s)