MemoryStatusPublisher Class Reference

Accumulates each target's lifecycle and commits it to View/GazeTargetStatus. More...

#include <armarx/view_selection/gaze_scheduler/MemoryStatusPublisher.h>

+ Inheritance diagram for MemoryStatusPublisher:

Public Member Functions

void aborted (const armem::MemoryID &gazeTargetID, const std::string &reason) override
 Left the queue without ever being reached. Terminal, and a failure.
 
 MemoryStatusPublisher (std::experimental::observer_ptr< memory::client::status::Writer > writer)
 
void preempted (const armem::MemoryID &gazeTargetID, const std::string &reason) override
 Lost the active slot but stays in the queue. Not terminal.
 
void reached (const armem::MemoryID &gazeTargetID, const gaze_controller::GazeResidual &residual) override
 The gaze settled on the target.
 
void released (const armem::MemoryID &gazeTargetID, const std::string &reason) override
 Left the queue having been reached. Terminal, and a success for whoever asked.
 
void requested (const armem::MemoryID &gazeTargetID, const armarx::DateTime &creationTimestamp) override
 Admitted to the scheduler's queue.
 
void scheduled (const armem::MemoryID &gazeTargetID) override
 Submitted to the low-level controller.
 
bool wasReached (const armem::MemoryID &gazeTargetID) const override
 Whether this target was reached at any point.
 
- Public Member Functions inherited from StatusPublisherInterface
virtual ~StatusPublisherInterface ()=default
 

Detailed Description

Accumulates each target's lifecycle and commits it to View/GazeTargetStatus.

Every transition publishes a snapshot carrying all timestamps seen so far. A client that only ever observes the final snapshot – a poller, or anyone that was slow – can therefore still tell whether the target was reached before it ended. A pure event stream would lose that.

Definition at line 26 of file MemoryStatusPublisher.h.

Constructor & Destructor Documentation

◆ MemoryStatusPublisher()

Member Function Documentation

◆ aborted()

void aborted ( const armem::MemoryID & gazeTargetID,
const std::string & reason )
overridevirtual

Left the queue without ever being reached. Terminal, and a failure.

Implements StatusPublisherInterface.

Definition at line 109 of file MemoryStatusPublisher.cpp.

+ Here is the call graph for this function:

◆ preempted()

void preempted ( const armem::MemoryID & gazeTargetID,
const std::string & reason )
overridevirtual

Lost the active slot but stays in the queue. Not terminal.

Implements StatusPublisherInterface.

Definition at line 85 of file MemoryStatusPublisher.cpp.

+ Here is the call graph for this function:

◆ reached()

void reached ( const armem::MemoryID & gazeTargetID,
const gaze_controller::GazeResidual & residual )
overridevirtual

The gaze settled on the target.

Implements StatusPublisherInterface.

Definition at line 71 of file MemoryStatusPublisher.cpp.

+ Here is the call graph for this function:

◆ released()

void released ( const armem::MemoryID & gazeTargetID,
const std::string & reason )
overridevirtual

Left the queue having been reached. Terminal, and a success for whoever asked.

Implements StatusPublisherInterface.

Definition at line 97 of file MemoryStatusPublisher.cpp.

+ Here is the call graph for this function:

◆ requested()

void requested ( const armem::MemoryID & gazeTargetID,
const armarx::DateTime & creationTimestamp )
overridevirtual

Admitted to the scheduler's queue.

Implements StatusPublisherInterface.

Definition at line 48 of file MemoryStatusPublisher.cpp.

◆ scheduled()

void scheduled ( const armem::MemoryID & gazeTargetID)
overridevirtual

Submitted to the low-level controller.

Implements StatusPublisherInterface.

Definition at line 60 of file MemoryStatusPublisher.cpp.

+ Here is the call graph for this function:

◆ wasReached()

bool wasReached ( const armem::MemoryID & gazeTargetID) const
overridevirtual

Whether this target was reached at any point.

This is what separates released from aborted when a target stops being active, so it is answered from the same accumulated lifecycle that gets published – not from the scheduler's queue, which may no longer hold the target at all.

Implements StatusPublisherInterface.

Definition at line 121 of file MemoryStatusPublisher.cpp.


The documentation for this class was generated from the following files: