AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
A message event handling object that maintains a variable indicating if the message is outstanding.
This class subclasses drama::MessageEventHandler for the task of simply providing a way of working out if an action is running. It allows one thread to workout if an message sent by another thread is outstanding.
A subclass can override the methods of MessageEventHandler that this class overrides, but to maintain the correct behavior it must either invoke this class's equivalent method, or invoke SetStatus() with the appropriate value.
#include "path.hh"
Public Types | |
enum class | EventStatus { NotStarted , Running , Failed , Completed } |
Detailed status of the message is returned using this enum. More... | |
Public Member Functions | |
IsRunningType () | |
Constructor. | |
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. | |
EventStatus | Get () const |
Return the status of the message. | |
std::string | GetStr () const |
Return a string version of the current event status values. | |
std::string | GetStr (EventStatus val) const |
Return a string version of a event status value. | |
virtual bool | KickReceived (thread::ProcessInfo messInfo, const sds::IdPtr &arg) |
Invoked if an action waiting on a message receives a kick message during the wait. | |
bool | operator() () const |
Indicate if the message is outstanding (running) | |
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 | ThreadWaitAbort (thread::ProcessInfo messInfo, StatusType status) |
Invoked if the thread wait is aborted. | |
virtual void | TriggerReceived (thread::ProcessInfo messInfo, StatusType status, const sds::IdPtr &arg) |
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. | |
Protected Member Functions | |
virtual void | MessageComplete (drama::thread::ProcessInfo messInfo, StatusType status, const drama::sds::IdPtr &arg) override |
Invoked if a message complete message is received. | |
void | MessageRejected (drama::thread::ProcessInfo messInfo, StatusType status) override |
Invoked for when a message is rejected. | |
void | NewTransaction (DitsMsgType msgType, DitsTransIdType tid) override |
Invoked when a new transaction is started. | |
void | SetStatus (EventStatus newVal) |
If a sub-class overrides one of the methods of MessageEventHandler that this class overrides, it should invoke this to maintain the behavior. | |
virtual void | TaskDied (drama::thread::ProcessInfo messInfo, StatusType status) override |
Invoked if the subsidiary task died whilst we were waiting for a reply from it. | |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tony.farrell@mq.edu.au
Generated on Thu Dec 12 2024 23:07:35 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8