SST/macro
packet_allocator.h
Go to the documentation of this file.
1 #ifndef PACKET_ALLOCATOR_H
2 #define PACKET_ALLOCATOR_H
3 
7 
8 namespace sstmac {
9 namespace hw {
10 
11 /**
12  * @brief The packet_allocator class
13  * Factory for creating packets.
14  * Default packet allocator adds the bare minimum needed for congestion modeling.
15  * Non-default packet allocators can add extra fields to the packets to track more statistics.
16  */
18 {
19  public:
20  /**
21  * @brief new_packet Allocates a new packet corresponding to a subset
22  * of a flow (message)
23  * @param bytes Number of bytes in the packet
24  * @param byte_offset The offset within the message (flow) the packet begins at
25  * @param msg The message being packetized
26  * @return A packet compatible with packet_flow model
27  */
28  virtual packet_flow_payload*
29  new_packet(int bytes, long byte_offset, message* msg) = 0;
30 
31  virtual ~packet_allocator(){}
32 
33 };
34 
36 
37 }
38 }
39 
40 #endif // PACKET_ALLOCATOR_H
A class describing an event.
Definition: sst_message.h:42
The packet_allocator class Factory for creating packets.
DeclareFactory(node)
virtual packet_flow_payload * new_packet(int bytes, long byte_offset, message *msg)=0
new_packet Allocates a new packet corresponding to a subset of a flow (message)
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...