Go to the documentation of this file.
30 #include <ArmarXCore/interface/core/TimeServerInterface.h>
47 defineOptionalProperty<int>(
"TimeStepMS", 1,
"The number of milliseconds the time advances with every step()")
61 virtual public TimeServerInterface
69 return GLOBAL_TIMESERVER_NAME;
93 void stop(const ::Ice::Current& = Ice::emptyCurrent)
override;
94 void start(const ::Ice::Current& = Ice::emptyCurrent)
override;
99 void step(const ::Ice::Current& = Ice::emptyCurrent)
override;
100 void setSpeed(
Ice::Float newSpeed, const ::Ice::Current& = Ice::emptyCurrent)
override;
The TimeKeeper class tracks the passing of time and allows to stop it, restart it,...
void broadcastTime()
periodically writes the current time to the "Time" topic
PeriodicTask< ArmarXTimeserver >::pointer_type broadcastTimeTask
broadcastTimeTask calls broadcastTime() periodically
const VariantTypeId Float
void onDisconnectComponent() override
void onExitComponent() override
void stop(const ::Ice::Current &=Ice::emptyCurrent) override
~ArmarXTimeserver() override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
simple implementation of the TimeserverInterface
ArmarXTimeserverPropertyDefinitions(std::string prefix)
void onConnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Ice::Long getTime(const ::Ice::Current &=Ice::emptyCurrent) override
getTime returns the current (simulator) time as milliseconds (as in IceUtil::Time::toMilliSeconds)
std::string getDefaultName() const override
int stepTimeMS
time the clock advances dirung one call of step() in milliseconds
void setSpeed(Ice::Float newSpeed, const ::Ice::Current &=Ice::emptyCurrent) override
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Ice::Float getSpeed(const ::Ice::Current &=Ice::emptyCurrent) override
Default component property definition container.
void onInitComponent() override
void step(const ::Ice::Current &=Ice::emptyCurrent) override
step() advances the time by the value of ArmarX.ArmarXTimeserver.StepTimeMS (in milliseconds) the def...
TimeServerListenerPrx timeTopicPrx
a handle for the topic "Time"
void start(const ::Ice::Current &=Ice::emptyCurrent) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
Ice::Int getStepTimeMS(const ::Ice::Current &=Ice::emptyCurrent) override