SST/macro
packet_flow_handler.h
Go to the documentation of this file.
1 #ifndef PACKETFLOW_COMPONENT_H
2 #define PACKETFLOW_COMPONENT_H
3 
8 #include <list>
9 
10 namespace sstmac {
11 namespace hw {
12 
13 struct payload_queue {
14 
15  std::list<packet_flow_payload*> queue;
16 
17  typedef std::list<packet_flow_payload*>::iterator iterator;
18 
19  packet_flow_payload*
20  pop(int num_credits);
21 
22  packet_flow_payload*
23  front();
24 
25  void
26  push_back(packet_flow_payload* payload);
27 
28 };
29 
31  public event_subscheduler
32 {
33 
34  public:
36 
37  virtual std::string
38  to_string() const {
39  return "packet_flow_handler";
40  }
41 
42  virtual ~packet_flow_handler() {}
43 
44  virtual void
45  handle(event* ev);
46 
47  virtual void
48  handle_credit(packet_flow_credit* msg) = 0;
49 
50  virtual void
51  handle_payload(packet_flow_payload* pkt) = 0;
52 
53  int
54  thread_id() const {
56  }
57 
58 };
59 
64  src_outport(-1),
65  handler(0)
66  {
67  }
68 };
69 
74  dst_inport(-1),
75  handler(0)
76  {
77  }
78 };
79 
80 
81 
82 
83 
84 
85 
86 
87 }
88 }
89 
90 #endif // PACKETFLOW_COMPONENT_H
91 
packet_flow_payload * front()
int thread_id() const
Definition: event_handler.h:78
The main interface for something that can respond to an event (sst_message).
Definition: event_handler.h:24
std::list< packet_flow_payload * > queue
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
void push_back(packet_flow_payload *payload)
virtual std::string to_string() const
packet_flow_payload * pop(int num_credits)
std::list< packet_flow_payload * >::iterator iterator