Class DigitalTwinBase
java.lang.Object
com.scaleoutsoftware.digitaltwin.core.DigitalTwinBase
A real-time digital twin of a data source. The implementation of the real-time DigitalTwin should have a parameterless constructor for
basic initialization.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe identifier for this twin instanceThe model this twin instance belongs to.longNote: Simulation only.The timer handlers for this twin instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()The identifier of this DigitalTwin.getModel()The model for this DigitalTwin.longRetrieve the next simulation time in milliseconds.voidinit(InitContext context) Initialization method to set the identifier and model for a DigitalTwin instance.voidsetNextSimulationTime(long nextSimulationTime) Set the next simulation time in milliseconds.
-
Field Details
-
Id
The identifier for this twin instance -
Model
The model this twin instance belongs to. -
TimerHandlers
The timer handlers for this twin instance. -
NextSimulationTime
public long NextSimulationTimeNote: Simulation only. The next time in milliseconds that this Digital Twin instance will be passed toSimulationProcessor.processModel(ProcessingContext, DigitalTwinBase, Date).
-
-
Constructor Details
-
DigitalTwinBase
public DigitalTwinBase()Default constructor.
-
-
Method Details
-
getNextSimulationTimeMs
public long getNextSimulationTimeMs()Retrieve the next simulation time in milliseconds.- Returns:
- the next simulation time in milliseconds.
-
setNextSimulationTime
public void setNextSimulationTime(long nextSimulationTime) Set the next simulation time in milliseconds.- Parameters:
nextSimulationTime- set the next simulation time.
-
getId
The identifier of this DigitalTwin.- Returns:
- the identifier of this digital twin
-
getModel
The model for this DigitalTwin.- Returns:
- the model for this DigitalTwin
-
init
Initialization method to set the identifier and model for a DigitalTwin instance. Optionally use theInitContextto start a timer.- Parameters:
context- the initialization context.- Throws:
IllegalStateException- if init is called after initialization.
-