Executor.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarXCore::core
19  * @author Nicola Miskowiec
20  * @date 2016
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 
26 #include "Executor.h"
31 
32 #include <filesystem>
33 #include <sys/types.h>
34 #include <signal.h>
35 #include <chrono>
36 #include <thread>
37 
38 using namespace ScenarioManager;
39 
41 {
42  setDefaultStopStrategy(strategy);
43  setDefaultStarter(starter);
44 }
45 
46 std::future<void> Exec::Executor::startApplication(ApplicationInstancePtr application, bool printOnly, const std::string& commandLineParameters)
47 {
48  if (application->getPid() != -1 || application->getStatusWriteBlock())
49  {
50  return std::future<void>();
51  }
52 
53  application->setStatusWriteBlock(true);
54  std::packaged_task<void()> task(std::bind(&ApplicationStarter::startApplication, getStarter(application->getScenario()).get(), application, statusManager, commandLineParameters, printOnly)); // wrap the function
55 
56  std::future<void> result = task.get_future(); // get a future
57  std::thread t(std::move(task));
58  if (printOnly)
59  {
60  t.join(); //if only the commands should be printed then we want sync behaviour
61  }
62  else
63  {
64  t.detach();
65  }
66  return result;
67 }
68 
69 std::future<void> Exec::Executor::deployApplication(ApplicationInstancePtr application, bool printOnly, const std::string& commandLineParameters)
70 {
71  if (application->getPid() != -1)
72  {
73  ARMARX_ERROR_S << "Could not deploy application " << application->getName() << " because it is still running. Please Stop it before deploying";
74  return std::future<void>();
75  }
76 
77  application->setStatusWriteBlock(true);
78  std::packaged_task<void()> task(std::bind(&ApplicationStarter::deployApplication, getStarter(application->getScenario()).get(), application, statusManager, commandLineParameters, printOnly)); // wrap the function
79 
80  std::future<void> result = task.get_future(); // get a future
81  std::thread t(std::move(task));
82  t.detach();
83 
84  return result;
85 }
86 
87 
89 {
90  if (application->getStatusWriteBlock())
91  {
92  return std::future<void>();
93  }
94 
95  application->setStatusWriteBlock(true);
96  std::packaged_task<void()> task(std::bind(&StopStrategy::stop, getStopStrategy(application->getScenario()).get(), application)); // wrap the function
97  std::future<void> result = task.get_future(); // get a future
98  std::thread(std::move(task)).detach(); // launch on a thread
99 
100  return result;
101 }
102 
104 {
105  if (application->getStatusWriteBlock())
106  {
107  return std::future<void>();
108  }
109 
110  application->setStatusWriteBlock(true);
111  std::packaged_task<void()> task(std::bind(&StopStrategy::removeApplication, getStopStrategy(application->getScenario()).get(), application, statusManager)); // wrap the function
112  std::future<void> result = task.get_future(); // get a future
113  std::thread(std::move(task)).detach(); // launch on a thread
114 
115  return result;
116 }
117 
118 void Exec::Executor::asyncApplicationRestart(ApplicationInstancePtr application, bool printOnly)
119 {
120  Data_Structure::ScenarioPtr scenario = application->getScenario();
121  getStopStrategy(scenario)->stop(application);
122 
123  int waitCount = 0;
124  auto state = getStarter(scenario)->getStatus(application, statusManager);
127  {
128  std::this_thread::sleep_for(std::chrono::milliseconds(100));
129  waitCount ++;
130  //Try to stop for 20 secs
131  if (waitCount == 200)
132  {
133  ARMARX_INFO_S << "The application " << application->getName() << " is not Stopping please force kill it or try again. Aborting restart";
134  return;
135  }
136  state = getStarter(scenario)->getStatus(application, statusManager);
137  }
138 
139  ARMARX_INFO << "Starting application `" << application->getName() << "` which is `" << application->getExecutableAbsPath() << "`";
140  getStarter(scenario)->startApplication(application, statusManager, "", printOnly);
141 }
142 
143 std::future<void> Exec::Executor::restartApplication(ApplicationInstancePtr application, bool printOnly)
144 {
145  if (application->getStatusWriteBlock())
146  {
147  return std::future<void>();
148  }
149 
150  application->setStatusWriteBlock(true);
151 
152  std::packaged_task<void()> task(std::bind(&Executor::asyncApplicationRestart, this, application, printOnly)); // wrap the function
153 
154  std::future<void> result = task.get_future(); // get a future
155  std::thread(std::move(task)).detach(); // launch on a thread
156 
157  return result;
158 }
159 
161 {
162  if (application->getStatusWriteBlock())
163  {
164  return "Waiting";
165  }
166  return getStarter(application->getScenario())->getStatus(application, statusManager);
167 }
168 
169 std::future<void> Exec::Executor::startScenario(std::shared_ptr<Data_Structure::Scenario> scenario, bool printOnly, const std::string& commandLineParameters)
170 {
171  if (scenario->getStatusWriteBlock())
172  {
173  return std::future<void>();
174  }
175 
176  scenario->setStatusWriteBlock(true);
177  std::packaged_task<void()> task(std::bind(&ApplicationStarter::startScenario, getStarter(scenario).get(), scenario, statusManager, commandLineParameters, printOnly)); // wrap the function
178 
179  std::future<void> result = task.get_future(); // get a future
180  std::thread t(std::move(task)); // launch on a thread
181  if (printOnly)
182  {
183  t.join(); //if only the commands should be printed then we want sync behaviour
184  }
185  else
186  {
187  t.detach();
188  }
189  return result;
190 }
191 
192 std::future<void> Exec::Executor::deployScenario(Data_Structure::ScenarioPtr scenario, bool printOnly, const std::string& commandLineParameters)
193 {
194  if (scenario->getStatusWriteBlock())
195  {
196  return std::future<void>();
197  }
198  if (scenario->getStatus() == Data_Structure::ApplicationStatus::Running ||
199  scenario->getStatus() == Data_Structure::ApplicationStatus::Waiting ||
200  scenario->getStatus() == Data_Structure::ApplicationStatus::Mixed)
201  {
202  ARMARX_ERROR_S << "Could not deploy Scenario " << scenario->getName() << ". Please Stop the Scenario before deploying";
203  return std::future<void>();
204  }
205 
206  scenario->setStatusWriteBlock(true);
207  std::packaged_task<void()> task(std::bind(&ApplicationStarter::deployScenario, getStarter(scenario).get(), scenario, statusManager, commandLineParameters, printOnly)); // wrap the function
208 
209  std::future<void> result = task.get_future(); // get a future
210  std::thread t(std::move(task));
211  t.detach();
212 
213  return result;
214 }
215 
216 void Exec::Executor::asyncScenarioStop(Data_Structure::ScenarioPtr scenario)
217 {
218  std::vector<std::future<void>> futures;
219 
220  std::vector<ApplicationInstancePtr> apps = *scenario->getApplications();
221  for (auto it = apps.begin(); it != apps.end(); it++)
222  {
223  futures.push_back(stopApplication(*it));
224  }
225 
226  for (auto future = futures.begin(); future != futures.end(); ++future)
227  {
228  future->wait();
229  }
230 }
231 
233 {
234  std::packaged_task<void()> task(std::bind(&Executor::asyncScenarioStop, this, scenario)); // wrap the function
235  std::future<void> result = task.get_future(); // get a future
236  std::thread(std::move(task)).detach(); // launch on a thread
237 
238  return result;
239 }
240 
242 {
243  if (scenario->getStatusWriteBlock())
244  {
245  return std::future<void>();
246  }
247 
248  scenario->setStatusWriteBlock(true);
249  std::packaged_task<void()> task(std::bind(&StopStrategy::removeScenario, getStopStrategy(scenario).get(), scenario, statusManager)); // wrap the function
250  std::future<void> result = task.get_future(); // get a future
251  std::thread(std::move(task)).detach(); // launch on a thread
252 
253  return result;
254 }
255 
256 void Exec::Executor::asyncScenarioRestart(Data_Structure::ScenarioPtr scenario, bool printOnly)
257 {
258  std::vector<std::future<void>> futures;
259  for (auto app : *scenario->getApplications())
260  {
261  futures.push_back(restartApplication(app, printOnly));
262  }
263 
264  for (auto future = futures.begin(); future != futures.end(); ++future)
265  {
266  future->wait();
267  }
268 }
269 
270 std::future<void> Exec::Executor::restartScenario(Data_Structure::ScenarioPtr scenario, bool printOnly)
271 {
272  std::packaged_task<void()> task(std::bind(&Executor::asyncScenarioRestart, this, scenario, printOnly)); // wrap the function
273  std::future<void> result = task.get_future(); // get a future
274  std::thread(std::move(task)).detach(); // launch on a thread
275 
276  return result;
277 }
278 
279 void Exec::Executor::loadAndSetCachedProperties(Data_Structure::ApplicationPtr application, std::string path, bool reload, bool set)
280 {
281  std::filesystem::path xmlFilePath = std::filesystem::path(path) / std::filesystem::path(application->getPackageName() + "." + application->getName() + ".xml");
282 
283  if (reload || !std::filesystem::exists(xmlFilePath))
284  {
285  std::filesystem::create_directories(path);
286 
287  std::string strCommand = application->getExecutableAbsPath().append(" -p -f xml -o ").append(xmlFilePath.string());
288  int ret = system(strCommand.c_str());
289  if (ret != 0)
290  {
291  ARMARX_WARNING << "Failed to generate properties xml for " << application->getName() << "\nCommand was: " << strCommand;
292  }
293  }
294  else
295  {
296  application->updateFound();
297  if (!application->getFound())
298  {
299  return;
300  }
301  //if executable more recent that xml reload xml
302  auto xmlDate = (std::filesystem::last_write_time(xmlFilePath));
303 
304  auto execDate = std::filesystem::last_write_time(application->getPathToExecutable().append("/").append(application->getExecutableName()));
305 
306  if (execDate > xmlDate)
307  {
308  loadAndSetCachedProperties(application, path, true, set);
309  return;
310  }
311  }
312 
313  if (set)
314  {
316  application->setProperties(parser.loadFromXml(xmlFilePath.string()));
317  }
318 }
319 
321 {
322  defaultStopStrategy = strategy;
323 }
325 {
326  defaultStartStrategy = starter;
327 }
328 
330 {
331  this->stopStrategy[scenario] = strategy;
332 }
333 
335 {
336  this->starter[scenario] = starter;
337 }
338 
340 {
341  if (starter.count(scenario) == 0)
342  {
343  return defaultStartStrategy;
344  }
345  return starter[scenario];
346 }
347 
349 {
350  if (stopStrategy.count(scenario) == 0)
351  {
352  return defaultStopStrategy;
353  }
354  return stopStrategy[scenario];
355 }
356 
358 {
359  return getStarter(application->getScenario())->isApplicationDeployed(application);
360 }
361 
363 {
364  return getStarter(scenario)->isScenarioDeployed(scenario);
365 }
366 
368 {
369  return defaultStopStrategy;
370 }
ScenarioManager::Exec::Executor::setStopStrategy
void setStopStrategy(StopStrategyPtr strategy, Data_Structure::ScenarioPtr scenario)
Definition: Executor.cpp:329
ScenarioManager::Exec::Executor::setDefaultStopStrategy
void setDefaultStopStrategy(StopStrategyPtr strategy)
Sets the strategy this Executor uses to stop applications.
Definition: Executor.cpp:320
ScenarioManager::Data_Structure::ApplicationInstancePtr
std::shared_ptr< ApplicationInstance > ApplicationInstancePtr
Definition: ApplicationInstance.h:33
armarx::aron::ret
ReaderT::InputType T & ret
Definition: rw.h:21
ScenarioManager::Data_Structure::ScenarioPtr
std::shared_ptr< Scenario > ScenarioPtr
Definition: Scenario.h:36
iceparser.h
ScenarioManager::Exec::Executor::removeApplication
std::future< void > removeApplication(Data_Structure::ApplicationInstancePtr application)
Definition: Executor.cpp:103
ScenarioManager::Exec::Executor::getStarter
ApplicationStarterPtr getStarter(Data_Structure::ScenarioPtr scenario)
Definition: Executor.cpp:339
ScenarioManager::Exec::Executor::restartApplication
std::future< void > restartApplication(Data_Structure::ApplicationInstancePtr application, bool printOnly=false)
Restarts an application.
Definition: Executor.cpp:143
ScenarioManager::Data_Structure::ApplicationPtr
std::shared_ptr< Application > ApplicationPtr
Definition: Application.h:119
ScenarioManager::Parser::IceParser
Definition: iceparser.h:37
ScenarioManager::Exec::Executor::stopApplication
std::future< void > stopApplication(Data_Structure::ApplicationInstancePtr application)
Stops an application.
Definition: Executor.cpp:88
IceStarter.h
ScenarioManager::Exec::Executor::setStarter
void setStarter(ApplicationStarterPtr starter, Data_Structure::ScenarioPtr scenario)
Definition: Executor.cpp:334
ScenarioManager::Exec::StopStrategy::stop
virtual void stop(Data_Structure::ApplicationInstancePtr application)=0
Stops an application.
ScenarioManager::Exec::StopStrategyPtr
std::shared_ptr< StopStrategy > StopStrategyPtr
Definition: Executor.h:46
ScenarioManager::Exec::StopStrategy::removeScenario
virtual void removeScenario(Data_Structure::ScenarioPtr scenario, StatusManager statusManager)
Definition: StopStrategy.cpp:43
ScenarioManager::Exec::Executor::setDefaultStarter
void setDefaultStarter(ApplicationStarterPtr starter)
Sets the starter this Executor uses to start applications and request statuses.
Definition: Executor.cpp:324
ScenarioManager::Data_Structure::ApplicationStatus::Stopped
static const std::string Stopped
Definition: ApplicationInstance.h:47
ScenarioManager::Exec::Executor::startApplication
std::future< void > startApplication(Data_Structure::ApplicationInstancePtr application, bool printOnly=false, const std::string &commandLineParameters="")
Starts an application.
Definition: Executor.cpp:46
ScenarioManager::Exec::Executor::getApplicationStatus
std::string getApplicationStatus(Data_Structure::ApplicationInstancePtr application)
Returns the status of an application.
Definition: Executor.cpp:160
ScenarioManager::Data_Structure::ApplicationStatus::Running
static const std::string Running
Definition: ApplicationInstance.h:48
ApplicationInstancePtr
std::shared_ptr< ScenarioManager::Data_Structure::ApplicationInstance > ApplicationInstancePtr
Definition: StopStrategy.h:7
ScenarioManager::Exec::Executor::stopScenario
std::future< void > stopScenario(Data_Structure::ScenarioPtr scenario)
Stops a scenario.
Definition: Executor.cpp:232
ScenarioManager::Exec::Executor::getStopStrategy
StopStrategyPtr getStopStrategy(Data_Structure::ScenarioPtr scenario)
Definition: Executor.cpp:348
ARMARX_ERROR_S
#define ARMARX_ERROR_S
Definition: Logging.h:209
Executor.h
ScenarioManager::Data_Structure::ApplicationStatus::Waiting
static const std::string Waiting
Definition: ApplicationInstance.h:49
ScenarioManager::Exec::Executor::isScenarioDeployed
bool isScenarioDeployed(Data_Structure::ScenarioPtr scenario)
Definition: Executor.cpp:362
ScenarioManager::Data_Structure::ApplicationStatus::Inactive
static const std::string Inactive
Definition: ApplicationInstance.h:52
ScenarioManager::Data_Structure::ApplicationStatus::Mixed
static const std::string Mixed
Definition: ApplicationInstance.h:50
ScenarioManager::Exec::ApplicationStarterPtr
std::shared_ptr< ApplicationStarter > ApplicationStarterPtr
Definition: ApplicationStarter.h:70
ScenarioManager::Exec::ApplicationStarter::deployScenario
virtual void deployScenario(Data_Structure::ScenarioPtr scenario, StatusManager statusManager, const std::string &commandLineParameters="", bool printOnly=false)=0
ScenarioManager::Exec::Executor::deployScenario
std::future< void > deployScenario(Data_Structure::ScenarioPtr scenario, bool printOnly=false, const std::string &commandLineParameters="")
Definition: Executor.cpp:192
ScenarioManager::Exec::ApplicationStarter::startScenario
virtual void startScenario(Data_Structure::ScenarioPtr scenario, StatusManager statusManager, const std::string &commandLineParameters="", bool printOnly=false)=0
IceStorm::parser
Parser * parser
Definition: Parser.cpp:33
ScenarioManager
Definition: Application.cpp:166
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
ScenarioManager::Exec::Executor::removeScenario
std::future< void > removeScenario(Data_Structure::ScenarioPtr scenario)
Definition: Executor.cpp:241
set
set(LIBS ArmarXCoreInterfaces ${CMAKE_THREAD_LIBS_INIT} ${dl_LIBRARIES} ${rt_LIBRARIES} ${QT_LIBRARIES} ${Boost_LIBRARIES} BoostAssertionHandler ArmarXCPPUtility SimoxUtility) set(LIB_FILES ArmarXManager.cpp ArmarXMultipleObjectsScheduler.cpp ArmarXObjectScheduler.cpp ManagedIceObject.cpp ManagedIceObjectPlugin.cpp Component.cpp ComponentPlugin.cpp IceGridAdmin.cpp ArmarXObjectObserver.cpp IceManager.cpp PackagePath.cpp RemoteReferenceCount.cpp logging/LoggingUtil.cpp logging/Logging.cpp logging/LogSender.cpp logging/ArmarXLogBuf.cpp system/ArmarXDataPath.cpp system/DynamicLibrary.cpp system/ProcessWatcher.cpp system/FactoryCollectionBase.cpp system/cmake/CMakePackageFinder.cpp system/cmake/CMakePackageFinderCache.cpp system/cmake/ArmarXPackageToolInterface.cpp system/RemoteObjectNode.cpp services/sharedmemory/HardwareId.cpp services/tasks/RunningTask.cpp services/tasks/ThreadList.cpp services/tasks/ThreadPool.cpp services/profiler/Profiler.cpp services/profiler/FileLoggingStrategy.cpp services/profiler/IceLoggingStrategy.cpp application/Application.cpp application/ApplicationOptions.cpp application/ApplicationProcessFacet.cpp application/ApplicationNetworkStats.cpp application/properties/PropertyUser.cpp application/properties/Property.cpp application/properties/PropertyDefinition.cpp application/properties/PropertyDefinitionContainer.cpp application/properties/PropertyDefinitionHelpFormatter.cpp application/properties/PropertyDefinitionConfigFormatter.cpp application/properties/PropertyDefinitionBriefHelpFormatter.cpp application/properties/PropertyDefinitionXmlFormatter.cpp application/properties/PropertyDefinitionDoxygenFormatter.cpp application/properties/PropertyDefinitionDoxygenComponentPagesFormatter.cpp application/properties/PropertyDefinitionContainerBriefHelpFormatter.cpp application/properties/IceProperties.cpp exceptions/Exception.cpp exceptions/local/UnexpectedEnumValueException.cpp util/FileSystemPathBuilder.cpp util/StringHelpers.cpp util/IceReportSkipper.cpp util/Throttler.cpp util/distributed/AMDCallbackCollection.cpp util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.cpp util/distributed/RemoteHandle/RemoteHandle.cpp util/distributed/RemoteHandle/RemoteHandleControlBlock.cpp time/ice_conversions.cpp time/json_conversions.cpp time/CallbackWaitLock.cpp time/Clock.cpp time/ClockType.cpp time/ClockTypeNames.cpp time/CycleUtil.cpp time/DateTime.cpp time/Duration.cpp time/Frequency.cpp time/LocalTimeServer.cpp time/Metronome.cpp time/ScopedStopWatch.cpp time/StopWatch.cpp time/Timer.cpp time/TimeKeeper.cpp time/TimeUtil.cpp csv/CsvWriter.cpp csv/CsvReader.cpp eigen/conversions.cpp eigen/ice_conversions.cpp) set(LIB_HEADERS ArmarXManager.h ArmarXDummyManager.h ArmarXMultipleObjectsScheduler.h ArmarXObjectObserver.h ArmarXObjectScheduler.h ArmarXFwd.h Component.h ComponentPlugin.h ComponentFactories.h CoreObjectFactories.h IceGridAdmin.h IceManager.h IceManagerImpl.h json_conversions.h ManagedIceObject.h ManagedIceObjectPlugin.h ManagedIceObjectImpl.h ManagedIceObjectDependency.h ManagedIceObjectRegistryInterface.h PackagePath.h RemoteReferenceCount.h system/ImportExport.h system/ImportExportComponent.h system/AbstractFactoryMethod.h system/FactoryCollectionBase.h system/Synchronization.h system/ArmarXDataPath.h system/DynamicLibrary.h system/ProcessWatcher.h system/ConditionSynchronization.h system/cmake/CMakePackageFinder.h system/cmake/CMakePackageFinderCache.h system/cmake/FindPackageX.cmake system/cmake/ArmarXPackageToolInterface.h system/RemoteObjectNode.h logging/LoggingUtil.h logging/LogSender.h logging/Logging.h logging/ArmarXLogBuf.h logging/SpamFilterData.h services/tasks/RunningTask.h services/tasks/PeriodicTask.h services/tasks/ThreadList.h services/tasks/TaskUtil.h services/tasks/ThreadPool.h services/sharedmemory/SharedMemoryProvider.h services/sharedmemory/SharedMemoryConsumer.h services/sharedmemory/IceSharedMemoryProvider.h services/sharedmemory/IceSharedMemoryConsumer.h services/sharedmemory/HardwareIdentifierProvider.h services/sharedmemory/HardwareId.h services/sharedmemory/exceptions/SharedMemoryExceptions.h services/profiler/Profiler.h services/profiler/LoggingStrategy.h services/profiler/FileLoggingStrategy.h services/profiler/IceLoggingStrategy.h application/Application.h application/ApplicationOptions.h application/ApplicationProcessFacet.h application/ApplicationNetworkStats.h application/properties/forward_declarations.h application/properties/Properties.h application/properties/Property.h application/properties/PluginEigen.h application/properties/PluginEnumNames.h application/properties/PluginCfgStruct.h application/properties/PluginAll.h application/properties/PropertyUser.h application/properties/PropertyDefinition.h application/properties/PropertyDefinition.hpp application/properties/PropertyDefinitionInterface.h application/properties/PropertyDefinitionContainer.h application/properties/PropertyDefinitionFormatter.h application/properties/PropertyDefinitionContainerFormatter.h application/properties/PropertyDefinitionConfigFormatter.h application/properties/PropertyDefinitionHelpFormatter.h application/properties/PropertyDefinitionBriefHelpFormatter.h application/properties/PropertyDefinitionXmlFormatter.h application/properties/PropertyDefinitionDoxygenFormatter.h application/properties/PropertyDefinitionDoxygenComponentPagesFormatter.h application/properties/PropertyDefinitionContainerBriefHelpFormatter.h application/properties/ProxyPropertyDefinition.h application/properties/IceProperties.h exceptions/Exception.h exceptions/LocalException.h exceptions/local/DynamicLibraryException.h exceptions/local/ExpressionException.h exceptions/local/FileIOException.h exceptions/local/InvalidPropertyValueException.h exceptions/local/MissingRequiredPropertyException.h exceptions/local/PropertyInheritanceCycleException.h exceptions/local/ProxyNotInitializedException.h exceptions/local/UnexpectedEnumValueException.h exceptions/local/UnmappedValueException.h exceptions/local/ValueRangeExceededException.h exceptions/user/NotImplementedYetException.h rapidxml/rapidxml.hpp rapidxml/rapidxml_print.hpp rapidxml/rapidxml_iterators.hpp rapidxml/rapidxml_utils.hpp rapidxml/wrapper/RapidXmlReader.h rapidxml/wrapper/RapidXmlWriter.h rapidxml/wrapper/DefaultRapidXmlReader.h rapidxml/wrapper/MultiNodeRapidXMLReader.h util/IceBlobToObject.h util/ObjectToIceBlob.h util/FileSystemPathBuilder.h util/FiniteStateMachine.h util/StringHelpers.h util/StringHelperTemplates.h util/algorithm.h util/OnScopeExit.h util/Predicates.h util/Preprocessor.h util/PropagateConst.h util/Registrar.h util/TemplateMetaProgramming.h util/TripleBuffer.h util/IceReportSkipper.h util/Throttler.h util/distributed/AMDCallbackCollection.h util/distributed/RemoteHandle/ClientSideRemoteHandleControlBlock.h util/distributed/RemoteHandle/RemoteHandle.h util/distributed/RemoteHandle/RemoteHandleControlBlock.h util/SimpleStatemachine.h time.h time_minimal.h time/forward_declarations.h time/ice_conversions.h time/json_conversions.h time/CallbackWaitLock.h time/Clock.h time/ClockType.h time/ClockTypeNames.h time/CycleUtil.h time/DateTime.h time/Duration.h time/Frequency.h time/LocalTimeServer.h time/Metronome.h time/ScopedStopWatch.h time/StopWatch.h time/Timer.h time/TimeUtil.h time/TimeKeeper.h csv/CsvWriter.h csv/CsvReader.h eigen/conversions.h eigen/ice_conversions.h ice_conversions.h ice_conversions/ice_conversions_boost_templates.h ice_conversions/ice_conversions_templates.h ice_conversions/ice_conversions_templates.tpp $
Definition: CMakeLists.txt:12
ScenarioManager::Exec::Executor::deployApplication
std::future< void > deployApplication(Data_Structure::ApplicationInstancePtr application, bool printOnly=false, const std::string &commandLineParameters="")
Definition: Executor.cpp:69
ARMARX_INFO_S
#define ARMARX_INFO_S
Definition: Logging.h:195
ScenarioManager::Exec::Executor::isApplicationDeployed
bool isApplicationDeployed(Data_Structure::ApplicationInstancePtr application)
Definition: Executor.cpp:357
Logging.h
ScenarioManager::Exec::Executor::Executor
Executor(StopStrategyPtr strategy, ApplicationStarterPtr starter)
Constructor that sets StopStrategy and ApplicationStarter.
Definition: Executor.cpp:40
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
ScenarioManager::Exec::Executor::getDefaultStopStrategy
StopStrategyPtr getDefaultStopStrategy()
Definition: Executor.cpp:367
ScenarioManager::Exec::Executor::restartScenario
std::future< void > restartScenario(Data_Structure::ScenarioPtr scenario, bool printOnly=false)
Restarts a scenario.
Definition: Executor.cpp:270
ScenarioManager::Exec::Executor::loadAndSetCachedProperties
void loadAndSetCachedProperties(Data_Structure::ApplicationPtr application, std::string path, bool reload=false, bool set=true)
Generates an XML file of the given application and saves it in the specified path.
Definition: Executor.cpp:279
ScenarioManager::Exec::StopStrategy::removeApplication
virtual void removeApplication(Data_Structure::ApplicationInstancePtr application, StatusManager statusManager)
Definition: StopStrategy.cpp:37
Exception.h
ScenarioManager::Exec::ApplicationStarter::deployApplication
virtual void deployApplication(Data_Structure::ApplicationInstancePtr application, StatusManager statusManager, const std::string &commandLineParameters="", bool printOnly=false)=0
ScenarioManager::Exec::Executor::startScenario
std::future< void > startScenario(Data_Structure::ScenarioPtr scenario, bool printOnly=false, const std::string &commandLineParameters="")
Starts a scenario.
Definition: Executor.cpp:169
ScenarioManager::Exec::ApplicationStarter::startApplication
virtual void startApplication(Data_Structure::ApplicationInstancePtr application, StatusManager statusManager, const std::string &commandLineParameters="", bool printOnly=false)=0
Starts an application.