bamboo.sim
Class Network

java.lang.Object
  extended by bamboo.util.StandardStage
      extended by bamboo.sim.Network
All Implemented Interfaces:
EventHandlerIF, SingleThreadedEventHandlerIF

public class Network
extends StandardStage

A network stage for simulated machines.

Version:
$Id: Network.java,v 1.6 2004/04/19 22:56:39 srhea Exp $
Author:
Sean C. Rhea

Nested Class Summary
protected static class Network.EnqueueCb
           
 
Field Summary
protected  int ack_size
           
protected  int header_size
           
protected static org.apache.log4j.Logger logger
           
protected  Simulator simulator
           
protected static Map sinks
           
 
Fields inherited from class bamboo.util.StandardStage
acore, classifier, DEBUG, event_types, inb_msg_types, my_node_id, my_sink, outb_msg_types, sim_running
 
Constructor Summary
Network()
           
 
Method Summary
protected  void handle_network_latency_req(ostore.network.NetworkLatencyReq req)
           
protected  void handle_network_message(ostore.network.NetworkMessage msg)
           
 void handleEvent(QueueElementIF item)
           
 void init(ConfigDataIF config)
           
protected static long msg_latency_us(NetworkModel.RouteInfo ri, int sz)
           
static long msg_latency_us(ostore.util.NodeId a, ostore.util.NodeId b, int sz)
           
static long network_latency_us(ostore.util.NodeId a, ostore.util.NodeId b)
           
protected static NetworkModel.RouteInfo route_info(ostore.util.NodeId a, ostore.util.NodeId b)
           
 
Methods inherited from class bamboo.util.StandardStage
BUG, BUG, BUG, config_get_boolean, config_get_double, config_get_int, config_get_string, configGetInt, destroy, dispatch, enqueue, handleEvents, lookup_stage, now_ms, timer_ms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sinks

protected static Map sinks

logger

protected static org.apache.log4j.Logger logger

simulator

protected Simulator simulator

header_size

protected int header_size

ack_size

protected int ack_size
Constructor Detail

Network

public Network()
Method Detail

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Overrides:
init in class StandardStage
Throws:
Exception

handleEvent

public void handleEvent(QueueElementIF item)
Specified by:
handleEvent in interface EventHandlerIF
Overrides:
handleEvent in class StandardStage

msg_latency_us

protected static final long msg_latency_us(NetworkModel.RouteInfo ri,
                                           int sz)

msg_latency_us

public static long msg_latency_us(ostore.util.NodeId a,
                                  ostore.util.NodeId b,
                                  int sz)

network_latency_us

public static long network_latency_us(ostore.util.NodeId a,
                                      ostore.util.NodeId b)

route_info

protected static NetworkModel.RouteInfo route_info(ostore.util.NodeId a,
                                                   ostore.util.NodeId b)

handle_network_latency_req

protected void handle_network_latency_req(ostore.network.NetworkLatencyReq req)

handle_network_message

protected void handle_network_message(ostore.network.NetworkMessage msg)