SST/macro
Public Member Functions | List of all members
sstmac::hw::packet_allocator Class Referenceabstract

The packet_allocator class Factory for creating packets. More...

#include <packet_allocator.h>

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

Public Member Functions

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) More...
 
virtual ~packet_allocator ()
 
- Public Member Functions inherited from sprockit::factory_type
virtual void init_factory_params (sim_parameters *params)
 
virtual void finalize_init ()
 

Detailed Description

The packet_allocator class Factory for creating packets.

Default packet allocator adds the bare minimum needed for congestion modeling. Non-default packet allocators can add extra fields to the packets to track more statistics.

Definition at line 17 of file packet_allocator.h.

Constructor & Destructor Documentation

virtual sstmac::hw::packet_allocator::~packet_allocator ( )
inlinevirtual

Definition at line 31 of file packet_allocator.h.

References sstmac::hw::DeclareFactory().

Here is the call graph for this function:

Member Function Documentation

virtual packet_flow_payload* sstmac::hw::packet_allocator::new_packet ( int  bytes,
long  byte_offset,
message msg 
)
pure virtual

new_packet Allocates a new packet corresponding to a subset of a flow (message)

Parameters
bytesNumber of bytes in the packet
byte_offsetThe offset within the message (flow) the packet begins at
msgThe message being packetized
Returns
A packet compatible with packet_flow model

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