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

Public Member Functions | List of all members
DcppMonitor Class Reference

A class which runs DRAMA parameter monitoring transactions. More...

#include <dcppmonitor.h>

Public Member Functions

 DcppMonitor (DcppTask *Task)
 Construct a parameter monitor controller for the specified task. More...
 
DcppTaskTask () const
 Return the associated task object. More...
 
void Monitor (const DcppMonChangedRoutine ChangedHandler, const DcppHandlerRoutine CompletedHandler, const DcppVoidPnt ClientData, const bool SendCurrent, const int count, StatusType *const status,...)
 Start a monitor operation. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
bool IsInitial ()
 Returns true if the monitor operation has not yet been started. More...
 
bool IsStarting ()
 Returns true if the monitor operation is currently starting. More...
 
bool IsActive ()
 Returns true if the monitor operation is active. More...
 
void Reset ()
 Reset the state of the monitor. More...
 

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.

Constructor & Destructor Documentation

DcppMonitor::DcppMonitor ( DcppTask Task)
inline

Construct a parameter monitor controller for the specified task.

Parameters
TaskThe 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
nameThe name of the parameter to add.
statusInherited Status
SuccessHandlerDcppDispatch() 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.
ErrorHandlerDcppDispatch() 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.
ClientDataPassed 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
statusInherited Status
SuccessHandlerDcppDispatch() 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.
ErrorHandlerDcppDispatch() 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.
ClientDataPassed 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
nameThe name of the parameter to add.
statusInherited Status
SuccessHandlerDcppDispatch() 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.
ErrorHandlerDcppDispatch() 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.
ClientDataPassed directly to the handler functions.
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
MTaskThe task to send monitor messages too.
ActionThe action to invoke in that task.
CompletedHandlerA function which is invoked when the monitor operation completes
ClientDataPassed to the handler routines
SendCurrentSet true to send the current values of the parameters right away
countThe 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.
statusInherited 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  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
MTaskThe task to send monitor messages too.
ActionThe action to invoke in that task.
StartedHandlerA function which is invoked when the monitor has started.
CompletedHandlerA function which is invoked when the monitor operation completes
ClientDataPassed to the handler routines
SendCurrentSet true to send the current values of the parameters right away
countThe 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.
statusInherited 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
MTaskThe task to send monitor messages too.
ActionThe action to invoke in that task.
CompletedHandlerA function which is invoked when the monitor operation completes
ClientDataPassed to the handler routines
SendCurrentSet true to send the current values of the parameters right away
countThe 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.
statusInherited 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
MTaskThe task to send monitor messages too.
ActionThe action to invoke in that task.
StartHandlerA function which is invoked when the monitor has started.
CompletedHandlerA function which is invoked when the monitor operation completes
ClientDataPassed to the handler routines
SendCurrentSet true to send the current values of the parameters right away
countThe 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.
statusInherited 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
ChangedHandlerA function to be invoked when the parameter value changes.
CompletedHandlerA function which is invoked when the monitor operation completes
ClientDataPassed to the handler routines
SendCurrentSet true to send the current values of the parameters right away
countThe 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.
statusInherited 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
ChangedHandlerA function to be invoked when the parameter value changes.
CompletedHandlerA function which is invoked when the monitor operation completes
ClientDataPassed to the handler routines
SendCurrentSet true to send the current values of the parameters right away
countThe 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.
statusInherited 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@aao.gov.au 

Generated on Mon Feb 22 2016 13:58:31 for AAO DRAMA C++ Interfaces by doxygen 1.8.10