12 #ifndef SST_CORE_LINK_H
13 #define SST_CORE_LINK_H
15 #include "sst/core/event.h"
16 #include "sst/core/sst_types.h"
17 #include "sst/core/timeConverter.h"
21 #define _LINK_DBG(fmt, args...) __DBG(DBG_LINK, Link, fmt, ##args)
25 class Simulation_impl;
33 enum Type_t : uint16_t { POLL, HANDLER, SYNC, UNINITIALIZED };
34 enum Mode_t : uint16_t { INIT, RUN, COMPLETE };
45 #if !SST_BUILDING_CORE
46 Link(LinkId_t
id) __attribute__((
47 deprecated(
"this function was not intended to be used outside of SST core and will be removed in SST 12.")));
92 #if !SST_BUILDING_CORE
94 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
153 deprecated(
"this function was not intended to be used outside of SST core and will be removed in SST 12.")))
159 (*pair_rFunctor)(event);
196 #ifdef __SST_DEBUG_EVENT_TRACKING__
197 void setSendingComponentInfo(
const std::string& comp_in,
const std::string& type_in,
const std::string& port_in)
204 const std::string& getSendingComponentName() {
return comp; }
205 const std::string& getSendingComponentType() {
return ctype; }
206 const std::string& getSendingPort() {
return port; }
213 void setAsSyncLink() { type = SYNC; }
222 void send_impl(SimTime_t delay, Event* event);
257 SimTime_t& current_time;
265 void setLatency(Cycle_t lat);
267 void sendUntimedData_sync(
Event* data);
268 void finalizeConfiguration();
269 void prepareForComplete();
272 #ifdef __SST_DEBUG_EVENT_TRACKING__
292 #endif // SST_CORE_LINK_H
Definition: syncManager.h:102
Link(LinkId_t id)
Create a new link with a given ID.
Definition: link.cc:30
Definition: ssthandler.h:100
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:26
Definition: syncManager.h:32
bool isConfigured()
Return whether link has been configured.
Definition: link.h:194
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:119
void sendUntimedData(Event *data)
Send data during the init() or complete() phase.
Definition: link.cc:209
void send(SimTime_t delay, TimeConverter *tc, Event *event)
Send an event over the link with additional delay.
Definition: link.h:107
SimTime_t convertToCoreTime(SimTime_t time) const
Converts from the component's view to the core's view of time.
Definition: timeConverter.h:36
SimTime_t latency
Latency of the link.
Definition: link.h:251
LinkId_t getId()
Return the ID of this link.
Definition: link.h:165
void setPolling()
Specifies that this link has no callback, and is poll-based only.
Definition: link.cc:93
void deliverEvent(Event *event) const
Causes an event to be delivered to the registered callback.
Definition: link.h:152
SimTime_t defaultTimeBase
Timebase used if no other timebase is specified.
Definition: link.h:245
void replaceFunctor(Event::HandlerBase *functor)
Replace the callback function to be called when a message is delivered.
Definition: link.cc:144
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:106
Link * pair_link
Pointer to the opposite side of this link.
Definition: link.h:254
Definition: syncManager.h:67
Event * recv()
Retrieve a pending event from the Link.
Definition: link.cc:187
Event * recvUntimedData()
Receive an event (if any) during the init() or complete() phase.
Definition: link.cc:240
void setFunctor(Event::HandlerBase *functor)
Set the callback function to be called when a message is delivered.
Definition: link.cc:132
void send_impl(SimTime_t delay, Event *event)
Send an event over the link with additional delay.
Definition: link.cc:157
void sendInitData(Event *init_data)
Send data during the init() or complete() phase.
Definition: link.h:182
Main control class for a SST Simulation.
Definition: simulation_impl.h:74
void setDefaultTimeBase(TimeConverter *tc)
Manually set the default detaulTimeBase.
Definition: link.cc:256
Defines a pair of links (to define a connected link)
Definition: linkPair.h:23
Event * recvInitData()
Receive an event (if any) during the init() or complete() phase.
Definition: link.h:189
Event::HandlerBase * pair_rFunctor
Receive functor.
Definition: link.h:238
void send(SimTime_t delay, Event *event)
Send an event with additional delay.
Definition: link.h:118
ActivityQueue * send_queue
Queue of events to be received by the owning component.
Definition: link.h:233
Definition: componentInfo.h:39
Base Class for a queue of Activities.
Definition: activityQueue.h:21
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:123
Link between two components.
Definition: link.h:31
TimeConverter * getDefaultTimeBase()
Return the default Time Base for this link.
Definition: link.cc:265