Class ReadingDataSource
A reading data source.
public class ReadingDataSource : IReadingDataSource, IDataSource
- Inheritance
-
ReadingDataSource
- Implements
- Inherited Members
Constructors
ReadingDataSource(IObservable<TimestampedReadingValue>, IReadingDescriptor)
Initializes a new instance of the ReadingDataSource class.
public ReadingDataSource(IObservable<TimestampedReadingValue> dataObservable, IReadingDescriptor descriptor)
Parameters
dataObservable
IObservable<TimestampedReadingValue>The IObservable<T> that produces data values.
descriptor
IReadingDescriptorThe reading descriptor.
Properties
DataObservable
Gets the IObservable<T> that produces data values.
public IObservable<TimestampedReadingValue> DataObservable { get; }
Property Value
Remarks
Subscriptions to reading observables will receive the last known reading value followed by any subsequent changes. Implementations can use System.Reactive.Subjects.BehaviorSubject<T> to produce this behavior.
A subscription to a reading observable will complete when the the source provider is unregistered.
Descriptor
Gets the reading descriptor.
public IReadingDescriptor Descriptor { get; }
Property Value
DisplayName
Gets the optional human-readable name of the data source (e.g., a reading name), or null if there is none.
public string DisplayName { get; }
Property Value
Remarks
This should be in title case (for example, "Gas Pressure").