-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Description
In the ReadEvent method you don't return any time stamps:
public ReadEvent<T> Read<T>(string tag)
{
var nodesToRead = BuildReadValueIdCollection(tag, Attributes.Value);
DataValueCollection results;
DiagnosticInfoCollection diag;
_session.Read(
requestHeader: null,
maxAge: 0,
timestampsToReturn: TimestampsToReturn.Neither,
nodesToRead: nodesToRead,
results: out results,
diagnosticInfos: out diag);
var val = results[0];
var readEvent = new ReadEvent<T>();
readEvent.Value = (T)val.Value;
readEvent.SourceTimestamp = val.SourceTimestamp;
readEvent.ServerTimestamp = val.ServerTimestamp;
if (StatusCode.IsGood(val.StatusCode)) readEvent.Quality = Quality.Good;
if (StatusCode.IsBad(val.StatusCode)) readEvent.Quality = Quality.Bad;
return readEvent;
}
Can you change the code to:
public ReadEvent<T> Read<T>(string tag)
{
var nodesToRead = BuildReadValueIdCollection(tag, Attributes.Value);
DataValueCollection results;
DiagnosticInfoCollection diag;
_session.Read(
requestHeader: null,
maxAge: 0,
timestampsToReturn: TimestampsToReturn.Both,
nodesToRead: nodesToRead,
results: out results,
diagnosticInfos: out diag);
var val = results[0];
var readEvent = new ReadEvent<T>();
readEvent.Value = (T)val.Value;
readEvent.SourceTimestamp = val.SourceTimestamp;
readEvent.ServerTimestamp = val.ServerTimestamp;
if (StatusCode.IsGood(val.StatusCode)) readEvent.Quality = Quality.Good;
if (StatusCode.IsBad(val.StatusCode)) readEvent.Quality = Quality.Bad;
return readEvent;
}
So it returns the timestamps!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels