From: <bro...@us...> - 2008-03-13 05:39:23
|
Revision: 157 http://gridsim.svn.sourceforge.net/gridsim/?rev=157&view=rev Author: brobergj Date: 2008-03-12 22:39:26 -0700 (Wed, 12 Mar 2008) Log Message: ----------- Minor updates/fixes from merge 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:32:30 UTC (rev 156) +++ branches/gridsim4.0-branch2/source/gridsim/GridSimCore.java 2008-03-13 05:39:26 UTC (rev 157) @@ -11,9 +11,7 @@ import eduni.simjava.*; import gridsim.net.*; -import gridsim.net.flow.FlowBuffer; -import gridsim.net.flow.FlowInput; -import gridsim.net.flow.FlowOutput; +import gridsim.net.flow.*; import gridsim.util.*; import java.util.Collection; @@ -317,37 +315,26 @@ { in = new Input("Input_" + name, baudRate); out_ = new Output("Output_" + name, baudRate); - - System.out.println(super.get_name() + ".initNetwork()"); - Sim_system.link_ports(name, "input", "Input_" + name, "input_buffer"); - Sim_system.link_ports(name, "output", "Output_"+name, "output_buffer"); - if (link != null) - { - in.addLink(link); - out_.addLink(link); - } } // Flow Level networking has flow input & output else if (GridSimCore.NETWORK_TYPE == GridSimTags.NET_FLOW_LEVEL) { - 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); - } - + out_ = new FlowOutput("Output_" + name, baudRate); } else if (GridSimCore.NETWORK_TYPE == GridSimTags.NET_BUFFER_PACKET_LEVEL) { // TODO: } + + System.out.println(super.get_name() + ".initNetwork()"); + Sim_system.link_ports(name, "input", "Input_" + name, "input_buffer"); + Sim_system.link_ports(name, "output", "Output_" + name, "output_buffer"); + if (link != null) + { + in.addLink(link); + out_.addLink(link); + } } @@ -688,7 +675,7 @@ protected void terminateIOEntities() { // If it is Networked entity and Not yet terminated, then terminate. - if ( isNetworked() && !terminateIOEntitiesFlag_ && NETWORK_TYPE == GridSimTags.NET_PACKET_LEVEL) + if ( isNetworked() && !terminateIOEntitiesFlag_ ) { // Send END_OF_SIMULATION to Input entity send(input, 0.0, GridSimTags.END_OF_SIMULATION); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |