@Override public void send(Event e, Port p) { if (p.getName().equals("IOStream")) { IOStreamPort_out.send(e); } else { // Internal channel managed by ThingML super.send(e, p); } }
@Override public void stop() { super.stop(); queue = null; }
@Override public void receive(Event event, Port p) { if (queue != null) { super.receive(event, p); } }
@Override public void start() { queue = new java.util.concurrent.ArrayBlockingQueue<Event>(1024); super.start(); }