Class DigitalTwinBase


  • public abstract class DigitalTwinBase
    extends java.lang.Object
    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

      Fields 
      Modifier and Type Field Description
      java.lang.String Id
      The identifier for this twin instance
      java.lang.String Model
      The model this twin instance belongs to.
      long NextSimulationTime
      Note: Simulation only.
      java.util.HashMap<java.lang.String,​TimerMetadata> TimerHandlers
      The timer handlers for this twin instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      DigitalTwinBase()
      Default constructor.
    • Method Summary

      Modifier and Type Method Description
      java.lang.String getId()
      The identifier of this DigitalTwin.
      java.lang.String getModel()
      The model for this DigitalTwin.
      long getNextSimulationTimeMs()
      Retrieve the next simulation time in milliseconds.
      void init​(InitContext context)
      Initialization method to set the identifier and model for a DigitalTwin instance.
      void setNextSimulationTime​(long nextSimulationTime)
      Set the next simulation time in milliseconds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Id

        public java.lang.String Id
        The identifier for this twin instance
      • Model

        public java.lang.String Model
        The model this twin instance belongs to.
      • TimerHandlers

        public java.util.HashMap<java.lang.String,​TimerMetadata> TimerHandlers
        The timer handlers for this twin instance.
    • Constructor Detail

      • DigitalTwinBase

        public DigitalTwinBase()
        Default constructor.
    • Method Detail

      • 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

        public java.lang.String getId()
        The identifier of this DigitalTwin.
        Returns:
        the identifier of this digital twin
      • getModel

        public java.lang.String getModel()
        The model for this DigitalTwin.
        Returns:
        the model for this DigitalTwin
      • init

        public void init​(InitContext context)
                  throws java.lang.IllegalStateException
        Initialization method to set the identifier and model for a DigitalTwin instance. Optionally use the InitContext to start a timer.
        Parameters:
        context - the initialization context.
        Throws:
        java.lang.IllegalStateException - if init is called after initialization.