AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
Public Member Functions | List of all members
drama::thread::MonitorMessageHandler Class Reference

Detailed Description

Handle replies to DRAMA Monitor Messages.

A drama::MessageEventHandler class object is used to handle replies to DRAMA messages.

The MessageEventHandle does not handle trigger messages, it just warns if it gets one. For the DRAMA "MONITOR START" messages we are using to implement monitors, we need to handle the trigger messages, that is how we are told about parameter changes.

This subclass of MonitorMessageHandler overrides the TriggerReceived() method, organizing for appropriate methods in the drama::thread::Monitor class to be invoked. This override is marked as final to avoid a sub-class interfering with the behavior.

Additionally, it overrides the KickReceived() method, which allows monitors implemented by an action to be canceled by kicking the action. A sub-class can override this to change how this is done.

Author
Tony Farrell, AAO $Revision$ $Date$

#include "threadmonitor.hh"

Inheritance diagram for drama::thread::MonitorMessageHandler:
drama::MessageEventHandler

Public Member Functions

virtual void BulkDone (thread::ProcessInfo messInfo)
 Invoked if a bulk data done message is received.
 
virtual void BulkTransferred (thread::ProcessInfo messInfo, DitsBulkInfoType bulkInfo)
 Invoked if a bulk data transferred message is received.
 
virtual void ErrorReport (thread::ProcessInfo messInfo, const std::string &task, const ErsMessageVector &messages)
 Invoked if an error report for the user is received.
 
virtual bool KickReceived (thread::ProcessInfo messInfo, const sds::IdPtr &arg) override
 Invoked if an action waiting on a monitor message receives a kick message during the wait.
 
virtual void MessageComplete (thread::ProcessInfo messInfo, StatusType status, const sds::IdPtr &arg)
 Invoked if a message complete message is received.
 
virtual void MessageRejected (thread::ProcessInfo messInfo, StatusType status)
 Invoked if the message sent was rejected by the target task.
 
virtual void NewTransaction (DitsMsgType msgType, DitsTransIdType tid) override
 This method is invoked each time a message is initiated.
 
virtual bool Process (thread::ProcessInfo messInfo, const TransEvtInfo &eventInfo, const sds::IdPtr &arg) override final
 Method invoked to process messages.
 
virtual void SignalReceived (thread::ProcessInfo messInfo, const sds::IdPtr &arg)
 Invoked if a signal for the action is received.
 
virtual void TaskDied (thread::ProcessInfo messInfo, StatusType status)
 Invoked if the subsidiary task died whilst we were waiting for a reply from it.
 
virtual void ThreadWaitAbort (thread::ProcessInfo messInfo, StatusType status)
 Invoked if the thread wait is aborted.
 
void TriggerReceived (thread::ProcessInfo messInfo, StatusType status, const sds::IdPtr &arg) override final
 Invoked if a trigger message is received.
 
virtual void UserMessage (thread::ProcessInfo messInfo, const std::string &task, const std::string &message)
 Invoked if a message for the user is received.
 
virtual bool WaitTimeout (std::chrono::steady_clock::time_point *until)
 This method is invoked when a timeout occurs.
 

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