Public Member Functions | Protected Attributes | Friends

SST::Link Class Reference

Link between two components. More...

#include <link.h>

Inheritance diagram for SST::Link:
SST::SelfLink

Public Member Functions

 Link (LinkId_t id)
void setLatency (Cycle_t lat)
 set minimum link latency
void setFunctor (Event::HandlerBase *functor)
void setPolling ()
void Send (SimTime_t delay, TimeConverter *tc, Event *event)
 Send an event over the link with additional delay.
void Send (SimTime_t delay, Event *event)
 Send an event with additional delay.
void Send (Event *event)
 Send an event with the Link's default delay.
EventRecv ()
 Retrieve a pending event from the Link.
void setDefaultTimeBase (TimeConverter *tc)
 Manually set the default detaulTimeBase.
TimeConvertergetDefaultTimeBase ()
void deliverEvent (Event *event)

Protected Attributes

ActivityQueuerecvQueue
Event::HandlerBaserFunctor
 Recieve functor.
TimeConverterdefaultTimeBase
 Timebase used if no other timebase is specified.
SimTime_t latency
 Latency of the link.
Linkpair_link

Friends

class LinkPair
class Simulation
class boost::serialization::access

Detailed Description

Link between two components.

Carries events


Member Function Documentation

Event * SST::Link::Recv (  ) 

Retrieve a pending event from the Link.

For links which do not have a set event handler, they can be polled with this function. Returns NULL if there is no pending event.

void SST::Link::Send ( SimTime_t  delay,
Event event 
) [inline]

Send an event with additional delay.

Sends an event over a link with additional delay specified by the Link's default timebase.

Parameters:
delay The additional delay, in units of the default Link timebase
event The event to send

References defaultTimeBase, and Send().

void SST::Link::Send ( Event event  )  [inline]

Send an event with the Link's default delay.

Parameters:
event The event to send

References Send().

void SST::Link::Send ( SimTime_t  delay,
TimeConverter tc,
Event event 
)

Send an event over the link with additional delay.

Sends an event over a link with an additional delay specified with a TimeConverter. I.e. the total delay is the link's delay + the additional specified delay.

Parameters:
delay The additional delay
tc The time converter to specify units for the additional delay
the Event to send

References SST::TimeConverter::convertToCoreTime(), and latency.

Referenced by Send(), sstdisksim_tracereader::Setup(), trig_cpu::Setup(), and event_test::Setup().

void SST::Link::setDefaultTimeBase ( TimeConverter tc  ) 

Manually set the default detaulTimeBase.

Parameters:
tc TimeConverter object for the timebase

References defaultTimeBase.


Field Documentation

Timebase used if no other timebase is specified.

Used to specify the untits for added delays when sending, such as in Link::Send(). Often set by the Component::registerClock() function if the regAll argument is true.

Referenced by Send(), and setDefaultTimeBase().

SimTime_t SST::Link::latency [protected]

Latency of the link.

It is used by the partitioner as the weight. This latency is added to the delay put on the event by the component.

Referenced by Send(), and setLatency().

Recieve functor.

This functor is set when the link is connected. Determines what the receiver wants to be called


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