31#include <ArmarXCore/interface/core/TimeServerInterface.h>
46 "TimeStepMS", 1,
"The number of milliseconds the time advances with every step()")
67 return GLOBAL_TIMESERVER_NAME;
89 Ice::Long
getTime(const ::Ice::Current& = Ice::emptyCurrent)
override;
90 void stop(const ::Ice::Current& = Ice::emptyCurrent)
override;
91 void start(const ::Ice::Current& = Ice::emptyCurrent)
override;
96 void step(const ::Ice::Current& = Ice::emptyCurrent)
override;
97 void setSpeed(Ice::Float newSpeed, const ::Ice::Current& = Ice::emptyCurrent)
override;
98 Ice::Float
getSpeed(const ::Ice::Current& = Ice::emptyCurrent)
override;
99 Ice::Int
getStepTimeMS(const ::Ice::Current& = Ice::emptyCurrent)
override;
ArmarXTimeserverPropertyDefinitions(std::string prefix)
simple implementation of the TimeserverInterface
void onInitComponent() override
void setSpeed(Ice::Float newSpeed, const ::Ice::Current &=Ice::emptyCurrent) override
void broadcastTime()
periodically writes the current time to the "Time" topic
Ice::Int getStepTimeMS(const ::Ice::Current &=Ice::emptyCurrent) override
void onDisconnectComponent() override
void start(const ::Ice::Current &=Ice::emptyCurrent) override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
~ArmarXTimeserver() override
PeriodicTask< ArmarXTimeserver >::pointer_type broadcastTimeTask
broadcastTimeTask calls broadcastTime() periodically
int stepTimeMS
time the clock advances dirung one call of step() in milliseconds
void onConnectComponent() override
Ice::Float getSpeed(const ::Ice::Current &=Ice::emptyCurrent) override
TimeServerListenerPrx timeTopicPrx
a handle for the topic "Time"
void onExitComponent() override
void stop(const ::Ice::Current &=Ice::emptyCurrent) 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
void step(const ::Ice::Current &=Ice::emptyCurrent) override
step() advances the time by the value of ArmarX.ArmarXTimeserver.StepTimeMS (in milliseconds) the def...
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
The TimeKeeper class tracks the passing of time and allows to stop it, restart it,...
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.