49#define NANOSECS_PER_SEC 1000000000
57 return nanosleep(&ts,
nullptr);
64 auto end = start + microseconds;
75 auto end = start + microseconds;
78 std::this_thread::yield();
86 auto end = start + microseconds;
96 auto args = RobotHealthHeartbeatArgs();
110 armarx::core::time::dto::DateTime now;
131 else if (
sleepmode ==
"std::this_thread::sleep_for")
133 std::this_thread::sleep_for(std::chrono::microseconds(10 * 1000));
137 throw LocalException(
"Unknown sleepmode.");
141 auto topicCallDelay = afterTopicCall - beforeTopicCall;
142 auto sleepDelay = afterSleep - afterTopicCall;
143 if (sleepDelay.toMicroSeconds() > 20000)
147 if (topicCallDelay.toMicroSeconds() > 1000)
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
TopicProxyType getTopic(const std::string &name)
Returns a proxy of the specified topic.
std::string getName() const
Retrieve name of object.
void onInitComponent() override
void yieldwait(long microseconds)
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
RunningTask< RobotHealthDummy >::pointer_type dummyTask
void onConnectComponent() override
RobotHealthInterfacePrx robotHealthTopicPrx
void sleepwait(long microseconds)
void busywait(long microseconds)
void onExitComponent() override
int NanoSleep(long nanosec)
static IceUtil::Time GetTime(TimeMode timeMode=TimeMode::VirtualTime)
Get the current time.
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
#define ARMARX_INFO
The normal logging level.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
void toIce(dto::ClockType::ClockTypeEnum &dto, const ClockType &bo)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.