view src/alice/test/topology/fish/PeekStartX.java @ 212:b5daccf36104 working

add Receiver state pattern
author one
date Wed, 27 Mar 2013 17:30:52 +0900
parents 0b25b48116b6
children fec0726bb126
line wrap: on
line source

package alice.test.topology.fish;

import alice.codesegment.CodeSegment;
import alice.datasegment.CommandType;
import alice.datasegment.Receiver;

public class PeekStartX extends CodeSegment {

	public Receiver startX = ids.create(CommandType.PEEK);
	public int index;
	
	public PeekStartX(int index) {
		this.index = index;
	}
	
	@Override
	public void run() {
		int startX = this.startX.data.asInteger(this.startX);
		AsignStartX cs = new AsignStartX(startX, this.startX.data.index);
		cs.routing.setKey("local", "routing", this.startX.data.index);
	}

}