SimulatorTimeServerProxy.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2013-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 ArmarXSimulation::Simulator
19 * @author Clemens Wallrath ( uagzs at student dot kit dot edu )
20 * @date 2015
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
26
27using namespace armarx;
28
32
33void
35{
36 simulator->stop();
37}
38
39void
41{
42 simulator->start();
43}
44
45void
46SimulatorTimeServerProxy::setSpeed(Ice::Float newSpeed, const Ice::Current&)
47{
48 simulator->setSpeed(newSpeed);
49}
50
51Ice::Float
53{
54 return simulator->getSpeed();
55}
56
57Ice::Long
59{
60 return simulator->getTime();
61}
62
63void
65{
66 simulator->step();
67}
68
69Ice::Int
71{
72 return simulator->getStepTimeMS();
73}
74
75std::string
77{
78 return GLOBAL_TIMESERVER_NAME;
79}
Ice::Long getTime(const Ice::Current &c=Ice::emptyCurrent) override
void start(const Ice::Current &c=Ice::emptyCurrent) override
void step(const Ice::Current &c=Ice::emptyCurrent) override
Ice::Float getSpeed(const Ice::Current &c=Ice::emptyCurrent) override
void stop(const Ice::Current &c=Ice::emptyCurrent) override
Ice::Int getStepTimeMS(const Ice::Current &c=Ice::emptyCurrent) override
void setSpeed(Ice::Float newSpeed, const Ice::Current &c=Ice::emptyCurrent) override
std::string getDefaultName() const override
Retrieve default name of component.
The Simulator class holds an instance of the AmrarXPhysicsWorld and communicates to ArmarX.
Definition Simulator.h:123
This file offers overloads of toIce() and fromIce() functions for STL container types.