Examples of ConditionalSend


Examples of ptolemy.domains.csp.kernel.ConditionalSend

            ConditionalBranch[] branches = new ConditionalBranch[2];
            Token t = new IntToken(0);

            while (continueCDO) {
                // step 1
                branches[0] = new ConditionalSend(guard, leftOut, 0, 0, t);
                branches[1] = new ConditionalSend(guard, rightOut, 0, 1, t);

                // step 2
                int successfulBranch = chooseBranch(branches);

                // step 3
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

                Token t = new IntToken(count);
                ConditionalBranch[] branches = new ConditionalBranch[size];

                for (i = 0; i < size; i++) {
                    branches[i] = new ConditionalSend(guards[i], output, i, i,
                            t);
                }

                int successfulBranch = chooseBranch(branches);
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

                // step 1
                guard = (_size < iDepth);
                branches[0] = new ConditionalReceive(guard, input, 0, 0);

                guard = (_size > 0);
                branches[1] = new ConditionalSend(guard, output, 0, 1,
                        _buffer[_readFrom]);

                // step 2
                int successfulBranch = chooseBranch(branches);
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

            // Rendezvous with either the input or output
            // and act accordingly.
            ConditionalBranch[] branches = new ConditionalBranch[2];
            branches[0] = new ConditionalReceive(input, 0, 0);
            Token token = (Token) _buffer.get(0);
            branches[1] = new ConditionalSend(output, 0, 1, token);
            if (_debugging && _VERBOSE_DEBUGGING) {
                branches[0].addDebugListener(this);
                branches[1].addDebugListener(this);
            }
            if (_debugging) {
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

        }
        if (_pool.size() > 0) {
            Token token = (Token) _pool.get(0);
            for (int i = release.getWidth(); i < numberOfConditionals; i++) {
                int channel = i - release.getWidth();
                branches[i] = new ConditionalSend(grant, channel, i, token);
                if (_debugging && _VERBOSE_DEBUGGING) {
                    branches[i].addDebugListener(this);
                }
            }
        }
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

                    token = data[i];
                }
                if (_debugging) {
                    _debug("Sending output to channel " + i + ": " + token);
                }
                branches[i] = new ConditionalSend(output, i, i, token);
                if (_debugging && _VERBOSE_DEBUGGING) {
                    branches[i].addDebugListener(this);
                }
            }
            if (_debugging) {
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

                //ptActor.printDebug("Creating a ConditionalSend to send " +
                //        datal.get(_count[i]) +  " on port " +
                //        _indexToPort(i).getFullName() + " channel " +
                //
                //_indexToChannelNumber(i));
                branches[i] = new ConditionalSend(true, _indexToPort(i),
                        _indexToChannelNumber(i), i, (Token) datal
                                .get(_count[i]), _cbc);
            } else {
                branches[i] = new ConditionalSend(false, _indexToPort(i),
                        _indexToChannelNumber(i), i, null, _cbc);
            }

            //}
        }
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

                branches[i] = new ConditionalReceive(true, input, i, i);
            }

            // Send Branches
            for (int i = 0; i < _numOutChannels; i++) {
                branches[i + _numInChannels] = new ConditionalSend(true,
                        output, i, i + _numInChannels, token);
            }

            int br = chooseBranch(branches);
View Full Code Here

Examples of ptolemy.domains.csp.kernel.ConditionalSend

        ConditionalBranch[] Branchs = new ConditionalBranch[numRcvrs];

        Token token = new Token();

        for (int i = 0; i < numRcvrs; i++) {
            Branchs[i] = new ConditionalSend(_truth[i], outputPort, i, i, token);
        }

        int winner = chooseBranch(Branchs);

        _winningBranch[winner] = true;
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.