Go to the documentation of this file.
34 stepTimeMS = getProperty<int>(
"TimeStepMS").getValue();
41 timeTopicPrx = armarx::ManagedIceObject::getTopic<TimeServerListenerPrx>(TIME_TOPIC_NAME);
93 ARMARX_DEBUG <<
"Setting TimeServer clock speed to " << newSpeed;
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 stop()
stops the clock.
void onDisconnectComponent() override
void onExitComponent() override
void stop(const ::Ice::Current &=Ice::emptyCurrent) override
~ArmarXTimeserver() override
void step(IceUtil::Time stepSize)
adds a timedelta to the current time
void onConnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void setSpeed(float newSpeed)
sets the speed factor of the clock
Ice::Long getTime(const ::Ice::Current &=Ice::emptyCurrent) override
getTime returns the current (simulator) time as milliseconds (as in IceUtil::Time::toMilliSeconds)
int stepTimeMS
time the clock advances dirung one call of step() in milliseconds
std::string getConfigDomain()
Retrieve config domain for this component as set in constructor.
void setSpeed(Ice::Float newSpeed, const ::Ice::Current &=Ice::emptyCurrent) override
IceUtil::Time getTime() const
get the current time of this clock
Ice::Float getSpeed(const ::Ice::Current &=Ice::emptyCurrent) override
void offeringTopic(const std::string &name)
Registers a topic for retrival after initialization.
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"
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
void start(const ::Ice::Current &=Ice::emptyCurrent) override
void start()
starts the clock
This file offers overloads of toIce() and fromIce() functions for STL container types.
Ice::Int getStepTimeMS(const ::Ice::Current &=Ice::emptyCurrent) override