FreeOpcUa / python-opcua

LGPL Pure Python OPC-UA Client and Server
http://freeopcua.github.io/
GNU Lesser General Public License v3.0
1.32k stars 661 forks source link

Fix history continuation point calculation. #1494

Closed alexander-travov closed 1 year ago

alexander-travov commented 1 year ago

I believe there is an off-by-one error in calculation of history continuation point.

Same as in https://github.com/FreeOpcUa/opcua-asyncio/pull/1131

For example, I have a var on server with history of values [0, 1, 2, 3, 4, 5]. When I read history of that variable in portions of maxlen=3 with the use of continuation point, I get: [0, 1, 2], [4, 5]. The value 3 is never returned.

With the fix I get: [0, 1, 2], [3, 4, 5] as expected.