DPsim
Loading...
Searching...
No Matches
RealTimeSimulation.h
Go to the documentation of this file.
1
/* Copyright 2017-2021 Institute for Automation of Complex Power Systems,
2
* EONERC, RWTH Aachen University
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7
*********************************************************************************/
8
9
#pragma once
10
11
#include <signal.h>
12
13
#include <chrono>
14
15
#include <dpsim/Config.h>
16
#include <
dpsim/Simulation.h
>
17
#include <
dpsim/Timer.h
>
18
19
namespace
DPsim
{
21
class
RealTimeSimulation
:
public
Simulation
{
22
23
protected
:
24
Timer
mTimer
;
25
26
public
:
27
RealTimeSimulation
(
String
name
,
CommandLineArgs
&args);
29
RealTimeSimulation
(
String
name
,
30
CPS::Logger::Level
logLevel = CPS::Logger::Level::info);
31
36
void
37
run
(
const
Timer::StartClock::duration &startIn = std::chrono::seconds(1));
38
39
void
run
(
const
Timer::StartClock::time_point &startAt);
40
41
void
run
(
Int
startIn) {
run
(std::chrono::seconds(startIn)); }
42
};
43
}
// namespace DPsim
Simulation.h
Timer.h
CPS::Logger::Level
spdlog::level::level_enum Level
Definition
Logger.h:33
DPsim::CommandLineArgs
Definition
Utils.h:37
DPsim::RealTimeSimulation::RealTimeSimulation
RealTimeSimulation(String name, CommandLineArgs &args)
Definition
RealTimeSimulation.cpp:18
DPsim::RealTimeSimulation::run
void run(Int startIn)
Definition
RealTimeSimulation.h:41
DPsim::RealTimeSimulation::mTimer
Timer mTimer
Definition
RealTimeSimulation.h:24
DPsim::Simulation::name
String name() const
Definition
Simulation.h:339
DPsim::Simulation::Simulation
Simulation(String name, CommandLineArgs &args)
Creates simulation with name and CommandLineArgs.
Definition
Simulation.cpp:51
DPsim::Simulation::run
void run()
Run simulation until total time is elapsed.
Definition
Simulation.cpp:465
DPsim::Timer
Definition
Timer.h:18
DPsim
Definition
DenseLUAdapter.cpp:13
DPsim::String
CPS::String String
Definition
Definitions.h:20
DPsim::Int
CPS::Int Int
Definition
Definitions.h:22
dpsim
include
dpsim
RealTimeSimulation.h
Generated by
1.13.2