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 {
petriNet.flushTreeCache();
InputSignalTransition dispatcherOutput = (InputSignalTransition) getPnObjectByID(petriNet, TemplateConstants.DISPATCHER_OUTPUT_TRANSITION + "-" + dispatcherCount);
// include subscriber queues
for (Place p : entry.getValue()) {
PetriNet subscriberNet = TopicTemplates.getTopicCallbackQueuePetriNet(String.valueOf(callbackCount), receiverCapacity);
includeTemplateInstance(petriNet, subscriberNet, entry.getKey(), p.asOutputSignalPlace().getStaticPlaceInformation().getLocation());
Arc callbackInputArc = new Arc();
Arc callbackOverFlowArc = new Arc();
Arc callbackOutArc = new Arc();
// Arc callbackInputArc = new Arc();
// Arc callbackOverFlowArc = 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.setId("callbackOverFlowArc-" + dispatcherCount);
callbackOutArc.setId("callbackOutArc-" + dispatcherCount);
// callbackOverFlowArc
createAndIncludeArc(topPage, "callbackOverFlowArc-" + dispatcherCount, (Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + dispatcherCount),
(Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OVERFLOW_TRANSITION + "-" + callbackCount));
callbackInputArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.DISPATCHER_OUTPUT_TRANSITION + "-" + dispatcherCount));
callbackOverFlowArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + dispatcherCount));
createAndIncludeArc(topPage, "callbackOutArc-" + dispatcherCount, (Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OUTPUT_TRANSITION + "-" + dispatcherCount), p);
callbackInputArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + callbackCount));
callbackOverFlowArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OVERFLOW_TRANSITION + "-" + callbackCount));
// callbackInputArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.DISPATCHER_OUTPUT_TRANSITION + "-" + dispatcherCount));
// callbackOverFlowArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + dispatcherCount));
callbackOutArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OUTPUT_TRANSITION + "-" + callbackCount));
callbackOutArc.setSource(p);
// callbackInputArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_INPUT_PLACE + "-" + callbackCount));
// callbackOverFlowArc.setTarget((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OVERFLOW_TRANSITION + "-" + callbackCount));
// callbackOutArc.setSource((Node) getPnObjectByID(petriNet, TemplateConstants.CALLBACK_OUTPUT_TRANSITION + "-" + callbackCount));
// callbackOutArc.setSource(p);
callbackCount++;
}
// TODO: connect subscriber and dispatcher
dispatcherCount++;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment