Class MetroIIModalModel

    • Constructor Detail

      • MetroIIModalModel

        public MetroIIModalModel​(Workspace workspace)
                          throws IllegalActionException,
                                 NameDuplicationException
        Constructs a modal model in the specified workspace with no container and an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace.
        Parameters:
        workspace - The workspace that will list the actor.
        Throws:
        IllegalActionException - If the name has a period in it, or the director is not compatible with the specified container.
        NameDuplicationException - If the container already contains an entity with the specified name.
      • MetroIIModalModel

        public MetroIIModalModel​(CompositeEntity container,
                                 java.lang.String name)
                          throws IllegalActionException,
                                 NameDuplicationException
        Constructs a modal model with a name and a container. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name of this actor.
        Throws:
        IllegalActionException - If the container is incompatible with this actor.
        NameDuplicationException - If the name coincides with an actor already in the container.
    • Method Detail

      • adapter

        public net.jimblackler.Utils.YieldAdapterIterable<java.lang.Iterable<metroIIcomm.Event.Builder>> adapter()
        Returns the iterator for the caller function of getfire().
        Specified by:
        adapter in interface GetFirable
        Returns:
        iterator the iterator for the caller function of getfire().
      • getfire

        public void getfire​(net.jimblackler.Utils.ResultHandler<java.lang.Iterable<metroIIcomm.Event.Builder>> resultHandler)
                     throws net.jimblackler.Utils.CollectionAbortedException
        getfire() should be identical to getfire() of MetroCompositeActor. If this actor is opaque, transfer any data from the input ports of this composite to the ports connected on the inside, and then invoke the fire() method of its local director. The transfer is accomplished by calling the transferInputs() method of the local director (the exact behavior of which depends on the domain). If the actor is not opaque, throw an exception. This method is read-synchronized on the workspace, so the fire() method of the director need not be (assuming it is only called from here). After the fire() method of the director returns, send any output data created by calling the local director's transferOutputs method.
        Specified by:
        getfire in interface GetFirable
        Parameters:
        resultHandler - iterable of events 'yield returned'.
        Throws:
        net.jimblackler.Utils.CollectionAbortedException