#include <genericSink.h>
Public Member Functions | |
GenericSink () | |
void | setup (uint v, uint time, uint no_nodes) |
void | process_event (IrisEvent *e) |
string | toString () const |
string | print_stats () const |
void | set_output_path (string outpath) |
Public Attributes | |
ofstream | out_file |
uint | address |
vector< bool > | ready |
unsigned int | packets |
bool | sending |
Private Member Functions | |
void | handle_new_packet_event (IrisEvent *e) |
void | handle_ready_event (IrisEvent *e) |
void | handle_out_pull_event (IrisEvent *e) |
Private Attributes | |
uint | vcs |
uint | no_nodes |
ullint | max_sim_time |
string | out_filename |
uint | last_vc |
unsigned int | stat_packets_in |
double | stat_min_pkt_latency |
ullint | stat_last_packet_in_cycle |
ullint | stat_last_packet_out_cycle |
ullint | stat_total_lat |
ullint | stat_hop_count |
ullint | stat_packets_out |
Definition at line 19 of file genericSink.h.
GenericSink::GenericSink | ( | ) |
void GenericSink::handle_new_packet_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 81 of file genericSink.cc.
References _DBG, IrisEvent::event_data, HighLevelPacket::hop_count, Processor::interface_connections, Processor::ni_recv, Simulator::Now(), out_file, out_filename, NetworkComponent::process_event(), READY_EVENT, Simulator::Schedule(), HighLevelPacket::sent_time, stat_hop_count, stat_last_packet_in_cycle, stat_min_pkt_latency, stat_packets_in, stat_total_lat, HighLevelPacket::toString(), IrisEvent::type, IrisEvent::vc, and HighLevelPacket::virtual_channel.
Referenced by process_event().
void GenericSink::handle_out_pull_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 119 of file genericSink.cc.
Referenced by process_event().
void GenericSink::handle_ready_event | ( | IrisEvent * | e | ) | [private] |
Definition at line 127 of file genericSink.cc.
References _DBG, ready, IrisEvent::vc, and vcs.
Referenced by process_event().
string GenericSink::print_stats | ( | void | ) | const [virtual] |
Implements Processor.
Definition at line 153 of file genericSink.cc.
References NetworkComponent::node_ip, stat_hop_count, stat_last_packet_in_cycle, stat_last_packet_out_cycle, stat_min_pkt_latency, stat_packets_in, stat_packets_out, and stat_total_lat.
void GenericSink::process_event | ( | IrisEvent * | e | ) | [virtual] |
Implements Processor.
Definition at line 59 of file genericSink.cc.
References handle_new_packet_event(), handle_out_pull_event(), handle_ready_event(), NEW_PACKET_EVENT, OUT_PULL_EVENT, READY_EVENT, and IrisEvent::type.
void GenericSink::set_output_path | ( | string | outpath | ) | [virtual] |
Implements Processor.
Definition at line 51 of file genericSink.cc.
References NetworkComponent::node_ip, and out_filename.
Implements Processor.
Definition at line 20 of file genericSink.cc.
References address, last_vc, max_sim_time, Component::myId(), no_nodes, NetworkComponent::node_ip, Simulator::Now(), NetworkComponent::process_event(), ready, READY_EVENT, Simulator::Schedule(), stat_hop_count, stat_last_packet_out_cycle, stat_min_pkt_latency, stat_packets_in, stat_total_lat, IrisEvent::type, IrisEvent::vc, and vcs.
string GenericSink::toString | ( | ) | const [virtual] |
Reimplemented from Processor.
Definition at line 143 of file genericSink.cc.
References address, and out_filename.
Reimplemented from NetworkComponent.
Definition at line 47 of file genericSink.h.
Referenced by setup(), and toString().
uint GenericSink::last_vc [private] |
ullint GenericSink::max_sim_time [private] |
uint GenericSink::no_nodes [private] |
ofstream GenericSink::out_file |
string GenericSink::out_filename [private] |
Definition at line 25 of file genericSink.h.
Referenced by GenericSink(), handle_new_packet_event(), set_output_path(), and toString().
unsigned int GenericSink::packets |
Definition at line 49 of file genericSink.h.
vector<bool> GenericSink::ready |
bool GenericSink::sending |
Definition at line 50 of file genericSink.h.
ullint GenericSink::stat_hop_count [private] |
Definition at line 33 of file genericSink.h.
Referenced by handle_new_packet_event(), print_stats(), and setup().
ullint GenericSink::stat_last_packet_in_cycle [private] |
Definition at line 30 of file genericSink.h.
Referenced by handle_new_packet_event(), and print_stats().
double GenericSink::stat_min_pkt_latency [private] |
Definition at line 29 of file genericSink.h.
Referenced by handle_new_packet_event(), print_stats(), and setup().
unsigned int GenericSink::stat_packets_in [private] |
Definition at line 28 of file genericSink.h.
Referenced by handle_new_packet_event(), print_stats(), and setup().
ullint GenericSink::stat_packets_out [private] |
ullint GenericSink::stat_total_lat [private] |
Definition at line 32 of file genericSink.h.
Referenced by handle_new_packet_event(), print_stats(), and setup().
uint GenericSink::vcs [private] |