add commented-out version of UnPunctuatorNode2 to UnPunctuatorNode until I have time...
[fleet.git] / src / edu / berkeley / fleet / dataflow / DownCounterNode.java
1 package edu.berkeley.fleet.dataflow;
2 import java.util.*;
3 import edu.berkeley.fleet.loops.*;
4 import edu.berkeley.fleet.api.*;
5
6 /**
7  *  Takes a starting value at "start" and a (positive) decrement
8  *  amount at "incr" and counts down; the first value emitted will be
9  *  (start-incr).
10  */
11 public class DownCounterNode extends Node {
12     private final Ship    ship  = dfg.pool.allocateShip("Counter");
13     private final InPort  inOp  = new DockInPort("inOp", ship.getDock("inOp"), "COUNT");
14     public  final InPort  start = new DockInPort("start", ship.getDock("in1"));
15     public  final InPort  incr  = new DockInPort("incr",  ship.getDock("in2"));
16     public  final OutPort out   = new DockOutPort("out",  ship.getDock("out"));
17
18     public DownCounterNode(DataFlowGraph dfg) { super(dfg); }
19 }