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