SST 15.0
Structural Simulation Toolkit
|
Attach point for inspecting, modifying or dropping events sent on the Link. More...
#include <link.h>
Public Member Functions | |
virtual uintptr_t | registerLinkAttachTool (const AttachPointMetaData &mdata)=0 |
Function that will be called when an attach point is registered with the tool implementing the attach point. | |
virtual void | eventSent (uintptr_t key, Event *&ev)=0 |
Function that will be called when an event is sent on a link with registered attach points. | |
virtual void | serializeEventAttachPointKey (SST::Core::Serialization::serializer &ser, uintptr_t &key) |
Function that will be called to handle the key returned from registerLinkAttachTool, if the AttachPoint tool is serializable. | |
Attach point for inspecting, modifying or dropping events sent on the Link.
NOTE: Using the Link::AttachPoint will noticeably affect the performance of sending events on Links and it is recommended that, if possible, Event::HandlerBase::AttachPoint or Event::HandlerBase::InterceptPoint be used instead.
|
pure virtual |
Function that will be called when an event is sent on a link with registered attach points.
If ev is set to nullptr, then the event will not be delivered and the tool should delete the original event.
key | Opaque key returned from registerLinkAttachTool() |
Implemented in SST::CoreTestPortModule::TestPortModule, SST::IMPL::PortModule::RandomDrop, SST::PortModule, and SST::Profile::EventHandlerProfileToolCount.
|
pure virtual |
Function that will be called when an attach point is registered with the tool implementing the attach point.
The metadata passed in will be dependent on what type of tool this is attached to. The uintptr_t returned from this function will be passed into the eventSent() function.
mdata | Metadata to be passed into the tool |
Implemented in SST::IMPL::PortModule::RandomDrop, SST::PortModule, SST::Profile::EventHandlerProfileToolCount, SST::Profile::EventHandlerProfileToolTime< T >, SST::Profile::EventHandlerProfileToolTime< std::chrono::high_resolution_clock >, and SST::Profile::EventHandlerProfileToolTime< std::chrono::steady_clock >.
|
virtual |
Function that will be called to handle the key returned from registerLinkAttachTool, if the AttachPoint tool is serializable.
This is needed because the key is opaque to the Link, so it doesn't know how to handle it during serialization. During SIZE and PACK phases of serialization, the tool needs to store out any information that will be needed to recreate data that is reliant on the key. On UNPACK, the function needs to recreate any state and reinitialize the passed in key reference to the proper state to continue to make valid calls to eventSent().
Since not all tools will be serializable, there is a default, empty implementation.
ser | Serializer to use for serialization |
key | Key that would be passed into the eventSent() function. |
Reimplemented in SST::PortModule.