|
SST
15.1.0
StructuralSimulationToolkit
|
Public Member Functions | |
| SST_ELI_REGISTER_PORTMODULE (TestPortModule, "coreTestElement", "portmodules.test", SST_ELI_ELEMENT_VERSION(0, 1, 0), "PortModule used for testing port module functionality") SST_ELI_DOCUMENT_PARAMS( | |
| SST_ELI_DOCUMENT_STATISTICS ({ "events_intercepted", "How many events were intercepted by the module", "count", 4 }, { "not_enabled", "A statistic that isn't enabled in tests to ensure that stat level is respected", "none", 7 }) explicit TestPortModule(Params ¶ms) | |
| void | eventSent (uintptr_t key, Event *&ev) override |
| Function that will be called when an event is sent on a link with registered PortModules. More... | |
| void | interceptHandler (uintptr_t key, Event *&data, bool &cancel) override |
| Function that will be called before the event handler to let the attach point intercept the data. More... | |
| bool | installOnReceive () override |
| Called to determine if the PortModule should be installed on receives. More... | |
| bool | installOnSend () override |
| Called to determine if the PortModule should be installed on sends. More... | |
Public Member Functions inherited from SST::PortModule | |
| SST_ELI_DECLARE_INFO_EXTERN (ELI::ProvidesParams, ELI::ProvidesStats, ELI::ProvidesAttributes) PortModule() | |
| virtual uintptr_t | registerLinkAttachTool (const AttachPointMetaData &mdata) override |
| Function that will be called when a PortModule is registered on sends (i.e. More... | |
| virtual void | serializeEventAttachPointKey (SST::Core::Serialization::serializer &ser, uintptr_t &key) override |
| Function that will be called to handle the key returned from registerLinkAttachTool, if the AttachPoint tool is serializable. More... | |
| virtual uintptr_t | registerHandlerIntercept (const AttachPointMetaData &mdata) override |
| Function that will be called when a handler is registered with recieves (i.e. More... | |
| virtual void | serializeHandlerInterceptPointKey (SST::Core::Serialization::serializer &ser, uintptr_t &key) override |
| Function that will be called to handle the key returned from registerHandlerIntercept, if the AttachPoint tool is serializable. More... | |
| const std::string & | getName () const |
Public Member Functions inherited from SST::Core::Serialization::serializable_base | |
| virtual const char * | cls_name () const =0 |
| virtual uint32_t | cls_id () const =0 |
| virtual std::string | serialization_name () const =0 |
Additional Inherited Members | |
Static Public Attributes inherited from SST::Core::Serialization::serializable | |
| static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
Static Public Attributes inherited from SST::Core::Serialization::serializable_base | |
| static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
Protected Types inherited from SST::Core::Serialization::serializable_base | |
| enum | cxn_flag_t { ConstructorFlag } |
Protected Member Functions inherited from SST::PortModule | |
| UnitAlgebra | getCoreTimeBase () const |
| Get the core timebase. | |
| SimTime_t | getCurrentSimCycle () const |
| Return the current simulation time as a cycle count. | |
| int | getCurrentPriority () const |
| Return the current priority. | |
| UnitAlgebra | getElapsedSimTime () const |
| Return the elapsed simulation time as a time. | |
| Output & | getSimulationOutput () const |
| Return the base simulation Output class instance. | |
| SimTime_t | getCurrentSimTime (TimeConverter *tc) const |
| Return the simulated time since the simulation began in units specified by the parameter. More... | |
| SimTime_t | getCurrentSimTime (TimeConverter &tc) const |
| SimTime_t | getCurrentSimTime (const std::string &base) const |
| Return the simulated time since the simulation began in timebase specified. More... | |
| SimTime_t | getCurrentSimTimeNano () const |
| Utility function to return the time since the simulation began in nanoseconds. | |
| SimTime_t | getCurrentSimTimeMicro () const |
| Utility function to return the time since the simulation began in microseconds. | |
| SimTime_t | getCurrentSimTimeMilli () const |
| Utility function to return the time since the simulation began in milliseconds. | |
| void | fatal (uint32_t line, const char *file, const char *func, int exit_code, const char *format,...) const |
| Convenience function for reporting fatal conditions. More... | |
| void | sst_assert (bool condition, uint32_t line, const char *file, const char *func, int exit_code, const char *format,...) const |
| Convenience function for testing for and reporting fatal conditions. More... | |
| template<typename T > | |
| Statistics::Statistic< T > * | registerStatistic (SST::Params ¶ms, const std::string &stat_name, const std::string &stat_sub_id="") |
| Registers a statistic. More... | |
| template<typename T > | |
| Statistics::Statistic< T > * | registerStatistic (const std::string &stat_name, const std::string &stat_sub_id="") |
| virtual std::string | getEliType () const |
Static Protected Member Functions inherited from SST::Core::Serialization::serializable_base | |
| static void | serializable_abort (uint32_t line, const char *file, const char *func, const char *obj) |
|
overridevirtual |
Function that will be called when an event is sent on a link with registered PortModules.
If ev is set to nullptr, then the event will not be delivered and the function should delete the original event.
NOTE: It is possible to delete the incoming event and replace it with a new event, if this is done, the new event MUST call copyAllDeliveryInfo(ev) or the event will not be properly processed.
| key | Opaque key returned from registerLinkAttachTool() |
| ev | Event to intercept |
Implements SST::PortModule.
|
inlineoverridevirtual |
Called to determine if the PortModule should be installed on receives.
Reimplemented from SST::PortModule.
|
inlineoverridevirtual |
Called to determine if the PortModule should be installed on sends.
NOTE: Installing PortModules on sends will have a noticeable impact on performance, consider architecting things so that you can intercept on receives.
Reimplemented from SST::PortModule.
|
overridevirtual |
Function that will be called before the event handler to let the attach point intercept the data.
The data can be modified, and if cancel is set to true, the handler will not be executed. If cancel is set to true, then the function should also delete the event and set data to nullptr.
NOTE: It is possible to delete the incoming event and replace the it with a new event, if this is done, the new event MUST call copyAllDeliveryInfo(ev) or the event will not be properly processed.
| key | Key returned from registerHandlerIntercept() function | |
| data | Event that is to be passed to the handler | |
| [out] | cancel | Set to true if the handler delivery should be cancelled. If set to true, function must also delete the event |
Implements SST::PortModule.