Package ptolemy.actor

Examples of ptolemy.actor.CompositeActor.inputPortList()


    public void fire() throws IllegalActionException {
        FSMActor controller = getController();
        controller.readInputs();

        CompositeActor container = (CompositeActor) getContainer();
        List inputPortList = container.inputPortList();
        State currentState = controller.currentState();

        // Choose a nonpreemptive transition.
        List enabledTransitions = controller.enabledTransitions(currentState
                .preemptiveTransitionList());
View Full Code Here


     @param portSet The given set of ports
     *  @param referredInputPorts The referred set.
     */
    public void getReferredInputPorts(Set portSet, Set referredInputPorts) {
        CompositeActor container = (CompositeActor) getContainer();
        List inputPortList = container.inputPortList();

        for (int i = 0; i < inputPortList.size(); i++) {
            IOPort inputPort = (IOPort) inputPortList.get(i);

            if (portSet.contains(inputPort.getName())) {
View Full Code Here

        // then there is nothing to do, and we can return false.
        if (!nextEventTime.equals(modelTime)) {
            // If the event timestamp is greater than the model timestamp,
            // we check if there's any external input.
            CompositeActor container = (CompositeActor) getContainer();
            Iterator inputPorts = container.inputPortList().iterator();
            boolean hasInput = false;

            while (inputPorts.hasNext() && !hasInput) {
                IOPort port = (IOPort) inputPorts.next();
View Full Code Here

     *   method throws it.
     */
    private void _transferInputsToInside() throws IllegalActionException {
        // If there are no input ports, this method does nothing.
        CompositeActor container = (CompositeActor) getContainer();
        Iterator inports = container.inputPortList().iterator();
        while (inports.hasNext() && !_stopRequested) {
            IOPort p = (IOPort) inports.next();
            super.transferInputs(p);
        }
    }
View Full Code Here

                state = (State) states.next();
                _localReceiverMaps.put(state, new HashMap());
            }

            CompositeActor comp = (CompositeActor) getContainer();
            Iterator inPorts = comp.inputPortList().iterator();
            List resultsList = new LinkedList();

            while (inPorts.hasNext()) {
                IOPort port = (IOPort) inPorts.next();
                Receiver[][] allReceivers = port.deepGetReceivers();
View Full Code Here

        StringBuffer result = new StringBuffer();
        CompositeActor container = (CompositeActor) getContainer();

        // Start with the input ports of the composite, which
        // may have forked connections on the inside.
        Iterator inputPorts = container.inputPortList().iterator();
        while (inputPorts.hasNext()) {
            IOPort inputPort = (IOPort) (inputPorts.next());
            result.append("Send inside from " + inputPort.getFullName() + "\n");
            Receiver[][] destinations = inputPort.deepGetReceivers();
            for (int channel = 0; channel < destinations.length; channel++) {
View Full Code Here

        // Examine and propagate the signal types of the container ports.
        // FIXME: the following implementation is not a good solution.
        // Signal types can also be derived in a similar way as the
        // function dependencies analysis.
        Iterator containerInPorts = container.inputPortList().iterator();

        while (containerInPorts.hasNext()) {
            IOPort inPort = (IOPort) containerInPorts.next();

            if (!isCTCompositeActor) {
View Full Code Here

            }
        }

        // Last, connect the container inputs to the inside
        // ports receiving tokens from these inputs.
        Iterator inputs = actor.inputPortList().listIterator();

        while (inputs.hasNext()) {
            IOPort inputPort = (IOPort) inputs.next();

            // Find the inside ports connected to this input port.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.