- The
ClockGenerator
generates clock for classes which inheritITickable
. - It is mainly used to manage update the component states since the
Component
class inheritsITickable
- This class is not managed by
GlobalEnvironment
class. TheSpacecraft
class directly has the instance of this class and execute the update function.
src/environment/global/clock_generator.cpp, .hpp
src/components/base/interface_tickable.hpp
- Make an instance of a class which inherit
ITickable
. Then, the instance is automatically registered to the component listClockGenerator::components_
. - The
Spacecraft
class calls theUpdateComponents
function to update the states of the registered components.
- Call
TickToComponents
when the component update timing flag istrue
.
- Increment count and execute the
ITickable::Tick
orITickable::FastTick
function. - They call the
component::MainRoutine
andcomponent::FastUpdate
functions, respectively.
- NA
- NA