Table of Contents

Interface IPolledReadingsProvider

Namespace
Acuit.Pinpoint.IO.Testing
Assembly
Acuit.Pinpoint.IO.Testing.Abstractions.dll

A polled readings provider.

public interface IPolledReadingsProvider

Properties

ReadingDescriptors

Gets the collection of readings provided by this provider.

IReadingDescriptorCollection ReadingDescriptors { get; }

Property Value

IReadingDescriptorCollection

Methods

ReadValuesAsync(CancellationToken)

Reads the current values for all readings that this device provides.

Task<IReadingCollection> ReadValuesAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token that can request canceling the operation.

Returns

Task<IReadingCollection>

A task that represents the asynchronous operation. The value of its Result property contains the collection of reading values, which must contain an element for each reading in ReadingDescriptors.

Remarks

For devices that implement this, if a device must perform one-type initialization, it can either do it when this is called for the first time, or it could do it within IConnectedDevice.ConnectAsync.

Providers registered via RegisterPolledProvider(IPolledReadingsProvider) can assume that this will never be called before a previous call completes.

Exceptions

Exception

An error occurred reading the values.