35 defineOptionalProperty<std::string>(
"TimingTestTopicName",
"TimingTestTopic",
"-");
36 defineOptionalProperty<int>(
"UpdatePeriodInMS", 10,
"-");
38 defineOptionalProperty<std::string>(
"DebugObserverName",
"DebugObserver",
"Name of the topic the DebugObserver listens on");
45 return "TopicTimingServer";
55 updatePeriodInMS = getProperty<int>(
"UpdatePeriodInMS").getValue();
61 topic = getTopicFromProperty<armarx::topic_timing::TopicPrx>(
"TimingTestTopicName");
63 debugObserver = getTopicFromProperty<DebugObserverInterfacePrx>(
"DebugObserverName");
65 lastSmallTime = IceUtil::Time::now();
93 void TopicTimingServer::run()
96 while (!task->isStopped())
100 topic_timing::SmallData
data;
101 data.sentTimestamp = time_now.toMicroSeconds();
103 topic->reportSmall(
data);
110 lastSmallTime = time_now;
113 channel[
"DurationSend"] =
new Variant(dur_send.toMilliSecondsDouble());
114 channel[
"DurationCycle"] =
new Variant(dur_cycle.toMilliSecondsDouble());
115 debugObserver->setDebugChannel(
"TopicTimingServerSmall", channel);
117 c.waitForCycleDuration();