DRAMA C++ Intro   Class Hierarchy   Alphabetical List of types   List of Classes   File List   Class Member Index   File Members Index   Related Pages  

DcppMonitor Class Reference

#include <dcppmonitor.h>

List of all members.


Detailed Description

A class which runs DRAMA parameter monitoring transactions.

This class provides a wrap around to parameter monitoring operations. It uses a DcppTask object previously constructed by the user and on which a GetPath operation must have been completed.

See also:
DcppTask , DcppHandler , Arg , SdsId , DitsInitiateMessage() , DRAMA C++ interface , DRAMA DITS Specification
Remarks:
The approach used here is wrong, instead of using call back functions an client data, we should be using an object which the user can override to provide the functionality. This may be added later.


Public Methods

 DcppMonitor (DcppTask *Task)
 Construct a parameter monitor controller for the specified task.

DcppTaskTask () const
 Return the associated task object.

void Monitor (const DcppMonChangedRoutine ChangedHandler, const DcppHandlerRoutine CompletedHandler, const DcppVoidPnt ClientData, const bool SendCurrent, const int count, StatusType *const status,...)
 Start a monitor operation.

void MonitorForget (const DcppMonChangedRoutine ChangedHandler, const DcppHandlerRoutine CompletedHandler, const DcppVoidPnt ClientData, const bool SendCurrent, const int count, StatusType *const status,...)
 Start a monitor operation but orphan it.

void Forward (const char *const MTask, const char *const Action, const DcppHandlerRoutine CompletedHandler, const DcppVoidPnt ClientData, const bool SendCurrent, const int count, StatusType *const status,...)
 Start a monitor forward operation.

void Forward (const char *const MTask, const char *const Action, const DcppHandlerRoutine StartedHandler, const DcppHandlerRoutine CompletedHandler, const DcppVoidPnt ClientData, const bool SendCurrent, const int count, StatusType *const status,...)
 Start a monitor forward operation, with started handler.

void ForwardForget (const char *const MTask, const char *const Action, const DcppHandlerRoutine CompletedHandler, const DcppVoidPnt ClientData, const bool SendCurrent, const int count, StatusType *const status,...)
 Start a monitor forward operation but orphan it.

void ForwardStartForget (const char *const MTask, const char *const Action, const DcppHandlerRoutine StartHandler, const DcppHandlerRoutine CompletedHandler, const DcppVoidPnt ClientData, const bool SendCurrent, const int count, StatusType *const status,...)
 Start a monitor forward operation but orphan it after starting.

void Add (const char *const name, StatusType *const status, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0) const
 Add a parameter to the list of parameters being monitored.

void Delete (const char *const name, StatusType *const status, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0) const
 Delete a parameter from the list of parameters being monitored.

void Cancel (StatusType *const status, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0) const
 Trigger the cancelling of a monitor operation.

bool IsInitial ()
 Returns true if the monitor operation has not yet been started.

bool IsStarting ()
 Returns true if the monitor operation is currently starting.

bool IsActive ()
 Returns true if the monitor operation is active.

void Reset ()
 Reset the state of the monitor.


Constructor & Destructor Documentation

DcppMonitor::DcppMonitor DcppTask   Task [inline]
 

Construct a parameter monitor controller for the specified task.

Parameters:
Task  The task object to which monitors messages are to be sent.


Member Function Documentation

void DcppMonitor::Add const char *const    name,
StatusType *const    status,
const DcppHandlerRoutine    SuccessHandler = 0,
const DcppHandlerRoutine    ErrorHandler = 0,
const DcppVoidPnt    ClientData = 0
const
 

Add a parameter to the list of parameters being monitored.

This methods send a DRAMA Monitor message to the task referred to by this object to add a new parameter to the list of parameters being monitored. The monitor operation must already be running.

Parameters:
name  The name of the parameter to add.
status  Inherited Status
SuccessHandler  DcppDispatch() will invoke this if the operation completes successfully. This function should return DcppReschedule if it sends another message. Otherwise it should return DcppFinished. The value returned will be returned by DcppDispatch(). If not specified, DcppDispatch() just returns DcppFinished.
ErrorHandler  DcppDispatch() will invoke this if the operation fails after a message has been sent. This function should return DcppReschedule if it sends another message. Otherwise it should return DcppFinished. The value returned will be returned by DcppDispatch(). If not specified, DcppDispatch() just returns DcppFinished.
ClientData  Passed directly to the handler functions.

void DcppMonitor::Cancel StatusType *const    status,
const DcppHandlerRoutine    SuccessHandler = 0,
const DcppHandlerRoutine    ErrorHandler = 0,
const DcppVoidPnt    ClientData = 0
const
 

Trigger the cancelling of a monitor operation.

This methods send a DRAMA Monitor message to the task referred to by this object trigger cancelling of the monitor operation. The monitor operation must already be running.

Parameters:
status  Inherited Status
SuccessHandler  DcppDispatch() will invoke this if the operation completes successfully. This function should return DcppReschedule if it sends another message. Otherwise it should return DcppFinished. The value returned will be returned by DcppDispatch(). If not specified, DcppDispatch() just returns DcppFinished.
ErrorHandler  DcppDispatch() will invoke this if the operation fails after a message has been sent. This function should return DcppReschedule if it sends another message. Otherwise it should return DcppFinished. The value returned will be returned by DcppDispatch(). If not specified, DcppDispatch() just returns DcppFinished.
ClientData  Passed directly to the handler functions.

void DcppMonitor::Delete const char *const    name,
StatusType *const    status,
const DcppHandlerRoutine    SuccessHandler = 0,
const DcppHandlerRoutine    ErrorHandler = 0,
const DcppVoidPnt    ClientData = 0
const
 

Delete a parameter from the list of parameters being monitored.

This methods send a DRAMA Monitor message to the task referred to by this object to delete a parameter from the list of parameters being monitored. The monitor operation must already be running.

Parameters:
name  The name of the parameter to add.
status  Inherited Status
SuccessHandler  DcppDispatch() will invoke this if the operation completes successfully. This function should return DcppReschedule if it sends another message. Otherwise it should return DcppFinished. The value returned will be returned by DcppDispatch(). If not specified, DcppDispatch() just returns DcppFinished.
ErrorHandler  DcppDispatch() will invoke this if the operation fails after a message has been sent. This function should return DcppReschedule if it sends another message. Otherwise it should return DcppFinished. The value returned will be returned by DcppDispatch(). If not specified, DcppDispatch() just returns DcppFinished.
ClientData  Passed directly to the handler functions.

void DcppMonitor::Forward const char *const    MTask,
const char *const    Action,
const DcppHandlerRoutine    StartedHandler,
const DcppHandlerRoutine    CompletedHandler,
const DcppVoidPnt    ClientData,
const bool    SendCurrent,
const int    count,
StatusType *const    status,
...   
 

Start a monitor forward operation, with started handler.

This method causes a monitor message to be sent to the task indicating parameter change messages should be sent to the specified task. If status is ok on return, then the action/UFACE context should reschedule to handle the messages. It should invoked DcppDispatch() to disptach messages to the handler routines.

Parameters:
MTask  The task to send monitor messages too.
Action  The action to invoke in that task.
StartedHandler  A function which is invoked when the monitor has started.
CompletedHandler  A function which is invoked when the monitor operation completes
ClientData  Passed to the handler routines
SendCurrent  Set true to send the current values of the parameters right away
count  The number of parmeters to monitor. If negative, then there is only one more argument after status and it is a char * string containing a list of parameter names. If zero, then no parameters are to be monitored (through the transactions is started. If postive, then we have that number of extra arguments after status which are the names of parameters to be monitored.
status  Inherited status
...  See count for details, but all are of type "const char *".

void DcppMonitor::Forward const char *const    MTask,
const char *const    Action,
const DcppHandlerRoutine    CompletedHandler,
const DcppVoidPnt    ClientData,
const bool    SendCurrent,
const int    count,
StatusType *const    status,
...   
 

Start a monitor forward operation.

This method causes a monitor message to be sent to the task indicating parameter change messages should be sent to the specified task . If status is ok on return, then the action/UFACE context should reschedule to handle the messages. It should invoked DcppDispatch() to disptach messages to the handler routines.

Parameters:
MTask  The task to send monitor messages too.
Action  The action to invoke in that task.
CompletedHandler  A function which is invoked when the monitor operation completes
ClientData  Passed to the handler routines
SendCurrent  Set true to send the current values of the parameters right away
count  The number of parmeters to monitor. If negative, then there is only one more argument after status and it is a char * string containing a list of parameter names. If zero, then no parameters are to be monitored (through the transactions is started. If postive, then we have that number of extra arguments after status which are the names of parameters to be monitored.
status  Inherited status
...  See count for details, but all are of type "const char *".

void DcppMonitor::ForwardForget const char *const    MTask,
const char *const    Action,
const DcppHandlerRoutine    CompletedHandler,
const DcppVoidPnt    ClientData,
const bool    SendCurrent,
const int    count,
StatusType *const    status,
...   
 

Start a monitor forward operation but orphan it.

This method causes a monitor forward message to be sent to the task. If status is ok on return the message has been started but orphaned. The orphan handler should invoked DcppDispatch() to disptach messages to the handler routines.

Parameters:
MTask  The task to send monitor messages too.
Action  The action to invoke in that task.
CompletedHandler  A function which is invoked when the monitor operation completes
ClientData  Passed to the handler routines
SendCurrent  Set true to send the current values of the parameters right away
count  The number of parmeters to monitor. If negative, then there is only one more argument after status and it is a char * string containing a list of parameter names. If zero, then no parameters are to be monitored (through the transactions is started. If postive, then we have that number of extra arguments after status which are the names of parameters to be monitored.
status  Inherited status
...  See count for details, but all are of type "const char *".

void DcppMonitor::ForwardStartForget const char *const    MTask,
const char *const    Action,
const DcppHandlerRoutine    StartHandler,
const DcppHandlerRoutine    CompletedHandler,
const DcppVoidPnt    ClientData,
const bool    SendCurrent,
const int    count,
StatusType *const    status,
...   
 

Start a monitor forward operation but orphan it after starting.

This method causes a monitor forward message to be sent to the task. If status is ok on return the message has been started and will be orphaned after the StartHandler is inovked. The orphan handler should invoked DcppDispatch() to disptach messages to the handler routines.

Parameters:
MTask  The task to send monitor messages too.
Action  The action to invoke in that task.
StartHandler  A function which is invoked when the monitor has started.
CompletedHandler  A function which is invoked when the monitor operation completes
ClientData  Passed to the handler routines
SendCurrent  Set true to send the current values of the parameters right away
count  The number of parmeters to monitor. If negative, then there is only one more argument after status and it is a char * string containing a list of parameter names. If zero, then no parameters are to be monitored (through the transactions is started. If postive, then we have that number of extra arguments after status which are the names of parameters to be monitored.
status  Inherited status
...  See count for details, but all are of type "const char *".

bool DcppMonitor::IsActive   [inline]
 

Returns true if the monitor operation is active.

Returns:
true if the monitor operation is active.

bool DcppMonitor::IsInitial   [inline]
 

Returns true if the monitor operation has not yet been started.

Returns:
true if the operation has not been started

bool DcppMonitor::IsStarting   [inline]
 

Returns true if the monitor operation is currently starting.

Returns:
true if the initial monitor message has been sent but the monitor started message has not yet been seen

void DcppMonitor::Monitor const DcppMonChangedRoutine    ChangedHandler,
const DcppHandlerRoutine    CompletedHandler,
const DcppVoidPnt    ClientData,
const bool    SendCurrent,
const int    count,
StatusType *const    status,
...   
 

Start a monitor operation.

This method causes a monitor message to be sent to the task. If status is ok on return, then the action/UFACE context should reschedule to handle the messages. It should invoked DcppDispatch() to disptach messages to the handler routines.

Parameters:
ChangedHandler  A function to be invoked when the parameter value changes.
CompletedHandler  A function which is invoked when the monitor operation completes
ClientData  Passed to the handler routines
SendCurrent  Set true to send the current values of the parameters right away
count  The number of parmeters to monitor. If negative, then there is only one more argument after status and it is a char * string containing a list of parameter names. If zero, then no parameters are to be monitored (through the transactions is started. If postive, then we have that number of extra arguments after status which are the names of parameters to be monitored.
status  Inherited status
...  See count for details, but all are of type "const char *".

void DcppMonitor::MonitorForget const DcppMonChangedRoutine    ChangedHandler,
const DcppHandlerRoutine    CompletedHandler,
const DcppVoidPnt    ClientData,
const bool    SendCurrent,
const int    count,
StatusType *const    status,
...   
 

Start a monitor operation but orphan it.

This method causes a monitor message to be sent to the task. If status is ok on return the message has been started but orphaned. The orphan handler should invoked DcppDispatch() to disptach messages to the handler routines.

Parameters:
ChangedHandler  A function to be invoked when the parameter value changes.
CompletedHandler  A function which is invoked when the monitor operation completes
ClientData  Passed to the handler routines
SendCurrent  Set true to send the current values of the parameters right away
count  The number of parmeters to monitor. If negative, then there is only one more argument after status and it is a char * string containing a list of parameter names. If zero, then no parameters are to be monitored (through the transactions is started. If postive, then we have that number of extra arguments after status which are the names of parameters to be monitored.
status  Inherited status
...  See count for details, but all are of type "const char *".

void DcppMonitor::Reset   [inline]
 

Reset the state of the monitor.

DcppTask* DcppMonitor::Task   const [inline]
 

Return the associated task object.

returns The task object associated with this monitor


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

Click here for the DRAMA home page and here for the AAO home page.

For more information, contact tjf@aaoepp.aao.gov.au 

Generated on Tue Nov 3 09:09:56 2009 for AAO DRAMA C++ Interfaces by doxygen 1.2.18