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

untested fix of [flatter-1]

parent 367ad2f2
No related branches found
No related tags found
No related merge requests found
...@@ -116,32 +116,46 @@ public class ChannelFlatter extends Flatter { ...@@ -116,32 +116,46 @@ public class ChannelFlatter extends Flatter {
petriNet.flushTreeCache(); petriNet.flushTreeCache();
InputSignalTransition dispatcherOutput = (InputSignalTransition) getPnObjectByID(petriNet, TemplateConstants.DISPATCHER_OUTPUT_TRANSITION + "-" + dispatcherCount);
// include subscriber queues // include subscriber queues
for (Place p : entry.getValue()) { for (Place p : entry.getValue()) {
PetriNet subscriberNet = TopicTemplates.getTopicCallbackQueuePetriNet(String.valueOf(callbackCount), receiverCapacity); PetriNet subscriberNet = TopicTemplates.getTopicCallbackQueuePetriNet(String.valueOf(callbackCount), receiverCapacity);
includeTemplateInstance(petriNet, subscriberNet, entry.getKey(), p.asOutputSignalPlace().getStaticPlaceInformation().getLocation()); includeTemplateInstance(petriNet, subscriberNet, entry.getKey(), p.asOutputSignalPlace().getStaticPlaceInformation().getLocation());
Arc callbackInputArc = new Arc(); // Arc callbackInputArc = new Arc();
Arc callbackOverFlowArc = new Arc(); // Arc callbackOverFlowArc = new Arc();
Arc callbackOutArc = new Arc(); // Arc callbackOutArc = new Arc();
// callbackInputArc.setId("callbackInputArc-" + dispatcherCount);
// callbackOverFlowArc.setId("callbackOverFlowArc-" + dispatcherCount);
// callbackOutArc.setId("callbackOutArc-" + dispatcherCount);
// callbackInputArc
createAndIncludeArc(topPage, "callbackInputArc-" + dispatcherCount, (Node) getPnObjectByID(petriNet, TemplateConstants.DISPATCHER_OUTPUT_TRANSITION + "-" + dispatcherCount),
(Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + callbackCount));
callbackInputArc.setId("callbackInputArc-" + dispatcherCount); // callbackOverFlowArc
callbackOverFlowArc.setId("callbackOverFlowArc-" + dispatcherCount); createAndIncludeArc(topPage, "callbackOverFlowArc-" + dispatcherCount, (Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + dispatcherCount),
callbackOutArc.setId("callbackOutArc-" + dispatcherCount); (Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OVERFLOW_TRANSITION + "-" + callbackCount));
callbackInputArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.DISPATCHER_OUTPUT_TRANSITION + "-" + dispatcherCount)); createAndIncludeArc(topPage, "callbackOutArc-" + dispatcherCount, (Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OUTPUT_TRANSITION + "-" + dispatcherCount), p);
callbackOverFlowArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + dispatcherCount));
callbackInputArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + callbackCount)); // callbackInputArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.DISPATCHER_OUTPUT_TRANSITION + "-" + dispatcherCount));
callbackOverFlowArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OVERFLOW_TRANSITION + "-" + callbackCount)); // callbackOverFlowArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + dispatcherCount));
callbackOutArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OUTPUT_TRANSITION + "-" + callbackCount)); // callbackInputArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + callbackCount));
callbackOutArc.setSource(p); // callbackOverFlowArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OVERFLOW_TRANSITION + "-" + callbackCount));
// callbackOutArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OUTPUT_TRANSITION + "-" + callbackCount));
// callbackOutArc.setSource(p);
callbackCount++; callbackCount++;
} }
// TODO: connect subscriber and dispatcher
dispatcherCount++; dispatcherCount++;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment