Skip to content
Snippets Groups Projects
Commit c7f529c6 authored by Sebastian Ebert's avatar Sebastian Ebert
Browse files

simplification of callbacks

parent c6423a55
No related branches found
No related tags found
No related merge requests found
......@@ -16,13 +16,6 @@ public class SensoricsNode extends DiNeRosNode {
@Override
protected void nodeLoop() {}
@NotNull
private TransitionSelectionResult fireRandomEnabledTransition(List<Transition> enabledTransitions) {
FiringSelectionSuccess fsc = new FiringSelectionSuccess();
fsc.setTransition(enabledTransitions.get(new Random().nextInt(enabledTransitions.size())));
return fsc;
}
@Override
protected TransitionSelectionResult onChange(List<Transition> enabledTransitions) {
return enabledTransitions.size() == 0 ?
......
......@@ -379,6 +379,13 @@ public abstract class DiNeRosNode extends AbstractNodeMain {
return null;
}
@NotNull
protected TransitionSelectionResult fireRandomEnabledTransition(List<Transition> enabledTransitions) {
FiringSelectionSuccess fsc = new FiringSelectionSuccess();
fsc.setTransition(enabledTransitions.get(new Random().nextInt(enabledTransitions.size())));
return fsc;
}
public boolean isServerInstancePlace(Place place) {
return responsePlaceToInstance.containsKey(place);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment