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... | |
DcppTask * | Task () 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... | |
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.
|
inline |
Construct a parameter monitor controller for the specified task.
Task | The task object to which monitors messages are to be sent. |
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.
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.
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.
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 | 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.
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::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.
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::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.
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.
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 *". |
|
inline |
Returns true if the monitor operation is active.
|
inline |
Returns true if the monitor operation has not yet been started.
|
inline |
Returns true if the monitor operation is currently starting.
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.
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.
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 *". |
|
inline |
Reset the state of the monitor.
|
inline |
Return the associated task object.
returns The task object associated with this monitor
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