Interface IDatasetSampler
- Namespace
- Azure.Iot.Operations.Connector
- Assembly
- Azure.Iot.Operations.Connector.dll
An object used by a connector to periodically sample a dataset on an asset.
public interface IDatasetSampler
Methods
SampleDatasetAsync(Dataset, CancellationToken)
Sample the datapoints from the asset and return the full serialized dataset.
Task<byte[]> SampleDatasetAsync(Dataset dataset, CancellationToken cancellationToken = default)
Parameters
dataset
DatasetThe dataset of an asset to sample.
cancellationToken
CancellationTokenCancellation token.
Returns
Remarks
This method will be invoked by the PollingTelemetryConnectorWorker each time that a dataset needs to be sampled. The worker service will then forward the returned serialized payload to the MQTT broker.