From: <bro...@us...> - 2008-03-13 05:32:30
|
Revision: 156 http://gridsim.svn.sourceforge.net/gridsim/?rev=156&view=rev Author: brobergj Date: 2008-03-12 22:32:30 -0700 (Wed, 12 Mar 2008) Log Message: ----------- Returned back to FlowInput / FlowOutput approach, reinstated support Modified Paths: -------------- branches/gridsim4.0-branch2/source/gridsim/GridSimCore.java Modified: branches/gridsim4.0-branch2/source/gridsim/GridSimCore.java =================================================================== --- branches/gridsim4.0-branch2/source/gridsim/GridSimCore.java 2008-03-13 05:15:21 UTC (rev 155) +++ branches/gridsim4.0-branch2/source/gridsim/GridSimCore.java 2008-03-13 05:32:30 UTC (rev 156) @@ -12,6 +12,8 @@ import eduni.simjava.*; import gridsim.net.*; import gridsim.net.flow.FlowBuffer; +import gridsim.net.flow.FlowInput; +import gridsim.net.flow.FlowOutput; import gridsim.util.*; import java.util.Collection; @@ -325,16 +327,19 @@ out_.addLink(link); } } - // Flow Level networking has a buffer that handles both input/output + // Flow Level networking has flow input & output else if (GridSimCore.NETWORK_TYPE == GridSimTags.NET_FLOW_LEVEL) { - - out_ = new FlowBuffer("Output_" + name, baudRate); - + + in = new FlowInput("Input_" + name, baudRate); + out_ = new FlowOutput("Output_" + name, baudRate); + System.out.println(super.get_name() + ".initNetwork()"); Sim_system.link_ports(name, "output", "Output_"+name, "output_buffer"); if (link != null) { + in.addLink(link); + out_.addLink(link); } @@ -692,10 +697,6 @@ send(output, 0.0, GridSimTags.END_OF_SIMULATION); terminateIOEntitiesFlag_ = true; - // If we are using flow level networking, only terminate output as input is null! - } else if ( isNetworked() && !terminateIOEntitiesFlag_ && NETWORK_TYPE == GridSimTags.NET_FLOW_LEVEL) { - // Send END_OF_SIMULATION to Output entity - send(output, 0.0, GridSimTags.END_OF_SIMULATION); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |