SST
6.0.0
StructuralSimulationToolkit
|
SubComponent is a class loadable through the factory which allows dynamic functionality to be added to a Component. More...
#include <subcomponent.h>
Public Member Functions | |
SubComponent (Component *parent) | |
virtual void | init (unsigned int phase) |
Used during the init phase. More... | |
virtual void | setup () |
Called after all components have been constructed and inialization has completed, but before simulation time has begun. More... | |
virtual void | finish () |
Called after simulation completes, but before objects are destroyed. More... | |
Protected Member Functions | |
bool | isPortConnected (const std::string &name) const |
Determine if a port name is connected to any links. | |
Link * | configureLink (std::string name, TimeConverter *time_base, Event::HandlerBase *handler=NULL) |
Configure a Link. More... | |
Link * | configureLink (std::string name, std::string time_base, Event::HandlerBase *handler=NULL) |
Configure a Link. More... | |
Link * | configureLink (std::string name, Event::HandlerBase *handler=NULL) |
Configure a Link. More... | |
Link * | configureSelfLink (std::string name, TimeConverter *time_base, Event::HandlerBase *handler=NULL) |
Configure a SelfLink (Loopback link) More... | |
Link * | configureSelfLink (std::string name, std::string time_base, Event::HandlerBase *handler=NULL) |
Configure a SelfLink (Loopback link) More... | |
Link * | configureSelfLink (std::string name, Event::HandlerBase *handler=NULL) |
Configure a SelfLink (Loopback link) More... | |
bool | doesSubComponentInfoStatisticExist (std::string statisticName) |
template<typename T > | |
Statistic< T > * | registerStatistic (std::string statName, std::string statSubId="") |
TimeConverter * | registerClock (std::string freq, Clock::HandlerBase *handler) |
Registers a clock for this component. More... | |
TimeConverter * | registerClock (const UnitAlgebra &freq, Clock::HandlerBase *handler) |
void | unregisterClock (TimeConverter *tc, Clock::HandlerBase *handler) |
Removes a clock handler from the component. | |
Cycle_t | reregisterClock (TimeConverter *freq, Clock::HandlerBase *handler) |
Reactivates an existing Clock and Handler. More... | |
Cycle_t | getNextClockCycle (TimeConverter *freq) |
Returns the next Cycle that the TimeConverter would fire. | |
TimeConverter * | getTimeConverter (const std::string &base) |
TimeConverter * | getTimeConverter (const UnitAlgebra &base) |
SimTime_t | getCurrentSimTime (TimeConverter *tc) const |
return the time since the simulation began in units specified by the parameter. More... | |
SimTime_t | getCurrentSimTime (std::string base) |
return the 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. | |
Module * | loadModule (std::string type, Params ¶ms) |
Module * | loadModuleWithComponent (std::string type, Params ¶ms) |
SubComponent * | loadSubComponent (std::string type, Params ¶ms) |
SharedRegion * | getLocalSharedRegion (const std::string &key, size_t size) |
Find a lookup table. | |
SharedRegion * | getGlobalSharedRegion (const std::string &key, size_t size, SharedRegionMerger *merger=NULL) |
Protected Attributes | |
Component *const | parent |
Friends | |
class | Component |
Component's type, set by the factory when the object is created. More... | |
SubComponent is a class loadable through the factory which allows dynamic functionality to be added to a Component.
The SubComponent API is nearly identical to the Component API and all the calls are proxied to the parent Compoent.
|
protected |
Configure a Link.
name | - Port Name on which the link to configure is attached. |
time_base | - Time Base of the link |
handler | - Optional Handler to be called when an Event is received |
References SST::Component::configureLink().
Referenced by configureLink().
|
protected |
Configure a Link.
name | - Port Name on which the link to configure is attached. |
time_base | - Time Base of the link |
handler | - Optional Handler to be called when an Event is received |
References configureLink(), and SST::Simulation::getSimulation().
|
protected |
Configure a Link.
name | - Port Name on which the link to configure is attached. |
handler | - Optional Handler to be called when an Event is received |
References SST::Component::configureLink().
|
protected |
Configure a SelfLink (Loopback link)
name | - Name of the self-link port |
time_base | - Time Base of the link |
handler | - Optional Handler to be called when an Event is received |
References SST::Component::configureSelfLink().
|
protected |
Configure a SelfLink (Loopback link)
name | - Name of the self-link port |
time_base | - Time Base of the link |
handler | - Optional Handler to be called when an Event is received |
References SST::Component::configureSelfLink().
|
protected |
Configure a SelfLink (Loopback link)
name | - Name of the self-link port |
handler | - Optional Handler to be called when an Event is received |
References SST::Component::configureSelfLink().
|
inlinevirtual |
Called after simulation completes, but before objects are destroyed.
A good place to print out statistics.
Reimplemented in SST::Interfaces::SimpleNetwork.
|
protected |
return the time since the simulation began in units specified by the parameter.
tc | TimeConverter specificing the units |
References SST::TimeConverter::convertFromCoreTime(), and SST::Simulation::getSimulation().
Referenced by getCurrentSimTime(), getCurrentSimTimeMicro(), getCurrentSimTimeMilli(), and getCurrentSimTimeNano().
|
protected |
return the time since the simulation began in timebase specified
base | Timebase frequency in SI Units |
References getCurrentSimTime(), and SST::Simulation::getSimulation().
|
inlinevirtual |
Used during the init phase.
The method will be called each phase of initialization. Initialization ends when no components have sent any data.
Reimplemented in SST::Interfaces::SimpleNetwork.
|
protected |
Registers a clock for this component.
freq | Frequency for the clock in SI units |
handler | Pointer to Clock::HandlerBase which is to be invoked at the specified interval NOTE: Unlike Components, SubComponents do not have a default timebase |
References SST::Component::registerClock().
|
protected |
Reactivates an existing Clock and Handler.
References SST::Component::reregisterClock().
|
inlinevirtual |
Called after all components have been constructed and inialization has completed, but before simulation time has begun.
Reimplemented in SST::Interfaces::SimpleNetwork.
|
friend |
Component's type, set by the factory when the object is created.
It is identical to the configuration string used to create the component. I.e. the XML "<component id="aFoo"><foo>..." would set component::type to "foo"