12 #ifndef SST_CORE_LINK_H
13 #define SST_CORE_LINK_H
15 #include "sst/core/sst_types.h"
17 #include "sst/core/event.h"
21 #define _LINK_DBG( fmt, args...) __DBG( DBG_LINK, Link, fmt, ## args )
25 class Simulation_impl;
33 typedef enum { POLL, HANDLER, QUEUE } Type_t;
45 #if !SST_BUILDING_CORE
46 Link(LinkId_t
id) __attribute__ ((deprecated(
"this function was not intended to be used outside of SST core and will be removed in SST 12.")));
91 #if !SST_BUILDING_CORE
92 void setPolling() __attribute__ ((deprecated(
"this function was not intended to be used outside of SST core and will be removed in SST 12.")));
151 #if !SST_BUILDING_CORE
152 inline void deliverEvent(
Event* event)
const __attribute__ ((deprecated(
"this function was not intended to be used outside of SST core and will be removed in SST 12."))) {
192 #if !SST_BUILDING_CORE
193 void setAsConfigured() __attribute__ ((deprecated("this function was not intended to be used outside of SST core and will be removed in SST 12."))) {
195 void setAsConfigured() {
207 #ifdef __SST_DEBUG_EVENT_TRACKING__
208 void setSendingComponentInfo(
const std::string& comp_in,
const std::string& type_in,
const std::string& port_in) {
214 const std::string& getSendingComponentName() {
return comp; }
215 const std::string& getSendingComponentType() {
return ctype; }
216 const std::string& getSendingPort() {
return port; }
261 void setLatency(Cycle_t lat);
263 void sendUntimedData_sync(
Event* data);
264 void finalizeConfiguration();
265 void prepareForComplete();
271 #ifdef __SST_DEBUG_EVENT_TRACKING__
293 #endif // SST_CORE_LINK_H
Definition: syncManager.h:113
Link(LinkId_t id)
Create a new link with a given ID.
Definition: link.cc:36
Self Links are links from a component to itself.
Definition: link.h:280
A class to convert between a component's view of time and the core's view of time.
Definition: timeConverter.h:25
Definition: syncManager.h:33
bool isConfigured()
Return whether link has been configured.
Definition: link.h:203
void addRecvLatency(int cycles, const std::string &timebase)
Set additional Latency to be added on to events coming in on this link.
Definition: link.cc:108
void sendUntimedData(Event *data)
Send data during the init() or complete() phase.
Definition: link.cc:179
void send(SimTime_t delay, TimeConverter *tc, Event *event)
Send an event over the link with additional delay.
Definition: link.cc:134
Event::HandlerBase * rFunctor
Receive functor.
Definition: link.h:239
SimTime_t latency
Latency of the link.
Definition: link.h:252
LinkId_t getId()
Return the ID of this link.
Definition: link.h:162
void setPolling()
Specifies that this link has no callback, and is poll-based only.
Definition: link.cc:89
TimeConverter * defaultTimeBase
Timebase used if no other timebase is specified.
Definition: link.h:246
ActivityQueue * recvQueue
Queue of events to be received by the owning component.
Definition: link.h:224
void deliverEvent(Event *event) const
Causes an event to be delivered to the registered callback.
Definition: link.h:152
void replaceFunctor(Event::HandlerBase *functor)
Replace the callback function to be called when a message is delivered.
Definition: link.cc:125
void addSendLatency(int cycles, const std::string &timebase)
Set additional Latency to be added to events being sent out of this link.
Definition: link.cc:99
Link * pair_link
Pointer to the opposite side of this link.
Definition: link.h:255
Definition: syncManager.h:73
Event * recv()
Retrieve a pending event from the Link.
Definition: link.cc:158
Event * recvUntimedData()
Receive an event (if any) during the init() or complete() phase.
Definition: link.cc:205
void setFunctor(Event::HandlerBase *functor)
Set the callback function to be called when a message is delivered.
Definition: link.cc:117
static ActivityQueue * uninitQueue
Uninitialized queue.
Definition: link.h:230
void sendInitData(Event *init_data)
Send data during the init() or complete() phase.
Definition: link.h:179
Main control class for a SST Simulation.
Definition: simulation_impl.h:72
void setDefaultTimeBase(TimeConverter *tc)
Manually set the default detaulTimeBase.
Definition: link.cc:220
Defines a pair of links (to define a connected link)
Definition: linkPair.h:24
Event * recvInitData()
Receive an event (if any) during the init() or complete() phase.
Definition: link.h:188
void send(SimTime_t delay, Event *event)
Send an event with additional delay.
Definition: link.h:113
static ActivityQueue * afterInitQueue
Uninitialized queue.
Definition: link.h:232
ActivityQueue * untimedQueue
Queue of events to be received during init by the owning component.
Definition: link.h:226
Functor classes for Event handling.
Definition: event.h:102
ActivityQueue * configuredQueue
Currently active Queue.
Definition: link.h:228
Definition: componentInfo.h:40
Base Class for a queue of Activities.
Definition: activityQueue.h:22
static ActivityQueue * afterRunQueue
Uninitialized queue.
Definition: link.h:234
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:31
void send(Event *event)
Send an event with the Link's default delay.
Definition: link.h:120
Link between two components.
Definition: link.h:32
TimeConverter * getDefaultTimeBase()
Return the default Time Base for this link.
Definition: link.cc:224