Table of Contents

Class StatusDataHelper

Namespace
Geotab.Checkmate.ObjectModel.Engine
Assembly
Geotab.Checkmate.ObjectModel.dll

Provides helper functions for StatusData.

public static class StatusDataHelper
Inheritance
StatusDataHelper
Inherited Members

Methods

GetStateRanges(IEnumerable<StatusData>, Id, int)

Evaluates a succession of StatusData points based on whether the data equals to predefined value.

public static IEnumerable<IDateRange> GetStateRanges(IEnumerable<StatusData> statusData, Id stateDiagnosticId, int stateValue)

Parameters

statusData IEnumerable<StatusData>

IEnumerable object of StatusData objects.

stateDiagnosticId Id

The diagnostic Id to filter the statusData collection.

stateValue int

The value to filter the statusData collection.

Returns

IEnumerable<IDateRange>

A list of DateRange where the logs data equals to stateValue parameter.

GetStateRangesAsync(IAsyncEnumerable<StatusData>, Id, int, CancellationToken)

Evaluates a succession of StatusData points based on whether the data equals to predefined value.

public static Task<IEnumerable<IDateRange>> GetStateRangesAsync(IAsyncEnumerable<StatusData> statusData, Id stateDiagnosticId, int stateValue, CancellationToken cancellationToken = default)

Parameters

statusData IAsyncEnumerable<StatusData>

IAsyncEnumerable object of StatusData objects.

stateDiagnosticId Id

The diagnostic Id to filter the statusData collection.

stateValue int

The value to filter the statusData collection.

cancellationToken CancellationToken

The CancellationToken

Returns

Task<IEnumerable<IDateRange>>

A list of DateRange where the logs data equals to stateValue parameter.