def _history_read(uaNode, details, cont): valueid = ua.HistoryReadValueId() valueid.NodeId = uaNode.nodeid valueid.IndexRange = '' valueid.ContinuationPoint = cont params = ua.HistoryReadParameters() params.HistoryReadDetails = details params.TimestampsToReturn = ua.TimestampsToReturn.Both params.ReleaseContinuationPoints = False params.NodesToRead.append(valueid) result = uaNode.server.history_read(params)[0] return result
def history_read_events(self, details): """ Read event history of a node, low-level function result code from server is checked and an exception is raised in case of error """ valueid = ua.HistoryReadValueId() valueid.NodeId = self.nodeid valueid.IndexRange = '' params = ua.HistoryReadParameters() params.HistoryReadDetails = details params.TimestampsToReturn = ua.TimestampsToReturn.Both params.ReleaseContinuationPoints = False params.NodesToRead.append(valueid) result = self.server.history_read(params)[0] return result