Helios++
Helios software for LiDAR simulations
SimulationStepLoop Class Reference

Class extending LinearVoidStepLoop to support main simulation loop. More...

#include <SimulationStepLoop.h>

Inheritance diagram for SimulationStepLoop:
Collaboration diagram for SimulationStepLoop:

Public Member Functions

 SimulationStepLoop (std::function< void(void)> f)
 Main constructor for simulation step loop. More...
 
std::size_t getFrequency () const
 
void setFrequency (std::size_t const frequency)
 
double getPeriod () const
 
double getPeriodScale () const
 
void setPeriodScale (double const periodScale)
 
double getCurrentTime () const
 Obtain the virtual time (simulation time) that elapsed to reach current step. More...
 
- Public Member Functions inherited from LinearVoidStepLoop<>
 LinearVoidStepLoop (std::function< void(StepInput ...)> f)
 Linear void step loop constructor receiving interval and computation region function.
 
bool doStep (StepInput ... input) override
 Handle current loop iteration and advances to next one without cyclic behavior. More...
 
void nextStep () override
 Advances to current loop iteration without cyclic behavior. More...
 
- Public Member Functions inherited from VoidStepLoop< StepInput ... >
 VoidStepLoop (int const stepInterval, std::function< void(StepInput ...)> f)
 Void step loop constructor receiving interval and computation region function.
 
void handleStep (StepInput ... input) override
 Implementation of StepLoop::handleStep for computation regions with void return. More...
 
- Public Member Functions inherited from StepLoop< StepInput ... >
 StepLoop (int const stepInterval)
 Step loop constructor receiving interval and computation region function.
 
virtual int getStepInterval () const
 Obtain the step interval. More...
 
virtual void setStepInterval (int const stepInterval)
 Set the step interval. More...
 
virtual int getCurrentStep () const
 Obtain the current step of the step loop. More...
 
virtual void setCurrentStep (int const currentStep)
 Set the current step for the step loop. More...
 

Protected Attributes

DiscreteTime dt
 The discrete time object to handle simulation frequency and time.
 
- Protected Attributes inherited from VoidStepLoop< StepInput ... >
std::function< void(StepInput ...)> f
 The function to be invoked when computation region function has been reached.
 
- Protected Attributes inherited from StepLoop< StepInput ... >
int stepInterval
 Specify how many simulation steps must elapse so the step loop enters its computation region. More...
 
int currentStep
 Stores the current step. More...
 

Detailed Description

Class extending LinearVoidStepLoop to support main simulation loop.

Author
Alberto M. Esmoris Pena
Version
1.0
See also
LinearVoidStepLoop
StepLoop
DiscreteTime

Constructor & Destructor Documentation

◆ SimulationStepLoop()

SimulationStepLoop::SimulationStepLoop ( std::function< void(void)>  f)
inline

Main constructor for simulation step loop.

Parameters
fThe function to compute simulation steps

Member Function Documentation

◆ getCurrentTime()

double SimulationStepLoop::getCurrentTime ( ) const
inline

Obtain the virtual time (simulation time) that elapsed to reach current step.

Returns
Virtual time (simulation time) that elapsed to reach current step

◆ getFrequency()

std::size_t SimulationStepLoop::getFrequency ( ) const
inline
See also
DiscreteTime::getFrequency

◆ getPeriod()

double SimulationStepLoop::getPeriod ( ) const
inline
See also
DiscreteTime::getPeriod

◆ getPeriodScale()

double SimulationStepLoop::getPeriodScale ( ) const
inline
See also
DiscreteTime::getPeriodScale

◆ setFrequency()

void SimulationStepLoop::setFrequency ( std::size_t const  frequency)
inline
See also
DiscreteTime::setFrequency

◆ setPeriodScale()

void SimulationStepLoop::setPeriodScale ( double const  periodScale)
inline
See also
DiscreteTime::setPeriodScale

The documentation for this class was generated from the following file: