3#include <condition_variable>
53 explicit operator bool()
const;
59 void expect(
const std::string& targetName);
65 void forget(
const std::string& targetName);
76 const std::function<
bool()>& shouldAbort);
82 std::optional<armem::MemoryID> gazeTargetID;
95 std::condition_variable condition;
97 std::map<std::string, Expectation> expectations;
void expect(const std::string &targetName)
Start collecting updates for this target. Call before committing it.
void bind(const std::string &targetName, const armem::MemoryID &gazeTargetID)
Narrow the expectation to the exact request snapshot, once the commit returned its ID.
GazeTargetWaiter(StatusHandlerInterface &handler)
Result wait(const std::string &targetName, const armarx::Duration &timeout, const std::function< bool()> &shouldAbort)
Block until the target is reached, ends, the abort predicate fires or the timeout expires.
void forget(const std::string &targetName)
Drop an expectation without waiting for it.
Registration of callbacks for gaze target lifecycle updates.
Business Object (BO) class of GazeTargetStatus: the lifecycle of one gaze target request,...
gaze_targets::GazeTargetStatus status
std::string message
Why the wait ended, if it did not end on a status update.