SST
14.0.0
StructuralSimulationToolkit
|
Class for creating and managing TimeConverter objects. More...
#include <timeLord.h>
Public Member Functions | |
TimeConverter * | getTimeConverter (const std::string &ts) |
Create a new TimeConverter object using specified SI Units. More... | |
TimeConverter * | getTimeConverter (const UnitAlgebra &ts) |
Create a new TimeConverter object using the specified units. More... | |
UnitAlgebra | getTimeBase () const |
TimeConverter * | getNano () |
TimeConverter * | getMicro () |
TimeConverter * | getMilli () |
SimTime_t | getSimCycles (const std::string &timeString, const std::string &where) |
Not a Public API. More... | |
void | serialize_order (SST::Core::Serialization::serializer &ser) override |
friend | int ::main (int argc, char **argv) |
void | init (const std::string &timeBaseString) |
TimeConverter * | getTimeConverter (SimTime_t simCycles) |
TimeLord (TimeLord const &) | |
void | operator= (TimeLord const &) |
Public Member Functions inherited from SST::Core::Serialization::serializable | |
virtual const char * | cls_name () const =0 |
virtual uint32_t | cls_id () const =0 |
virtual std::string | serialization_name () const =0 |
Data Fields | |
bool | initialized |
std::recursive_mutex | slock |
std::string | timeBaseString |
TimeConverterMap_t | tcMap |
UnitAlgebra | timeBase |
StringToTCMap_t | parseCache |
TimeConverter * | nano |
TimeConverter * | micro |
TimeConverter * | milli |
Friends | |
class | SST::Link |
Additional Inherited Members | |
Static Public Attributes inherited from SST::Core::Serialization::serializable | |
static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
Protected Types inherited from SST::Core::Serialization::serializable | |
enum | cxn_flag_t { ConstructorFlag } |
Static Protected Member Functions inherited from SST::Core::Serialization::serializable | |
static void | serializable_abort (uint32_t line, const char *file, const char *func, const char *obj) |
Class for creating and managing TimeConverter objects.
|
inline |
Referenced by SST::BaseComponent::getCurrentSimTimeMicro().
|
inline |
Referenced by SST::BaseComponent::getCurrentSimTimeMilli().
|
inline |
Referenced by SST::BaseComponent::getCurrentSimTimeNano().
SimTime_t SST::TimeLord::getSimCycles | ( | const std::string & | timeString, |
const std::string & | where | ||
) |
Not a Public API.
Returns the number of raw simulation cycles given by a specified time string
References SST::TimeConverter::getFactor(), and getTimeConverter().
Referenced by SST::Link::addRecvLatency(), SST::Link::addSendLatency(), and SST::Simulation_impl::setStopAtCycle().
|
inline |
Referenced by SST::BaseComponent::getCoreTimeBase(), and SST::TimeConverter::getPeriod().
TimeConverter * SST::TimeLord::getTimeConverter | ( | const std::string & | ts | ) |
Create a new TimeConverter object using specified SI Units.
For example, "1 Ghz" (1 Gigahertz), "2.5 ns" (2.5 nanoseconds).
ts | String indicating the base unit for this object. The string should be a floating point number followed by a prefix, and then frequency (i.e. Hz) or time unit (s). Allowable seconds prefixes are: 'f' (fempto), 'p' (pico), 'n' (nano), 'u' (micro), 'm' (milli). Allowable frequency prefixes are 'k' (kilo), 'M' (mega), and 'G' (giga). |
Referenced by SST::BaseComponent::getCurrentSimTime(), SST::Link::getDefaultTimeBase(), getSimCycles(), getTimeConverter(), SST::Simulation_impl::registerClock(), and SST::BaseComponent::registerTimeBase().
TimeConverter * SST::TimeLord::getTimeConverter | ( | const UnitAlgebra & | ts | ) |
Create a new TimeConverter object using the specified units.
ts | UnitAlgebra object indicating the base unit for this object. |
References SST::Output::fatal(), SST::UnitAlgebra::getRoundedValue(), getTimeConverter(), SST::UnitAlgebra::getValue(), SST::UnitAlgebra::hasUnits(), SST::UnitAlgebra::invert(), and SST::UnitAlgebra::toStringBestSI().