32 const std::string& topicName,
37 startTimestamp(startTimestamp),
38 maxFrequency(maxFrequency)
45 std::unique_lock lock(queueMutex);
51 std::vector<Ice::Byte>& outParams,
52 const Ice::Current& current)
54 std::unique_lock lock(queueMutex);
57 if (!checkTimestamp(current.operation, now))
63 dataQueue.emplace(topicName, now - startTimestamp, current.operation, inParams);
72 GenericTopicSubscriber::checkTimestamp(
const std::string& operationName,
77 auto it = functionCallTimestamps.find(operationName);
78 if (it != functionCallTimestamps.end())
80 if ((timestamp - it->second).toSecondsDouble() < 1.0 / maxFrequency)
86 it->second = timestamp;
91 functionCallTimestamps[operationName] = timestamp;