20#ifndef _MAPPING_TIME_MODULE_HEADER
21#define _MAPPING_TIME_MODULE_HEADER
56 SimulationTimeFunction() =
delete;
65 std::shared_ptr<SimTimeSource> sim_time_source);
68 std::shared_ptr<Function::Callable>
getCallable()
const override;
72 enum class Resolution : uint8_t { us = 0, ms = 1, ns = 2, s = 3 };
75 std::shared_ptr<SimTimeSource> _sim_time_source;
84 SimulationTimeFunctionFactory() =
delete;
90 std::shared_ptr<SimulationTimeFunction::SimTimeSource> sim_time_source)
91 : _sim_time_source(std::move(sim_time_source))
97 return "simulation_time";
102 return {{
"resolution", {
"us"}}};
105 std::shared_ptr<Function>
make(std::string name,
Properties properties)
const override
107 return std::make_shared<SimulationTimeFunction>(
108 name, std::move(properties), _sim_time_source);
112 std::shared_ptr<SimulationTimeFunction::SimTimeSource> _sim_time_source;
std::unordered_map< std::string, ParameterDescription > Description
Definition mapper_interfaces.h:593
MapperElementBase(std::string name, Properties properties)
Definition mapper_base_types.h:43
SimulationTimeFunctionFactory(std::shared_ptr< SimulationTimeFunction::SimTimeSource > sim_time_source)
CTOR of factory.
Definition time_function.h:89
std::shared_ptr< Function > make(std::string name, Properties properties) const override
Factory create function which creates a Source, Target or Function instance with a name and intialize...
Definition time_function.h:105
std::string getType() const override
Get the Type as string.
Definition time_function.h:95
Properties getDefaultProperties() const override
Get the default properties to initialize the Source, Target or Function with.
Definition time_function.h:100
std::shared_ptr< Function::Callable > getCallable() const override
Get a Function Callable.
Resolution
The resolution of the value that is returned by a function call.
Definition time_function.h:72
SimulationTimeFunction(std::string name, Properties properties, std::shared_ptr< SimTimeSource > sim_time_source)
CTOR.
Function::Description getDescription() const override
Get the parameter descriptions.
definition of the mapping namespace
Definition ddl.h:50
std::unordered_map< std::string, Property > Properties
Properties class as set of key - property value pairs This proerties are used to adjust the readers a...
Definition mapper_interfaces.h:331
SpecificMapperFactory< Function > FunctionFactory
A Function factory to create a Function.
Definition mapper_interfaces.h:610
definition of the ddl namespace
Definition codec.h:21
virtual ~SimTimeSource()=default
DTOR.
virtual std::chrono::nanoseconds getCurrentSimTime() const =0
Get the Current Sim Time.
SimTimeSource()=default
CTOR.