Table of Contents

Class DefaultConnector<TAutomationConfig, TModelState, TModelStateBasePoco>

Namespace
Cognite.Simulator.Utils
Assembly
Cognite.Simulator.Utils.dll
public class DefaultConnector<TAutomationConfig, TModelState, TModelStateBasePoco> : ConnectorBase<DefaultConfig<TAutomationConfig>> where TAutomationConfig : AutomationConfig, new() where TModelState : ModelStateBase, new() where TModelStateBasePoco : ModelStateBasePoco

Type Parameters

TAutomationConfig
TModelState
TModelStateBasePoco
Inheritance
ConnectorBase<DefaultConfig<TAutomationConfig>>
DefaultConnector<TAutomationConfig, TModelState, TModelStateBasePoco>
Inherited Members

Constructors

DefaultConnector(CogniteDestination, DefaultConfig<TAutomationConfig>, DefaultModelLibrary<TAutomationConfig, TModelState, TModelStateBasePoco>, DefaultRoutineLibrary<TAutomationConfig>, DefaultSimulationRunner<TAutomationConfig, TModelState, TModelStateBasePoco>, DefaultSimulationScheduler<TAutomationConfig>, ExtractionPipeline, ILogger<DefaultConnector<TAutomationConfig, TModelState, TModelStateBasePoco>>, RemoteConfigManager<DefaultConfig<TAutomationConfig>>, ISimulatorClient<TModelState, SimulatorRoutineRevision>, ScopedRemoteApiSink)

public DefaultConnector(CogniteDestination cdf, DefaultConfig<TAutomationConfig> config, DefaultModelLibrary<TAutomationConfig, TModelState, TModelStateBasePoco> modelLibrary, DefaultRoutineLibrary<TAutomationConfig> routineLibrary, DefaultSimulationRunner<TAutomationConfig, TModelState, TModelStateBasePoco> runner, DefaultSimulationScheduler<TAutomationConfig> scheduler, ExtractionPipeline pipeline, ILogger<DefaultConnector<TAutomationConfig, TModelState, TModelStateBasePoco>> logger, RemoteConfigManager<DefaultConfig<TAutomationConfig>> remoteConfigManager, ISimulatorClient<TModelState, SimulatorRoutineRevision> simulatorClient, ScopedRemoteApiSink sink)

Parameters

cdf CogniteDestination
config DefaultConfig<TAutomationConfig>
modelLibrary DefaultModelLibrary<TAutomationConfig, TModelState, TModelStateBasePoco>
routineLibrary DefaultRoutineLibrary<TAutomationConfig>
runner DefaultSimulationRunner<TAutomationConfig, TModelState, TModelStateBasePoco>
scheduler DefaultSimulationScheduler<TAutomationConfig>
pipeline ExtractionPipeline
logger ILogger<DefaultConnector<TAutomationConfig, TModelState, TModelStateBasePoco>>
remoteConfigManager RemoteConfigManager<DefaultConfig<TAutomationConfig>>
simulatorClient ISimulatorClient<TModelState, SimulatorRoutineRevision>
sink ScopedRemoteApiSink

Methods

GetConnectorVersion()

Returns the connector version. This is reported periodically to CDF

public override string GetConnectorVersion()

Returns

string

Connector version

GetSimulatorVersion(string)

Returns the version of the given simulator. The connector reads the version and report it back to CDF

public override string GetSimulatorVersion(string simulator)

Parameters

simulator string

Name of the simulator

Returns

string

Version

Init(CancellationToken)

Initialize the connector. Should include any initialization tasks to be performed before the connector loop. This should include a call to InitRemoteSimulatorIntegrations(CancellationToken)

public override Task Init(CancellationToken token)

Parameters

token CancellationToken

Cancellation token

Returns

Task

Run(CancellationToken)

Run the main loop of the connector

public override Task Run(CancellationToken token)

Parameters

token CancellationToken

Returns

Task