Avatar
Please consider registering
guest
sp_LogInOut Log Insp_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 RSSsp_TopicIcon
historyReadRaw - returns one entry too much?
March 20, 2026
12:15, EET
Avatar
rocket science
Member
Members
Forum Posts: 114
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Hi,

I’m just trying to read the history of the ‘Counter’ simulation value from the Simulation Server and recognized that when I call historyReadRaw with e.g. startDate 03/19/26 14:00:00.0000000 GMT and endData 03/19/26 14:05:00.0000000 GMT and returnBounds=false that I’m getting values from 14:00:01 to 14:05:00.

But as returnBounds was false, I expected values from 14:00:01 to 14:04:59

——————————————————————————————
historyReadRaw(): startDate: 03/19/26 14:00:00.0000000 GMT
historyReadRaw(): endDate : 03/19/26 14:05:00.0000000 GMT

historyReadAll: nodeId: ns=3;i=1001, indexRange: null, timestampsToReturn: Both, historyReadDetails: ReadRawModifiedDetails [IsReadModified=”false”, StartTime=”03/19/26 14:00:00.0000000 GMT”, EndTime=”03/19/26 14:05:00.0000000 GMT”, NumValuesPerNode=”0″, ReturnBounds=”false”]

historyReadAll: Got StatusCode: GOOD (0x00000000) “The operation succeeded.”
historyReadAll: Read complete, returning 300 values

historyReadRaw(): dataValue: DataValue(value=22, statusCode=GOOD (0x00000000) “The operation succeeded.”, sourceTimestamp=03/19/26 14:00:01.0000000 GMT, sourcePicoseconds=0, serverTimestamp=03/19/26 14:00:01.0000000 GMT, serverPicoseconds=0)

historyReadRaw(): dataValue: DataValue(value=11, statusCode=GOOD (0x00000000) “The operation succeeded.”, sourceTimestamp=03/19/26 14:05:00.0000000 GMT, sourcePicoseconds=0, serverTimestamp=03/19/26 14:05:00.0000000 GMT, serverPicoseconds=0)

——————————————————————————————

I tried the same with returnBounds = true, then I get 302 values from 14:00:00 to 14:05:01 – but I expected the last at 14:05:00

Is this normal or is it one entry too much?

Thank you!

March 20, 2026
12:38, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1058
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, you seem to be on the right track. We are returning samples a bit off. The specification says, that when returnBounds=false, we should return the first sample, even if it falls on startTime, but not the last sample that falls on endTime.

I think the idea is anyways, that with returnBounds=false, you will only get all samples without any interpolation at the bounds. But, you can ask for consecutive time ranges and still get all samples – even the ones that fall on the bounds, but only once.

So now it seems that we are doing the “right thing”, but returning the sample at the endTime instead of startTime.

Whereas, for returnBounds=true, the last sample seems to be too much, indeed.

We will need to check this out and see where the flaw is… Thanks for reporting.

March 20, 2026
14:12, EET
Avatar
rocket science
Member
Members
Forum Posts: 114
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Thanks for taking a look into it.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 37
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
otiliabanks, kasha94646158368, bridgetterandle, julietabernacchi, eulakilvington, DavidBS, fcbuycom, xyygeorgetta, srijithvijay, rudolfpigot8361
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1