Link between two components. More...
#include <link.h>
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. | |
Event * | Recv () |
Retrieve a pending event from the Link. | |
void | setDefaultTimeBase (TimeConverter *tc) |
Manually set the default detaulTimeBase. | |
TimeConverter * | getDefaultTimeBase () |
void | deliverEvent (Event *event) |
Protected Attributes | |
ActivityQueue * | recvQueue |
Event::HandlerBase * | rFunctor |
Recieve functor. | |
TimeConverter * | defaultTimeBase |
Timebase used if no other timebase is specified. | |
SimTime_t | latency |
Latency of the link. | |
Link * | pair_link |
Friends | |
class | LinkPair |
class | Simulation |
class | boost::serialization::access |
Link between two components.
Carries events
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.
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] |
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.
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.
tc | TimeConverter object for the timebase |
References defaultTimeBase.
TimeConverter* SST::Link::defaultTimeBase [protected] |
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().
Event::HandlerBase* SST::Link::rFunctor [protected] |
Recieve functor.
This functor is set when the link is connected. Determines what the receiver wants to be called