Table of Contents

Interface IRoutineProvider<V>

Namespace
Cognite.Simulator.Utils
Assembly
Cognite.Simulator.Utils.dll

Interface for library that can provide routine configuration information

public interface IRoutineProvider<V>

Type Parameters

V

Configuration object type

Properties

RoutineRevisions

Dictionary of simulation routines. The key is the routine revision id

Dictionary<string, V> RoutineRevisions { get; }

Property Value

Dictionary<string, V>

Methods

GetRoutineRevision(string)

Get the simulation configuration object with the given property

Task<V> GetRoutineRevision(string routineRevisionExternalId)

Parameters

routineRevisionExternalId string

Simulator name

Returns

Task<V>

Simulation configuration state object

GetRunTasks(CancellationToken)

Get the tasks that are running in the library

IEnumerable<Task> GetRunTasks(CancellationToken token)

Parameters

token CancellationToken

Returns

IEnumerable<Task>

Init(CancellationToken)

Initializes the library

Task Init(CancellationToken token)

Parameters

token CancellationToken

Returns

Task

VerifyInMemoryCache(V, CancellationToken)

Verify that the routine revision exists in CDF. In case it does not, should remove from memory.

Task<bool> VerifyInMemoryCache(V config, CancellationToken token)

Parameters

config V

Configuration object

token CancellationToken

Cancellation token

Returns

Task<bool>

true in case the configuration exists in CDF, false otherwise