AAO DRAMA/DRAMA2 C++ Interface
|
A class implementing Monitor which copies the value of a monitored parameter into one of the same name or a derived name in the current task.
If the name of the parameter in this task is NOT the same as the name of the parameter being monitored, the user should sub-class this class and override the Transform() method to transform the name as required.
Inherits the Monitor class constructors.
#include "threadmonitor.hh"
Public Member Functions | |
virtual | ~MonitorToParam () |
Destructor. More... | |
virtual std::string | Transform (const std::string &in) |
Transform method, default implementation. More... | |
![]() | |
Monitor (std::weak_ptr< Task > theTask, std::initializer_list< std::string > pars) | |
Create a Monitor object. More... | |
Monitor (const Monitor &source)=delete | |
Copy constructor - deleted. More... | |
virtual | ~Monitor () |
Destructor. More... | |
void | Cancel () |
Cancel the monitor. More... | |
int | GetMonitorId () const |
Return the monitor ID. More... | |
bool | IsCancelling () const |
Indicate if the monitor is being canceled. More... | |
bool | IsRunning () const |
Indicate if the monitor is running. More... | |
Monitor & | operator= (const Monitor &rhs)=delete |
Assignment operator - deleted. More... | |
template<typename EventProcType = MonitorMessageHandler> | |
void | Run (Path *thePath, thread::TMessHandler *action) |
Run a monitor operation - handler by type. More... | |
void | Run (Path *thePath, thread::TMessHandler *action, MonitorMessageHandler *evtProcessor) |
Run a monitor operation - handler by address. More... | |
Protected Member Functions | |
virtual void | ParameterChanged (const sds::IdPtr &arg) override final |
Method invoked when a parameter is changed. More... | |
![]() | |
virtual std::shared_ptr< Task > | GetTask () const |
Get a reference to the task we are part of. More... | |
|
virtual |
Destructor.
|
finaloverrideprotectedvirtual |
Method invoked when a parameter is changed.
This method is invoked each time a parameter changes. This is the MonitorToParam class implementation of the abstract method in the Monitor class.
This method is not normally invoked by user code and this implement cannot be not overridden by sub-classes. If you want to override this, it is suggested you implement an alternative sub-class of Monitor.
arg | A pointer to the SDS structure with the new parameter value. |
Implements drama::thread::Monitor.
|
virtual |
Transform method, default implementation.
This uses the name of the parameter being monitored to generate the name of the parameter in this task where its value is to be placed.
In this implementation, the parameter in this task has the same name as the parameter being monitored.
in | The name of the parameter being monitored |
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aao.gov.au Generated on Mon Feb 22 2016 15:57:53 for AAO DRAMA/DRAMA2 C++ Interface by