2
3
4
5
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21#ifndef SIM_SCHEDULER_H
22#define SIM_SCHEDULER_H
26#include "architecture/Scheduler.h"
27#include "simulation/SimTimeManager.h"
28#include "core/clockwerkerrors.h"
29#include "models/support/SixDOFDynamicsModel.h"
30#include "six_dof_dynamics/Frame.hpp"
112 void logLevel(clockwerk::log_level_e new_level) {_local_log_level = new_level;}
124 std::vector<clockwerk::
Task*> _startup;
125 std::vector<std::vector<clockwerk::
Task*>> _start_step;
126 std::vector<std::vector<clockwerk::
Task*>> _derivative;
127 std::vector<std::vector<clockwerk::
Task*>> _end_step;
140 bool _is_first_step =
true;
141 clockwerk::
Time _sim_time_step;
142 clockwerk::
Time _real_time_step;
143 clockwerk::
Time _next_time;
#define NSEC_MAX
Definition Time.h:35
DataIO(GraphTreeObject *data_parent, std::string data_name, T initial_value)
Constructor for the DataIO object.
Definition DataIO.hpp:134
Central control mechanism to run simulations and software.
Definition Executive.h:43
Frame class definition.
Definition Frame.hpp:92
Base class implementation of the scheduler.
Definition Scheduler.h:48
This is the base implementation of the task class.
Definition Tasks.h:68
Wrapper to manage and convert time as timespce.
Definition Time.h:45
Time()
Default, copy constructors and default destructor.
Definition Time.h:48
Simple implementation of the scheduler class.
Definition SimScheduler.h:47
void terminate()
Function to set the scheduler for termination.
Definition SimScheduler.h:104
virtual bool isTerminated()
Function to indicate whether the scheduler is terminated.
Definition SimScheduler.h:108
SimScheduler(clockwerk::Executive &executive)
Constructor for the scheduler.
Definition SimScheduler.cpp:27
int startup()
Function to start and configure the scheduler prior to run.
Definition SimScheduler.cpp:56
modelspace::SimTimeManager time
Time manager to handle all time in the scheduler.
Definition SimScheduler.h:115
bool _is_terminated
Variable to terminate the simulation. The simulation run function terminates when this flag is set.
Definition SimScheduler.h:131
int run()
Function to run the scheduler until pre-determined end conditions identified/calculated by the schedu...
Definition SimScheduler.cpp:214
void logLevel(clockwerk::log_level_e new_level)
Function to set the local model log level.
Definition SimScheduler.h:112
virtual int registerTask(clockwerk::Task *task) override
Function to register tasks with the scheduler. Depending on the scheduler implementation these may be...
Definition SimScheduler.cpp:50
int _executeTaskThread(std::vector< clockwerk::Task * > &task_thread)
Function to execute a single task thread.
Definition SimScheduler.cpp:237
std::vector< clockwerk::Task * > _all_tasks
Vectors to store the sequences for each element of the simulation scheduler.
Definition SimScheduler.h:123
SixDOFDynamicsModel _dynamics
Our 6-DOF dynamics model.
Definition SimScheduler.h:137
int _error
Variable to catch errors from stuff.
Definition SimScheduler.h:134
int step(const clockwerk::Time &step_size=clockwerk::Time(0, 999999999+1))
Function to step the scheduler by a single step.
Definition SimScheduler.cpp:131
Class to manage time for the simulation object.
Definition SimTimeManager.h:45
Model to implement 6-DOF dynamics.
Definition SixDOFDynamicsModel.h:72
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition macros.h:87
#define START_PARAMS
Definition macros.h:96
#define END_OUTPUTS
Definition macros.h:90
#define END_PARAMS
Definition macros.h:98
#define START_OUTPUTS
Definition macros.h:88
#define END_INPUTS
Definition macros.h:94
#define START_INPUTS
Definition macros.h:92
Class to propagate CR3BP dynamics in characteristic units.
Definition ConfigurationWriter.cpp:18
clockwerk::DataIO< clockwerk::Time > exit_time
The time at which the last scheduler step was exited. Does not change wrt max_real_time_multiple.
Definition SimScheduler.h:72
clockwerk::DataIO< clockwerk::Time > entry_time
The time at which the last scheduler step was entered.
Definition SimScheduler.h:70
clockwerk::DataIO< int > integrator_type
The integrator type for the scheduler. Sets how models are integrated.
Definition SimScheduler.h:52
clockwerk::DataIO< clockwerk::Frame< double > * > root_frame_ptr
This is a pointer to the simulation's root frame. Sets frame for dynamics model.
Definition SimScheduler.h:54
clockwerk::DataIO< int > max_real_time_multiple
The maximum multiple of real time at which the sim will run on a single step. For example,...
Definition SimScheduler.h:60