3
0
Fork 0

[svn r300] fixed counting ofd ports

This commit is contained in:
willemc 2007-11-29 00:17:34 +01:00
parent 0e4aa65062
commit deb76203c6

View file

@ -98,18 +98,20 @@ public class EventExecutorImpl implements EventExecutor {
ready = false; ready = false;
try { try {
FoeiProcess foeiProcess = FoeiProcessFactory.getFoeiProcess(); FoeiProcess foeiProcess = FoeiProcessFactory.getFoeiProcess();
eventPort.addEventsPassed();
if(eventPort.getEventPortType()==EventPortType.input) { if(eventPort.getEventPortType()==EventPortType.input) {
EventInput eventInput = (EventInput)eventPort.getEventObject(); EventInput eventInput = (EventInput)eventPort.getEventObject();
eventPort.addEventsPassed(); // inc input port
eventInput.doEvent(eventPort,eventObject); eventInput.doEvent(eventPort,eventObject);
return; return;
} }
if(eventPort.getEventPortType()==EventPortType.output) { if(eventPort.getEventPortType()==EventPortType.output) {
eventPort.addEventsPassed(); // inc output port
List<EventPort> bindings = foeiProcess.getBindings(eventPort); List<EventPort> bindings = foeiProcess.getBindings(eventPort);
for(EventPort port:bindings) { for(EventPort port:bindings) {
EventInput eventInput = (EventInput)port.getEventObject(); EventInput eventInput = (EventInput)port.getEventObject();
if(port.isImmediate()) { if(port.isImmediate()) {
logger.finer("Executing event of: "+port.getEventObject()+" port:"+port.getName()+" object: "+eventObject); logger.finer("Executing event of: "+port.getEventObject()+" port:"+port.getName()+" object: "+eventObject);
port.addEventsPassed(); // inc Immediate import port
eventInput.doEvent(port,eventObject); eventInput.doEvent(port,eventObject);
} else { } else {
logger.finest("Adding event to event queue"); logger.finest("Adding event to event queue");