MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / read_raw_history

Method read_raw_history

opcua/common/node.py:491–512  ·  view source on GitHub ↗

Read raw history of a node result code from server is checked and an exception is raised in case of error If numvalues is > 0 and number of events in period is > numvalues then result will be truncated

(self, starttime=None, endtime=None, numvalues=0)

Source from the content-addressed store, hash-verified

489 return rpath
490
491 def read_raw_history(self, starttime=None, endtime=None, numvalues=0):
492 """
493 Read raw history of a node
494 result code from server is checked and an exception is raised in case of error
495 If numvalues is > 0 and number of events in period is > numvalues
496 then result will be truncated
497 """
498 details = ua.ReadRawModifiedDetails()
499 details.IsReadModified = False
500 if starttime:
501 details.StartTime = starttime
502 else:
503 details.StartTime = ua.get_win_epoch()
504 if endtime:
505 details.EndTime = endtime
506 else:
507 details.EndTime = ua.get_win_epoch()
508 details.NumValuesPerNode = numvalues
509 details.ReturnBounds = True
510 result = self.history_read(details)
511 result.StatusCode.check()
512 return result.HistoryData.DataValues
513
514 def history_read(self, details):
515 """

Calls 2

history_readMethod · 0.95
checkMethod · 0.80