Interface ITelemetryHistoryService
Connects to a server to retrieve TelemetryHistory.
Namespace: Unity.DigitalTwins.Live.Sdk.Services.Interfaces
Assembly: solution.dll
Syntax
public interface ITelemetryHistoryService
Methods
GetHistoryAsync(IEnumerable<String>, String, DateTimeOffset, DateTimeOffset, Int32)
Retrieves a list of TelemetryHistory objects asynchronously.
Declaration
Task<IEnumerable<TelemetryHistory>> GetHistoryAsync(IEnumerable<string> deviceIds, string telemetryKey, DateTimeOffset startTime, DateTimeOffset endTime, int stepResolutionInSeconds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | deviceIds | The list of targeted device IDs. |
| String | telemetryKey | The key value of the targeted telemetry. |
| DateTimeOffset | startTime | The start time of the telemetry. |
| DateTimeOffset | endTime | The end time of the telemetry. |
| Int32 | stepResolutionInSeconds | The intervals between each telemetry in seconds. |
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<TelemetryHistory>> |
GetTelemetryHistoryAsync(IEnumerable<String>, String, DateTimeOffset, DateTimeOffset, Int32)
Retrieves a list of resources containing details for requested telemetry histories.
Declaration
Task<Optional<IEnumerable<DeviceTelemetriesResource>>> GetTelemetryHistoryAsync(IEnumerable<string> deviceIds, string telemetryKey, DateTimeOffset startTime, DateTimeOffset endTime, int stepResolutionInSeconds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | deviceIds | The ID of the devices to query for telemetry history. |
| String | telemetryKey | The ID for the type of telemetry you want to retrieve. |
| DateTimeOffset | startTime | The earliest timestamp you want to include in the results. |
| DateTimeOffset | endTime | The latest timestamp you want to include in the results. |
| Int32 | stepResolutionInSeconds | How frequently you want to poll the telemetry history plot. |
Returns
| Type | Description |
|---|---|
| Task<Optional<IEnumerable<DeviceTelemetriesResource>>> | Returns a list of objects containing device telemetries that fit the provided parameters if successful. |
SubscribeToDeviceTelemetriesAsync(IEnumerable<String>)
Subscribes to multiple device telemetries.
Declaration
Task SubscribeToDeviceTelemetriesAsync(IEnumerable<string> deviceIds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | deviceIds | The list of targeted device IDs. |
Returns
| Type | Description |
|---|---|
| Task |
UnsubscribeFromDeviceTelemetriesAsync(IEnumerable<String>)
Unsubscribes from multiple device telemetries.
Declaration
Task UnsubscribeFromDeviceTelemetriesAsync(IEnumerable<string> deviceIds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | deviceIds | The list of targeted device IDs. |
Returns
| Type | Description |
|---|---|
| Task |