AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
A class implementing Monitor which invokes particular methods for parameters of given base types.
Methods are provided for each of basic SDS type - signed integers, unsigned integers, real and string.
Any other parameter type (including structured items and array types (other then strings) result in ComplexParamChanged() being invoked.
For each of these, the provided implementation will throw an exception. The user should sub-class this class and implement their own methods for each parameter type they are expecting.
If a sub-class implements the string value method, but not methods for integers, unsigned integers or real numbers, then the number will be converted to a string and passed to the string method.
Inherits the Monitor class constructors.
#include "threadmonitor.hh"
Public Member Functions | |
virtual | ~MonitorByType () |
Destructor. | |
void | Cancel () |
Cancel the monitor. | |
int | GetMonitorId () const |
Return the monitor ID. | |
bool | IsCancelling () const |
Indicate if the monitor is being canceled. | |
bool | IsRunning () const |
Indicate if the monitor is running. | |
template<typename EventProcType = MonitorMessageHandler> | |
void | Run (Path *thePath, thread::TMessHandler *action) |
Run a monitor operation - handler by type. | |
void | Run (Path *thePath, thread::TMessHandler *action, MonitorMessageHandler *evtProcessor) |
Run a monitor operation - handler by address. | |
Protected Member Functions | |
virtual std::shared_ptr< Task > | GetTask () const |
Get a reference to the task we are part of. | |
virtual void | ParamChanged (const std::string &name, const sds::IdPtr &value) |
Method invoked when the value of complex parameter has been changed. | |
virtual void | ParamChanged (const std::string &name, const std::string &value) |
Method invoked when the value of a string type parameter has been changed. | |
virtual void | ParamChanged (const std::string &name, double value) |
Method invoked when the value of a real type parameter has been changed. | |
virtual void | ParamChanged (const std::string &name, long value) |
Method invoked when the value of a signed integer type parameter has been changed. | |
virtual void | ParamChanged (const std::string &name, unsigned long value) |
Method invoked when the value of an unsigned integer type parameter has been changed. | |
virtual void | ParameterChanged (const sds::IdPtr &arg) override final |
Method invoked when a parameter is changed. | |
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:36 for AAO DRAMA/DRAMA2 C++ Interface by 1.9.8