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 
27 using namespace armarx;
28 
30 {
31 }
32 
33 void
34 SimulatorTimeServerProxy::stop(const Ice::Current&)
35 {
36  simulator->stop();
37 }
38 
39 void
40 SimulatorTimeServerProxy::start(const Ice::Current&)
41 {
42  simulator->start();
43 }
44 
45 void
46 SimulatorTimeServerProxy::setSpeed(Ice::Float newSpeed, const Ice::Current&)
47 {
48  simulator->setSpeed(newSpeed);
49 }
50 
53 {
54  return simulator->getSpeed();
55 }
56 
59 {
60  return simulator->getTime();
61 }
62 
63 void
64 SimulatorTimeServerProxy::step(const Ice::Current&)
65 {
66  simulator->step();
67 }
68 
71 {
72  return simulator->getStepTimeMS();
73 }
74 
75 std::string
77 {
78  return GLOBAL_TIMESERVER_NAME;
79 }
armarx::SimulatorTimeServerProxy::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: SimulatorTimeServerProxy.cpp:76
armarx::SimulatorTimeServerProxy::simulator
SimulatorPtr simulator
Definition: SimulatorTimeServerProxy.h:82
armarx::VariantType::Float
const VariantTypeId Float
Definition: Variant.h:919
armarx::SimulatorTimeServerProxy::start
void start(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:40
armarx::SimulatorTimeServerProxy::step
void step(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:64
armarx::SimulatorTimeServerProxy::getStepTimeMS
Ice::Int getStepTimeMS(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:70
armarx::SimulatorTimeServerProxy::getTime
Ice::Long getTime(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:58
armarx::SimulatorTimeServerProxy::setSpeed
void setSpeed(Ice::Float newSpeed, const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:46
armarx::SimulatorTimeServerProxy::SimulatorTimeServerProxy
SimulatorTimeServerProxy(Simulator *sim)
Definition: SimulatorTimeServerProxy.cpp:29
armarx::VariantType::Long
const VariantTypeId Long
Definition: Variant.h:918
SimulatorTimeServerProxy.h
armarx::Simulator
The Simulator class holds an instance of the AmrarXPhysicsWorld and communicates to ArmarX.
Definition: Simulator.h:118
armarx::SimulatorTimeServerProxy::stop
void stop(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:34
armarx::SimulatorTimeServerProxy::getSpeed
Ice::Float getSpeed(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:52
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:917
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27