SimulatorTimeServerProxy.h
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 
25 #pragma once
26 
28 #include <ArmarXCore/interface/core/TimeServerInterface.h>
29 
30 #include "Simulator.h"
31 
32 namespace armarx
33 {
34 
35  class Simulator;
37 
38  /**
39  * @brief The SimulatorTimeServerProxy class forwards TimeserverInterface calls to the simulator
40  * This is a hack to allow offering the proxies "Simulator" and "MasterTimeServer" at once
41  */
43  virtual public ManagedIceObject,
44  virtual public TimeServerInterface
45  {
46  public:
48 
49  // inherited from TimeServerInterface
50  void stop(const Ice::Current& c = Ice::emptyCurrent) override;
51  void start(const Ice::Current& c = Ice::emptyCurrent) override;
52  void setSpeed(Ice::Float newSpeed, const Ice::Current& c = Ice::emptyCurrent) override;
53  Ice::Float getSpeed(const Ice::Current& c = Ice::emptyCurrent) override;
54  Ice::Long getTime(const Ice::Current& c = Ice::emptyCurrent) override;
55  void step(const Ice::Current& c = Ice::emptyCurrent) override;
56  Ice::Int getStepTimeMS(const Ice::Current& c = Ice::emptyCurrent) override;
57 
58  // inherited from ManagedIceObject
59  std::string getDefaultName() const override;
60  void onInitComponent() override {}
61  void onConnectComponent() override {}
62  void onDisconnectComponent() override {}
63  void onExitComponent() override {}
64 
65  protected:
67  };
68 
70 
71 }
72 
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
The SimulatorTimeServerProxy class forwards TimeserverInterface calls to the simulator This is a hack...
Definition: SimulatorTimeServerProxy.h:42
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::SimulatorTimeServerProxy::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: SimulatorTimeServerProxy.h:60
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
IceInternal::Handle< Simulator >
armarx::SimulatorTimeServerProxy::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: SimulatorTimeServerProxy.h:63
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::SimulatorTimeServerProxy::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: SimulatorTimeServerProxy.h:61
ManagedIceObject.h
armarx::SimulatorTimeServerProxy::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: SimulatorTimeServerProxy.h:62
armarx::VariantType::Long
const VariantTypeId Long
Definition: Variant.h:917
armarx::Simulator
The Simulator class holds an instance of the AmrarXPhysicsWorld and communicates to ArmarX.
Definition: Simulator.h:124
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
armarx::SimulatorTimeServerProxy::stop
void stop(const Ice::Current &c=Ice::emptyCurrent) override
Definition: SimulatorTimeServerProxy.cpp:32
armarx::SimulatorPtr
IceInternal::Handle< Simulator > SimulatorPtr
Definition: Simulator.h:413
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
Simulator.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28