1 #ifndef COUPLED_CLI_CONTROLLER_H_
2 #define COUPLED_CLI_CONTROLLER_H_
24 #include "../../cpp_sim/util/clock_man/Timeable.h"
25 #include "adapt2rfp/adapt2rfp.h"
60 static std::shared_ptr<CoupledCliController>
Create(
const std::string& workspace,
bool quiet);
103 std::shared_ptr<Session::SimSessionCoupled> OpenProject(
const std::string& project_name,
const std::string& file_name);
114 void SigIntHandler(
int sig);
119 #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
120 void SigQtHandler(QtMsgType type,
const QMessageLogContext&,
const QString&);
122 void SigQtHandler(QtMsgType type,
const char* msg);
128 static void UserError(
const std::string& msg);
133 static void UserMessage(
const std::string& msg);
142 void SimulationInfo(
const std::string &message,
const InfoMessageReason &reason);
147 void SimulationError(
const std::string &error);
151 typedef void (SigIntHandlerType)(int);
154 typedef UA_CoMP_Adapt2rfp::Adaptor<SigIntHandlerType> SigIntAdaptorType;
157 #if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
158 typedef void (SigQtHandlerType)(QtMsgType,
const QMessageLogContext&,
const QString&);
160 typedef void (SigQtHandlerType)(QtMsgType,
const char*);
164 typedef UA_CoMP_Adapt2rfp::Adaptor<SigQtHandlerType> SigQtAdaptorType;
168 std::shared_ptr<Ws::CliWorkspace> m_workspace_model;
174 SigIntAdaptorType m_sig_int_adaptor;
177 SigQtAdaptorType m_sig_qt_adaptor;
185 #endif // end_of_include_guard
static std::shared_ptr< CoupledCliController > Create(const std::string &workspace, bool quiet)
Create controller.
Interface/Implementation for CliTask.
void Terminate()
Request termination of the simulation.
Namespace for SimPT shell package.
InfoMessageReason
Enumeration for the reason of an emitted InfoMessage from the project.
int Execute(CliSimulationTask task)
Execute the task defined via prior SetTask call.
void TerminationRequested()
Private signal, to be used for signaling that the simulation should stop.
Timings GetTimings() const
Execution timings in duration units specified in Timeable base class.
Cli Workspace for the command-line simulator.
Collection of instances associated with an opened/running coupled project.
virtual ~CoupledCliController()
Virtual destructor.
see the online Qt documentation
A CliTask represents an invocation of the program from the command line.
Command line interface application controller.
Utility class to for timing.