Package ptolemy.chic

Class ChicInvoker

  • All Implemented Interfaces:
    java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class ChicInvoker
    extends Attribute
    This attribute is a visible attribute used for invoking Chic (Checker for Interface Compatibility) on its container. Chic is invoked by right clicking on the attribute and selecting one of the options: "CHIC: Asynchronous I/O" and "CHIC: Synchronous A/G". The expression of the InterfaceName attribute specifies the name of the ChicAttribute that is going to be used upon invocation of Chic. Note that every directly or indirectly contained port of the attribute's container must have a name syntactically equivalent to a Java identifier.
    Since:
    Ptolemy II 3.0
    Version:
    $Id$
    Author:
    Eleftherios Matsikoudis
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Field Detail

      • chicAttributeName

        public StringAttribute chicAttributeName
        A StringAttribute representing the name of the ChicAttributes that are to be queried while collecting the interfaces upon which Chic is to be invoked.
      • ASYNCHRONOUS_IO

        public static final int ASYNCHRONOUS_IO
        Indicate use of the Asynchronous I/O compiler.
        See Also:
        Constant Field Values
      • SYNCHRONOUS_AG

        public static final int SYNCHRONOUS_AG
        Indicate use of the Synchronous A/G compiler.
        See Also:
        Constant Field Values
    • Method Detail

      • checkInterfaceCompatibility

        public boolean checkInterfaceCompatibility​(int compiler,
                                                   boolean silent)
                                            throws IllegalActionException,
                                                   NameDuplicationException
        Check the interface compatibility of all entities that are directly or indirectly contained by the container of this attribute.
        Parameters:
        compiler - The compiler of Chic to use.
        silent - True if the interface compatibility checking is to be carried out without invoking the user interface of Chic.
        Returns:
        True if the interfaces of the contained entities are compatible.
        Throws:
        IllegalActionException - If a port contained directly or indirectly by the model has width greater than one or is both an input and output port.
        NameDuplicationException - If the container of the attribute or one of the contained entities already contains an attribute of class other than ChicAttribute with the same name as the expression of the InterfaceName.
        See Also:
        ASYNCHRONOUS_IO, SYNCHRONOUS_AG
      • _checkInterfaceCompatibility

        protected boolean _checkInterfaceCompatibility​(CompositeActor model,
                                                       int compiler,
                                                       boolean silent,
                                                       java.lang.String name)
                                                throws IllegalActionException,
                                                       NameDuplicationException
        Check the interface compatibility of all entities that are directly or indirectly contained by the model.
        Parameters:
        model - The model to check interface compatibility.
        compiler - The compiler of Chic to use.
        silent - True if the interface compatibility checking is to be carried out without invoking the user interface of Chic.
        name - The name of the ChicAttribute.
        Returns:
        True if the interfaces of the contained entities are compatible.
        Throws:
        IllegalActionException - If a port contained directly or indirectly by the model has width greater than one or is both an input and output port.
        NameDuplicationException - If the model or one of the contained entities already contains an attribute of class other than ChicAttribute with the same name as name.
        See Also:
        ASYNCHRONOUS_IO, SYNCHRONOUS_AG