Package nl.tno.imb.mc

Class Parameter

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

public class Parameter
extends Object
IMB model control parameter.

Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version Oct 14, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • Parameter

      public Parameter​(String name, double value)
      Construct a new float parameter.
      Parameters:
      name - String; name of the new float parameter
      value - double; value of the new float parameter
    • Parameter

      public Parameter​(String name, Boolean value)
      Construct a Boolean parameter.
      Parameters:
      name - String; the name of the new Boolean parameter
      value - Boolean; the value of the new Boolean parameter
    • Parameter

      public Parameter​(String name, int value)
      Construct a new integer parameter.
      Parameters:
      name - String; name of the new integer parameter
      value - int; value of the new integer parameter
    • Parameter

      public Parameter​(String name, String value)
      Construct a String parameter.
      Parameters:
      name - String; the name of the new String parameter
      value - String; the value of the new String parameter
    • Parameter

      public Parameter​(TByteBuffer payload) throws IMBException
      Construct a new Parameter from the next object in a TByteBuffer.
      Parameters:
      payload - TByteBuffer; the received IMB data
      Throws:
      IMBException - when the received type cannot be converted to a Parameter sub-type
  • Method Details

    • prepare

      public void prepare​(TByteBuffer payload)
      Prepare this parameter for transmission over IMB.
      Parameters:
      payload - TByteBuffer; the transmission buffer
    • qWrite

      public void qWrite​(TByteBuffer payload)
      Prepare this parameter for transmission over IMB.
      Parameters:
      payload - TByteBuffer; the transmission buffer
    • setValueList

      public void setValueList​(List<String> list)
      Set the list of pre-defined options that the user may choose from.
      Parameters:
      list - List<String>; the list of options
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
      Returns:
      name.
    • getValue

      public Object getValue()
      Returns:
      value.
    • getType

      public Parameter.ParameterType getType()
      Returns:
      type.
    • getValueList

      public List<String> getValueList()
      Returns:
      valueList.