SST/macro
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
sstmac::hw::simple_switch Class Reference

#include <simple_switch.h>

Inheritance diagram for sstmac::hw::simple_switch:
Inheritance graph
Collaboration diagram for sstmac::hw::simple_switch:
Collaboration graph

Public Member Functions

virtual void initialize ()
 
int queue_length (int port) const
 
void set_topology (topology *top)
 
virtual void connect_output (int src_outport, int dst_inport, connectable *mod, config *cfg)
 
virtual void connect_input (int src_outport, int dst_inport, connectable *mod, config *cfg)
 
std::vector< switch_idconnected_switches () const
 
virtual void handle (event *ev)
 Cast message and pass to #send. More...
 
virtual void set_event_manager (event_manager *m)
 
virtual std::string to_string () const
 
virtual ~simple_switch ()
 
timestamp hop_latency () const
 
double inverse_bw () const
 
timestamp lookahead () const
 
double hop_bandwidth () const
 
virtual void init_factory_params (sprockit::sim_parameters *params)
 
virtual void finalize_init ()
 

Protected Member Functions

virtual void connect_injector (int src_outport, int dst_inport, event_handler *nic)
 
virtual void connect_ejector (int src_outport, int dst_inport, event_handler *nic)
 
void add_switch (connectable *sw)
 

Protected Attributes

node_id my_start_
 
node_id my_end_
 
double inj_bw_inverse_
 
timestamp inj_lat_
 
double inverse_bw_
 
double inv_min_bw_
 
timestamp hop_latency_
 
spkt_unordered_map< node_id, network_switch * > neighbors_
 
spkt_unordered_map< node_id, nic * > nics_
 

Private Member Functions

void send_to_nic (timestamp delay, node_id dst, message *msg)
 
void send_to_switch (timestamp delay, node_id dst, message *msg)
 

Detailed Description

Definition at line 14 of file simple_switch.h.

Constructor & Destructor Documentation

virtual sstmac::hw::simple_switch::~simple_switch ( )
virtual

Referenced by to_string().

Member Function Documentation

void sstmac::hw::simple_switch::add_switch ( connectable sw)
protected

Referenced by hop_bandwidth().

virtual void sstmac::hw::simple_switch::connect_ejector ( int  src_outport,
int  dst_inport,
event_handler nic 
)
protectedvirtual

Referenced by hop_bandwidth().

virtual void sstmac::hw::simple_switch::connect_injector ( int  src_outport,
int  dst_inport,
event_handler nic 
)
protectedvirtual

Referenced by hop_bandwidth().

virtual void sstmac::hw::simple_switch::connect_input ( int  src_outport,
int  dst_inport,
connectable mod,
config *  cfg 
)
virtual

Referenced by queue_length().

virtual void sstmac::hw::simple_switch::connect_output ( int  src_outport,
int  dst_inport,
connectable mod,
config *  cfg 
)
virtual

Referenced by queue_length().

std::vector<switch_id> sstmac::hw::simple_switch::connected_switches ( ) const

Referenced by queue_length().

virtual void sstmac::hw::simple_switch::finalize_init ( )
virtual

Referenced by hop_bandwidth().

virtual void sstmac::hw::simple_switch::handle ( event ev)
virtual

Cast message and pass to #send.

Parameters
msgIncoming message (should cast to packet_train)

Referenced by queue_length().

double sstmac::hw::simple_switch::hop_bandwidth ( ) const
inline

Definition at line 79 of file simple_switch.h.

References add_switch(), connect_ejector(), connect_injector(), finalize_init(), init_factory_params(), and inverse_bw_.

Here is the call graph for this function:

timestamp sstmac::hw::simple_switch::hop_latency ( ) const
inline

Definition at line 66 of file simple_switch.h.

References hop_latency_.

virtual void sstmac::hw::simple_switch::init_factory_params ( sprockit::sim_parameters *  params)
virtual

Referenced by hop_bandwidth().

virtual void sstmac::hw::simple_switch::initialize ( )
virtual
double sstmac::hw::simple_switch::inverse_bw ( ) const
inline

Definition at line 71 of file simple_switch.h.

References inverse_bw_, and lookahead().

Here is the call graph for this function:

timestamp sstmac::hw::simple_switch::lookahead ( ) const

Referenced by inverse_bw().

int sstmac::hw::simple_switch::queue_length ( int  port) const
inline

Definition at line 23 of file simple_switch.h.

References connect_input(), connect_output(), connected_switches(), handle(), set_event_manager(), and set_topology().

Here is the call graph for this function:

void sstmac::hw::simple_switch::send_to_nic ( timestamp  delay,
node_id  dst,
message msg 
)
private
void sstmac::hw::simple_switch::send_to_switch ( timestamp  delay,
node_id  dst,
message msg 
)
private
virtual void sstmac::hw::simple_switch::set_event_manager ( event_manager m)
virtual

Referenced by queue_length().

void sstmac::hw::simple_switch::set_topology ( topology top)

Referenced by queue_length().

virtual std::string sstmac::hw::simple_switch::to_string ( ) const
inlinevirtual

Definition at line 58 of file simple_switch.h.

References ~simple_switch().

Here is the call graph for this function:

Member Data Documentation

timestamp sstmac::hw::simple_switch::hop_latency_
protected

Definition at line 111 of file simple_switch.h.

Referenced by hop_latency().

double sstmac::hw::simple_switch::inj_bw_inverse_
protected

Definition at line 103 of file simple_switch.h.

timestamp sstmac::hw::simple_switch::inj_lat_
protected

Definition at line 105 of file simple_switch.h.

double sstmac::hw::simple_switch::inv_min_bw_
protected

Definition at line 109 of file simple_switch.h.

double sstmac::hw::simple_switch::inverse_bw_
protected

Definition at line 107 of file simple_switch.h.

Referenced by hop_bandwidth(), and inverse_bw().

node_id sstmac::hw::simple_switch::my_end_
protected

Definition at line 101 of file simple_switch.h.

node_id sstmac::hw::simple_switch::my_start_
protected

Definition at line 100 of file simple_switch.h.

spkt_unordered_map<node_id, network_switch*> sstmac::hw::simple_switch::neighbors_
protected

Definition at line 113 of file simple_switch.h.

spkt_unordered_map<node_id, nic*> sstmac::hw::simple_switch::nics_
protected

Definition at line 115 of file simple_switch.h.


The documentation for this class was generated from the following file: