Package nl.tno.imb.mc

Class ModelStarter

java.lang.Object
nl.tno.imb.mc.ModelStarter

public abstract class ModelStarter
extends Object
Model starter.
  • Field Details

  • Constructor Details

    • ModelStarter

      public ModelStarter​(String[] args, String providedModelName, int providedModelId) throws IMBException
      Create a new ModelStarter.
      Parameters:
      args - String[]; the command line arguments
      providedModelName - String; name of the model
      providedModelId - int; id of the model
      Throws:
      IMBException
  • Method Details

    • startModel

      public abstract void startModel​(ModelParameters parameters, TConnection imbConnection)
      Start the model.
      Parameters:
      parameters - ModelParameters; ModelParameters
      imbConnection - TConnection; connection to the IMB hub
    • stopModel

      public abstract void stopModel()
      Stop the model.
    • quitApplication

      public abstract void quitApplication()
      Kill the model; called before this application exits.
    • parameterRequest

      public abstract void parameterRequest​(ModelParameters parameters)
      The model must fill in its parameters.
      Parameters:
      parameters - ModelParameters; ModelParameters
    • doStartModel

      public void doStartModel​(ModelParameters parameters) throws IMBException
      Start a model.
      Parameters:
      parameters - ModelParameters; the parameters needed to start the model
      Throws:
      IMBException - ...
    • doStopModel

      public void doStopModel() throws IMBException
      Stop the model and go to idle state.
      Throws:
      IMBException - ...
    • doQuitApplication

      public void doQuitApplication()
      Terminate the application.
    • signalModelProgress

      public void signalModelProgress​(int currentProgress) throws IMBException
      Report a new progress value.
      Parameters:
      currentProgress - int; the new progress value
      Throws:
      IMBException
    • signalModelState

      public void signalModelState​(ModelState newState, String federation) throws IMBException
      Inform a federation about a state change.
      Parameters:
      newState - ModelState; the new state
      federation - String; the federation
      Throws:
      IMBException - ...
    • signalModelState

      public void signalModelState​(ModelState newState) throws IMBException
      Inform our federation about a state change.
      Parameters:
      newState - ModelState; the new state
      Throws:
      IMBException - ...
    • getRemotePort

      public int getRemotePort()
      Retrieve the remote port number.
      Returns:
      int; the remote port number
    • getRemoteHost

      public String getRemoteHost()
      Retrieve the remote host name.
      Returns:
      String; the name of the remote host