Class FMICapabilities

  • Direct Known Subclasses:
    FMI20CoSimulationCapabilities, FMI20ModelExchangeCapabilities, FMICoSimulationCapabilities

    public class FMICapabilities
    extends java.lang.Object
    An object that represents the the capabilities of a FMI co-simulation slave.

    A Functional Mock-up Unit file is a .fmu file in zip format that contains a .xml file named "modelDescription.xml". In FMI-1.0, the xml file may optionally contain a "Implementation" element that will contain either a "CoSimulation_Standalone" element or a "CoSimulation_Tool" element. Those two elements will contain a "Capabilities" element that has attributes that define the capabilities of the slave. This class has public fields that correspond to the attributes of the "Capabilities" element. The name of this class is taken from the FMI specification.

    FMI documentation may be found at http://www.modelisar.com/fmi.html.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$, $Id$
    Author:
    Christopher Brooks
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Constructor Summary

      Constructors 
      Constructor Description
      FMICapabilities()
      Create an empty Capability.
      FMICapabilities​(org.w3c.dom.Element element)
      Create a FMICoSimulationCapability from an XML Element.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getBoolean​(java.lang.String fieldName)
      Get the value of a boolean field.
      java.lang.String toString()
      Return a description of the fields that are true or non-zero.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FMICapabilities

        public FMICapabilities()
        Create an empty Capability.
      • FMICapabilities

        public FMICapabilities​(org.w3c.dom.Element element)
        Create a FMICoSimulationCapability from an XML Element.
        Parameters:
        element - The XML Element that contains attributes.
    • Method Detail

      • getBoolean

        public boolean getBoolean​(java.lang.String fieldName)
                           throws java.lang.IllegalArgumentException
        Get the value of a boolean field.
        Parameters:
        fieldName - The name of the boolean field.
        Returns:
        True if the value of the field was true.
        Throws:
        java.lang.IllegalArgumentException - If the field is not found or it is not a boolean.
      • toString

        public java.lang.String toString()
        Return a description of the fields that are true or non-zero.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The true or non-zero fields