Interface ISimulatorClient<T, V>
Interface to be implemented by simulator integration clients that can
execute simulation configuration of the type V
public interface ISimulatorClient<T, V> where T : ModelStateBase where V : SimulatorRoutineRevision
Type Parameters
TType of the model state object
VType of the simulation configuration object
Methods
ExtractModelInformation(T, CancellationToken)
This method should open the model versions in the simulator, extract the required information and ingest it to CDF.
Task ExtractModelInformation(T state, CancellationToken _token)
Parameters
stateTModel file states
_tokenCancellationTokenCancellation token
Returns
GetConnectorVersion(CancellationToken)
Returns the connector version. This is reported periodically to CDF
string GetConnectorVersion(CancellationToken _token)
Parameters
_tokenCancellationToken
Returns
- string
Connector version
GetSimulatorVersion(CancellationToken)
Returns the version of the given simulator. The connector reads the version and report it back to CDF
string GetSimulatorVersion(CancellationToken _token)
Parameters
_tokenCancellationToken
Returns
- string
Version
RunSimulation(T, V, Dictionary<string, SimulatorValueItem>, CancellationToken)
Run a simulation by executing the routine passed as parameter with the given input data
Task<Dictionary<string, SimulatorValueItem>> RunSimulation(T modelState, V simulationConfiguration, Dictionary<string, SimulatorValueItem> inputData, CancellationToken token)
Parameters
modelStateTModel state object
simulationConfigurationVSimulation configuration object
inputDataDictionary<string, SimulatorValueItem>Input data
tokenCancellationTokenCancellation token
Returns
- Task<Dictionary<string, SimulatorValueItem>>
TestConnection(CancellationToken)
Tests the connection to the simulator.
Task TestConnection(CancellationToken token)
Parameters
tokenCancellationTokenCancellation token
Returns
- Task
A task representing the asynchronous operation