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

Classes | Public Member Functions | Static Public Member Functions | List of all members
DcppTask Class Reference

A Class which provides access to DRAMA's message sending facilities. More...

#include <dcpptask.h>

Inheritance diagram for DcppTask:
GitTask

Classes

class  DisconHandler
 Disconnect handler abstract type. More...
 

Public Member Functions

 DcppTask (const char *const name, const char *const location=0, const char *const file=0)
 Normal constructor. More...
 
 DcppTask (bool self)
 Path to self constructor. More...
 
 DcppTask (DitsPathType p)
 Constructor from existing path. More...
 
virtual ~DcppTask ()
 Destructor. More...
 
void TaskLoggingOn ()
 Turn logging on for this object. More...
 
void TaskLoggingOff ()
 Turn logging off for this object. More...
 
void Report (StatusType *status) const
 Dump details using MsgOut(). More...
 
bool GetPathLoaded () const
 Indicate if a the task was loaded. More...
 
const char * TaskName () const
 Fetch the task name. More...
 
const char * Location () const
 Fetch the task location. More...
 
const char * GetArgument () const
 Fetch the load argument. More...
 
virtual void SetName (const char *const TaskName)
 Set the task name. More...
 
virtual void SetLocation (const char *const Location)
 Set the task location. More...
 
virtual void SetFile (const char *const File)
 Set the executable file name. More...
 
virtual void SetBuffers (const DcppBuffers &Buffers)
 Set the DRAMA path buffers. More...
 
virtual void SetFlowControl ()
 Set the FLOW control flag. More...
 
virtual void SetProcess (const char *const ProcessName)
 Set the process names. More...
 
virtual void SetStackSize (unsigned bytes)
 Set the stack size for the load. More...
 
virtual void SetArgument (const char *const LoadArg, bool const Append=false)
 Set the load time argument string. More...
 
virtual void SetPriority (const int Priority, const bool Absolute=false)
 Set the load time priority for a task when loaded. More...
 
virtual void SetNames (const bool Flag=true)
 Insist that symbols known to IMP_Master be known to the task. More...
 
virtual void SetSymbols (const bool Flag=true)
 Interpert file name as a symbol (VMS Target only) More...
 
virtual void SetProg (const bool Flag=true)
 Interpert file name as a program name. More...
 
virtual void LogLoad (const bool Flag=true)
 Load use MsgOut() a lines indicating the load operations. More...
 
virtual void ClearState ()
 Clear the task state. More...
 
virtual bool Active () const
 Indicate if a task is active. More...
 
virtual bool IsDead () const
 Return true if a previously active task has disconnected. More...
 
virtual bool Initial () const
 Return true if a GetPath operation is required. More...
 
virtual bool Busy () const
 Returns true if we can't send a message because path is busy. More...
 
virtual DcppHandlerRet GetPath (StatusType *const status, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0)
 Get a path to/load a the task. More...
 
virtual void GetPathImmed (StatusType *const status)
 Get a path to a task if DITS already has it. More...
 
virtual void Died ()
 Note that a task has died. More...
 
virtual void LosePath (StatusType *const status)
 Lose the path and then set as if the task has died. More...
 
virtual void Delete (int force, StatusType *status)
 Delete the task. More...
 
virtual DcppHandlerRet Obey (const char *const name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppHandlerRoutine TriggerHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0, const DcppHandlerRoutine MsgHandler=0, DitsTransIdType *const transid=0)
 Send a DRAMA Obey message to the task. More...
 
virtual DcppHandlerRet Obey (const char *const name, StatusType *const status, const SdsId &arg, const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppHandlerRoutine TriggerHandler, const DcppVoidPnt ClientData, const DcppHandlerRoutine ErsHandler, const DcppHandlerRoutine MsgHandler, SdsId *const tidArg)
 Send a DRAMA Obey message to the task. More...
 
virtual DcppHandlerRet Obey (const char *const name, StatusType *const status, const SdsId &arg, const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppHandlerRoutine TriggerHandler, const DcppVoidPnt ClientData, const DcppHandlerRoutine ErsHandler, const DcppHandlerRoutine MsgHandler, const SdsId *const tidArg)
 Send a DRAMA Obey message to the task. More...
 
virtual DcppHandlerRet Kick (const char *const name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0, const DcppHandlerRoutine MsgHandler=0)
 Send a DRAMA Kick message to the task. More...
 
virtual DcppHandlerRet Obey (const char *const name, const DcppShared &SharedMem, const bool sds, const int NotifyBytes, StatusType *const status, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppBulkTransRoutine BulkTransHandler=0, const DcppHandlerRoutine BulkDoneHandler=0, const DcppHandlerRoutine TriggerHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0, const DcppHandlerRoutine MsgHandler=0, DitsTransIdType *const transid=0)
 Send a DRAMA Obey bulk data message to the task. More...
 
virtual DcppHandlerRet Obey (const char *const name, const DcppShared &SharedMem, const bool sds, const int NotifyBytes, StatusType *const status, const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppBulkTransRoutine BulkTransHandler, const DcppHandlerRoutine BulkDoneHandler, const DcppHandlerRoutine TriggerHandler, const DcppVoidPnt ClientData, const DcppHandlerRoutine ErsHandler, const DcppHandlerRoutine MsgHandler, SdsId *const tidArg)
 Send a DRAMA Obey bulk data message to the task. More...
 
virtual DcppHandlerRet Obey (const char *const name, const DcppShared &SharedMem, const bool sds, const int NotifyBytes, StatusType *const status, const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppBulkTransRoutine BulkTransHandler, const DcppHandlerRoutine BulkDoneHandler, const DcppHandlerRoutine TriggerHandler, const DcppVoidPnt ClientData, const DcppHandlerRoutine ErsHandler, const DcppHandlerRoutine MsgHandler, const SdsId *const tidArg)
 Send a DRAMA Obey bulk data message to the task. More...
 
virtual DcppHandlerRet Kick (const char *const name, const DcppShared &SharedMem, const bool sds, const int NotifyBytes, StatusType *const status, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppBulkTransRoutine BulkTransHandler=0, const DcppHandlerRoutine BulkDoneHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0, const DcppHandlerRoutine MsgHandler=0)
 Send a DRAMA bulk data Kick message to the task. More...
 
virtual DcppHandlerRet Get (const char *const name, StatusType *const status, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0)
 Send a DRAMA message to the task to get the value of a parameter. More...
 
virtual DcppHandlerRet MGet (const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppVoidPnt ClientData, unsigned count, StatusType *status,...)
 Send a DRAMA message to the task to get the value of multiple parameters. More...
 
virtual DcppHandlerRet MGet (const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppHandlerRoutine ErsHandler, const DcppVoidPnt ClientData, unsigned count, StatusType *status,...)
 Send a DRAMA message to the task to get the value of multiple parameters. More...
 
virtual DcppHandlerRet Set (const char *const name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0)
 Send a DRAMA set message to the task. More...
 
virtual DcppHandlerRet Control (const char *const name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppHandlerRoutine TriggerHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0)
 Send a DRAMA Control message to the task. More...
 
virtual DcppHandlerRet Monitor (const char *name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppHandlerRoutine TriggerHandler=0, const DcppVoidPnt ClientData=0, const bool SendCurrent=false, const DcppHandlerRoutine ErsHandler=0)
 Send a DRAMA Monitor message to the task. More...
 
virtual void ObeyForget (const char *const name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppHandlerRoutine TriggerHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0, const DcppHandlerRoutine MsgHandler=0, DitsTransIdType *const transid=0)
 Send a DRAMA Obey message to the task, forgetting the transaction. More...
 
virtual void ObeyForget (const char *const name, StatusType *const status, const SdsId &arg, const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppHandlerRoutine TriggerHandler, const DcppVoidPnt ClientData, const DcppHandlerRoutine ErsHandler, const DcppHandlerRoutine MsgHandler, SdsId *const tidArg)
 Send a DRAMA Obey message to the task, forgetting the transaction. More...
 
virtual void ObeyForget (const char *const name, StatusType *const status, const SdsId &arg, const DcppHandlerRoutine SuccessHandler, const DcppHandlerRoutine ErrorHandler, const DcppHandlerRoutine TriggerHandler, const DcppVoidPnt ClientData, const DcppHandlerRoutine ErsHandler, const DcppHandlerRoutine MsgHandler, const SdsId *const tidArg)
 Send a DRAMA Obey message to the task, forgetting the transaction. More...
 
virtual void KickForget (const char *const name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppVoidPnt ClientData=0, const DcppHandlerRoutine ErsHandler=0, const DcppHandlerRoutine MsgHandler=0)
 Send a DRAMA OKick message to the task, forgetting the transaction. More...
 
virtual void MonitorForget (const char *name, StatusType *const status, const SdsId &arg=SdsNull, const DcppHandlerRoutine SuccessHandler=0, const DcppHandlerRoutine ErrorHandler=0, const DcppHandlerRoutine TriggerHandler=0, const DcppVoidPnt ClientData=0, const bool SendCurrent=false, const DcppHandlerRoutine ErsHandler=0)
 Send a DRAMA Monitor message to the task, forgetting the transaction. More...
 
virtual DisconHandlerPutDisconnectHandler (DisconHandler *p)
 Add a new disconnect handler for this task. More...
 
DcppHandlerRet HandleMessage (DcppTransaction *transaction, StatusType *status)
 Function used by DcppDispatch in dispatching to handlers. More...
 
virtual void GetDitsPath (DitsPathType *path, StatusType *status)
 Return the underlying DITS path object. More...
 

Static Public Member Functions

static void LoggingOn ()
 Enable logging for all DcppTask objects. More...
 
static void LoggingOff ()
 Disable logging for all tasks. More...
 
static DcppHandlerRet DiscardResponse (DcppVoidPnt ClientData, StatusType *status)
 Flag argument success handler indicating reponses are to be ignored. More...
 
static void HandleDisconnected (const char *task, DitsPathType path, StatusType *status)
 Handle task disconnection. More...
 

Detailed Description

A Class which provides access to DRAMA's message sending facilities.

This class was the original attempt at providing a C++ interface to DRAMA's message sending functions. The idea is that you maintain an object of this type for each task you want to send messages to. You can then use the various methods to send messages. The Action/UFACE routine which processes replies to these messages can use DcppDisptach() to dispatch the messages such that the callback functions which are specified when the message is sent, are invoked.

In addition, when invoked with an action, the used of DcppTask can be combined with a DcppHandler object to handle action rescheduling transparently. This is optional.

See also
DcppMonitor
DcppHandler
Arg
SdsId
DitsInitiateMessage()
DitsInitMessBulk()
DRAMA C++ interface
DRAMA DITS Specification
Remarks
The approach used here is wrong, instead of using call back functions and 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

DcppTask::DcppTask ( const char *const  name,
const char *const  location = 0,
const char *const  file = 0 
)

Normal constructor.

Allows the the task name, location and file to be set

Parameters
nameThe name the task will be known as (unless loaded, when the name the task registers as will be used)
locationThe node name on which the task is running or is to be loaded. Only used if not already running locally or known locally.
fileThe file of the task, as required by DitsLoad(). Normally a file name, but may be different depending on the location, e.g. on a VxWorks machine.
DcppTask::DcppTask ( bool  self)

Path to self constructor.

Constructor a DcppTask object which can be used to send messages to the invoking task itself.

Parameters
selfDistingishes this constructor from the other constructor. Value is ignored
DcppTask::DcppTask ( DitsPathType  p)

Constructor from existing path.

Constructs an DcppTask object from an existing DITS path.

If the path is valid, then the state is set to ACTIVE, otherwise it is set to died and you would to set the task name before trying to get a path to the task.

Parameters
pathThe valid DITS path to be used.
virtual DcppTask::~DcppTask ( )
virtual

Destructor.

Member Function Documentation

virtual bool DcppTask::Active ( ) const
inlinevirtual

Indicate if a task is active.

Returns
true if it is safe to send a message along a path. That is, a DcppTask::GetPath operation is not needed and is not underway.
virtual bool DcppTask::Busy ( ) const
inlinevirtual

Returns true if we can't send a message because path is busy.

You can't send a message along a path whilst the getting a path on it or whilst a Notify operation is current.

Returns
true if you cannot currently send a message on a path.
virtual void DcppTask::ClearState ( )
inlinevirtual

Clear the task state.

This function clears the state of the DcppTask object, such that it will will presume is has just been constructed.

virtual DcppHandlerRet DcppTask::Control ( const char *const  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppHandlerRoutine  TriggerHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0 
)
inlinevirtual

Send a DRAMA Control message to the task.

This sends a DRAMA control message to the task referred to by this object. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the control message to send.
statusInherited Status
argThe argument to the message. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
virtual void DcppTask::Delete ( int  force,
StatusType *  status 
)
inlinevirtual

Delete the task.

Tell IMP to delete the task.

Parameters
forceIf true, force the task to be deleted, rather then asking it nicely to delete itself.
statusInherited Status
virtual void DcppTask::Died ( )
inlinevirtual

Note that a task has died.

static DcppHandlerRet DcppTask::DiscardResponse ( DcppVoidPnt  ClientData,
StatusType *  status 
)
static

Flag argument success handler indicating reponses are to be ignored.

If this function is specified as a SuccessHandler to any of the functions which send messages to tasks (other then DcppTask::GetPath) then the target task is told not to return any reponses to that message.

Parameters
ClientDataIgnored.
statusInherited status
virtual DcppHandlerRet DcppTask::Get ( const char *const  name,
StatusType *const  status,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0 
)
inlinevirtual

Send a DRAMA message to the task to get the value of a parameter.

This is the basic method for sending an GET message to the task referred to by this object - to return the value of a single parameter. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

See also
DcppTask::MGet
Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the parameter the value of which should be fetched.
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.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
const char* DcppTask::GetArgument ( ) const
inline

Fetch the load argument.

returns A const pointer to the load argument previously specified.

virtual void DcppTask::GetDitsPath ( DitsPathType *  path,
StatusType *  status 
)
virtual

Return the underlying DITS path object.

This method returns the underlying DITS path object being used by the DcppTask object. If it is not yet active then status will be set to DCPP__INVSTATE

Parameters
pathThe path is returned here.
statusInherited status
virtual DcppHandlerRet DcppTask::GetPath ( StatusType *const  status,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppVoidPnt  ClientData = 0 
)
virtual

Get a path to/load a the task.

This call initiates getting a path to the task. If the task is not running, it will be loaded if a sufficent information has been specified.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropaite handler is invoked when the operation completes.

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.
virtual void DcppTask::GetPathImmed ( StatusType *const  status)
virtual

Get a path to a task if DITS already has it.

This method fetches that path to the task from DITS, if DITS already knows about it. No messages are initiated and bad status is returned if DITS does not know about this task already.

If this method returned successfully, you may use the object to set messages.

Parameters
statusInherited Status
bool DcppTask::GetPathLoaded ( ) const
inline

Indicate if a the task was loaded.

returns True if the task we are talking too was loaded.

static void DcppTask::HandleDisconnected ( const char *  task,
DitsPathType  path,
StatusType *  status 
)
static

Handle task disconnection.

Used internally only.

DcppHandlerRet DcppTask::HandleMessage ( DcppTransaction transaction,
StatusType *  status 
)

Function used by DcppDispatch in dispatching to handlers.

virtual bool DcppTask::Initial ( ) const
inlinevirtual

Return true if a GetPath operation is required.

Returns
true if a DcppTask::GetPath operation is needed.
virtual bool DcppTask::IsDead ( ) const
inlinevirtual

Return true if a previously active task has disconnected.

Returns
true if the task has disconnected.
virtual DcppHandlerRet DcppTask::Kick ( const char *const  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0,
const DcppHandlerRoutine  MsgHandler = 0 
)
inlinevirtual

Send a DRAMA Kick message to the task.

This is the basic method for sending a KICK message to the task referred to by this object. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
virtual DcppHandlerRet DcppTask::Kick ( const char *const  name,
const DcppShared SharedMem,
const bool  sds,
const int  NotifyBytes,
StatusType *const  status,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppBulkTransRoutine  BulkTransHandler = 0,
const DcppHandlerRoutine  BulkDoneHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0,
const DcppHandlerRoutine  MsgHandler = 0 
)
inlinevirtual

Send a DRAMA bulk data Kick message to the task.

This method is used for sending an KICK message with a bulk data argument to the task referred to by this object. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
SharedMemShared memory details.
sdsSet true if sending an SDS structure in the bulk data.
NotifyBytesThe bulk data update notification rate in bytes.
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.
BulkTransHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer update is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
BulkDoneHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer complete is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
virtual void DcppTask::KickForget ( const char *const  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0,
const DcppHandlerRoutine  MsgHandler = 0 
)
inlinevirtual

Send a DRAMA OKick message to the task, forgetting the transaction.

This a method for sending an KICK message to the task referred to by this object, but immediately orphaning the resulting transaction. We must already have path to the task.

If all handlers are null (0) then the transaction is completely orphaned and will not be handled by DcppDispatch(). If the success handler is set to "DcppTask::DiscardResponse" then the other handlers are ignored and reponses are not even sent back to this task at all. Otherwise, the various handlers will be invoked if DcppDispatch() is invoked by an orphan handler in response to reply message from this message.

Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
const char* DcppTask::Location ( ) const
inline

Fetch the task location.

Returns the name of the node on which the task is running (unless it was already known locally when DcppTask::GetPath was running, in which case we don't know where it is, but the value specified to the constructor is returns)

returns A const pointer to the node name.

static void DcppTask::LoggingOff ( )
inlinestatic

Disable logging for all tasks.

Turn logging for all tasks off. Logging is now determined by the object specific log flag

static void DcppTask::LoggingOn ( )
inlinestatic

Enable logging for all DcppTask objects.

This static method can be used to enable logging for all DcppTask objects, ignoring the object specific log flag

virtual void DcppTask::LogLoad ( const bool  Flag = true)
inlinevirtual

Load use MsgOut() a lines indicating the load operations.

If set true, this flag causes MsgOut() messages to be output around the load operations, if they occur.

Parameters
FlagThe value for the flag.
virtual void DcppTask::LosePath ( StatusType *const  status)
inlinevirtual

Lose the path and then set as if the task has died.

This will send a full DRAMA DitsPathGet() operation will be done by the next DcppTask::GetPath operation. After doing this, you can no longer sends messages to the specified task.

Parameters
statusInherited Status
virtual DcppHandlerRet DcppTask::MGet ( const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppVoidPnt  ClientData,
unsigned  count,
StatusType *  status,
  ... 
)
virtual

Send a DRAMA message to the task to get the value of multiple parameters.

This a method for sending an MGET message to the task referred to by this object - to return the value of a multiple parameters. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

See also
DcppTask::Get
Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
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.
countThe number of parameters.
statusInherited Status
...The parameter names, all "const char *".
virtual DcppHandlerRet DcppTask::MGet ( const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppHandlerRoutine  ErsHandler,
const DcppVoidPnt  ClientData,
unsigned  count,
StatusType *  status,
  ... 
)
virtual

Send a DRAMA message to the task to get the value of multiple parameters.

This is the a method for sending an MGET message to the task referred to by this object - to return the value of a multiple parameters. We must already have path to the task. This version supports explict handling of any Ers messages.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
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.
countThe number of parameters.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
statusInherited Status
...The parameter names, all "const char *".
virtual DcppHandlerRet DcppTask::Monitor ( const char *  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppHandlerRoutine  TriggerHandler = 0,
const DcppVoidPnt  ClientData = 0,
const bool  SendCurrent = false,
const DcppHandlerRoutine  ErsHandler = 0 
)
inlinevirtual

Send a DRAMA Monitor message to the task.

This methods sendis a DRAMA Monitor message to the task referred to by this object. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

You should note that normally the DcppMonitor:: class is used to run monitor transactions. It uses this method to start the monitors.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the monitor message to send, one of MONITOR/FORWARD/ADD/DELETE/CANCEL
statusInherited Status
argThe argument to the message. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
SendCurrentIf true, then a Monitor START/FORWARD message will send the current values of the parameter right away.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
virtual void DcppTask::MonitorForget ( const char *  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppHandlerRoutine  TriggerHandler = 0,
const DcppVoidPnt  ClientData = 0,
const bool  SendCurrent = false,
const DcppHandlerRoutine  ErsHandler = 0 
)
inlinevirtual

Send a DRAMA Monitor message to the task, forgetting the transaction.

This a method for sending an Monitor message to the task referred to by this object, but immediately orphaning the resulting transaction. We must already have path to the task.

If all handlers are null (0) then the transaction is completely orphaned and will not be handled by DcppDispatch(). If the success handler is set to "DcppTask::DiscardResponse" then the other handlers are ignored and reponses are not even sent back to this task at all. Otherwise, the various handlers will be invoked if DcppDispatch() is invoked by an orphan handler in response to reply message from this message.

Parameters
nameThe name of the monitor message to send, one of MONITOR/FORWARD/ADD/DELETE/CANCEL
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
SendCurrentIf true, then a Monitor START/FORWARD message will send the current values of the parameter right away.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
virtual DcppHandlerRet DcppTask::Obey ( const char *const  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppHandlerRoutine  TriggerHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0,
const DcppHandlerRoutine  MsgHandler = 0,
DitsTransIdType *const  transid = 0 
)
inlinevirtual

Send a DRAMA Obey message to the task.

This is the basic method for sending an OBEY message to the task referred to by this object. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
transidReturn the DRAMA transaction id of the started transaction here. This is usefull when we might want to kick a spawnable action.
virtual DcppHandlerRet DcppTask::Obey ( const char *const  name,
StatusType *const  status,
const SdsId arg,
const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppHandlerRoutine  TriggerHandler,
const DcppVoidPnt  ClientData,
const DcppHandlerRoutine  ErsHandler,
const DcppHandlerRoutine  MsgHandler,
SdsId *const  tidArg 
)
inlinevirtual

Send a DRAMA Obey message to the task.

This is slight modification of the basic method for sending an OBEY message to the task referred to by this object. It returns the transaction id in a SDS structure set up ready for sending with a Kick message. (It is set up by DcppSpawnKickArg()).

We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
tidArgReturn the DRAMA transaction id of the started transaction in a form ready for use in a Kick message argument. This is usefull when we might want to kick a spawnable action.

References DcppSpawnKickArg().

virtual DcppHandlerRet DcppTask::Obey ( const char *const  name,
StatusType *const  status,
const SdsId arg,
const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppHandlerRoutine  TriggerHandler,
const DcppVoidPnt  ClientData,
const DcppHandlerRoutine  ErsHandler,
const DcppHandlerRoutine  MsgHandler,
const SdsId *const  tidArg 
)
inlinevirtual

Send a DRAMA Obey message to the task.

This is slight modification of the basic method for sending an OBEY message to the task referred to by this object. It returns the transaction id in a SDS structure set up ready for sending with a Kick message. (It is set up by DcppSpawnKickArgUpdate()).

We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
tidArgUpdate the DRAMA transaction id in this SDS structure for the started transaction in a form ready for use in a Kick message argument. This is usefull when we might want to kick a spawnable action.

References DcppSpawnKickArgUpdate().

virtual DcppHandlerRet DcppTask::Obey ( const char *const  name,
const DcppShared SharedMem,
const bool  sds,
const int  NotifyBytes,
StatusType *const  status,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppBulkTransRoutine  BulkTransHandler = 0,
const DcppHandlerRoutine  BulkDoneHandler = 0,
const DcppHandlerRoutine  TriggerHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0,
const DcppHandlerRoutine  MsgHandler = 0,
DitsTransIdType *const  transid = 0 
)
inlinevirtual

Send a DRAMA Obey bulk data message to the task.

This method is used for sending an OBEY message with a bulk data argument to the task referred to by this object. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
SharedMemShared memory details.
sdsSet true if sending an SDS structure in the bulk data.
NotifyBytesThe bulk data update notification rate in bytes.
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.
BulkTransHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer update is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
BulkDoneHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer complete is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
transidReturn the DRAMA transaction id of the started transaction here. This is usefull when we might want to kick a spawnable action.
virtual DcppHandlerRet DcppTask::Obey ( const char *const  name,
const DcppShared SharedMem,
const bool  sds,
const int  NotifyBytes,
StatusType *const  status,
const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppBulkTransRoutine  BulkTransHandler,
const DcppHandlerRoutine  BulkDoneHandler,
const DcppHandlerRoutine  TriggerHandler,
const DcppVoidPnt  ClientData,
const DcppHandlerRoutine  ErsHandler,
const DcppHandlerRoutine  MsgHandler,
SdsId *const  tidArg 
)
inlinevirtual

Send a DRAMA Obey bulk data message to the task.

This method is used for sending an OBEY message with a bulk data argument to the task referred to by this object. We must already have path to the task. This version returns the transaction id in a SDS structure set up ready for sending with a Kick message. (It is set up by DcppSpawnKickArg()).

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
SharedMemShared memory details.
sdsSet true if sending an SDS structure in the bulk data.
NotifyBytesThe bulk data update notification rate in bytes.
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.
BulkTransHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer update is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
BulkDoneHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer complete is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
tidArgReturn the DRAMA transaction id of the started transaction in a form ready for use in a Kick message argument. This is usefull when we might want to kick a spawnable action.

References DcppSpawnKickArg().

virtual DcppHandlerRet DcppTask::Obey ( const char *const  name,
const DcppShared SharedMem,
const bool  sds,
const int  NotifyBytes,
StatusType *const  status,
const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppBulkTransRoutine  BulkTransHandler,
const DcppHandlerRoutine  BulkDoneHandler,
const DcppHandlerRoutine  TriggerHandler,
const DcppVoidPnt  ClientData,
const DcppHandlerRoutine  ErsHandler,
const DcppHandlerRoutine  MsgHandler,
const SdsId *const  tidArg 
)
inlinevirtual

Send a DRAMA Obey bulk data message to the task.

This method is used for sending an OBEY message with a bulk data argument to the task referred to by this object. We must already have path to the task. This version returns the transaction id in a SDS structure set up ready for sending with a Kick message. (It is set up by DcppSpawnKickArgUpdate()).

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the action to obey.
SharedMemShared memory details.
sdsSet true if sending an SDS structure in the bulk data.
NotifyBytesThe bulk data update notification rate in bytes.
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.
BulkTransHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer update is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
BulkDoneHandlerDcppDispatch() will invoke this if a message indicating a bulk data transfer complete is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
tidArgUpdate the DRAMA transaction id in this SDS structure for the started transaction in a form ready for use in a Kick message argument. This is usefull when we might want to kick a spawnable action.

References DcppSpawnKickArgUpdate().

virtual void DcppTask::ObeyForget ( const char *const  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppHandlerRoutine  TriggerHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0,
const DcppHandlerRoutine  MsgHandler = 0,
DitsTransIdType *const  transid = 0 
)
inlinevirtual

Send a DRAMA Obey message to the task, forgetting the transaction.

This a method for sending an OBEY message to the task referred to by this object, but immediately orphaning the resulting transaction. We must already have path to the task.

If all handlers are null (0) then the transaction is completely orphaned and will not be handled by DcppDispatch(). If the success handler is set to "DcppTask::DiscardResponse" then the other handlers are ignored and reponses are not even sent back to this task at all. Otherwise, the various handlers will be invoked if DcppDispatch() is invoked by an orphan handler in response to reply message from this message.

Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
transidReturn the DRAMA transaction id of the started transaction here. This is usefull when we might want to kick a spawnable action.
virtual void DcppTask::ObeyForget ( const char *const  name,
StatusType *const  status,
const SdsId arg,
const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppHandlerRoutine  TriggerHandler,
const DcppVoidPnt  ClientData,
const DcppHandlerRoutine  ErsHandler,
const DcppHandlerRoutine  MsgHandler,
SdsId *const  tidArg 
)
inlinevirtual

Send a DRAMA Obey message to the task, forgetting the transaction.

This a method for sending an OBEY message to the task referred to by this object, but immediately orphaning the resulting transaction. We must already have path to the task. This version returns the transaction id in a SDS structure set up ready for sending with a Kick message. (It is set up by DcppSpawnKickArg()).

If all handlers are null (0) then the transaction is completely orphaned and will not be handled by DcppDispatch(). If the success handler is set to "DcppTask::DiscardResponse" then the other handlers are ignored and reponses are not even sent back to this task at all. Otherwise, the various handlers will be invoked if DcppDispatch() is invoked by an orphan handler in response to reply message from this message.

Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
tidArgReturn the DRAMA transaction id of the started transaction in a form ready for use in a Kick message argument. This is usefull when we might want to kick a spawnable action.

References DcppSpawnKickArg().

virtual void DcppTask::ObeyForget ( const char *const  name,
StatusType *const  status,
const SdsId arg,
const DcppHandlerRoutine  SuccessHandler,
const DcppHandlerRoutine  ErrorHandler,
const DcppHandlerRoutine  TriggerHandler,
const DcppVoidPnt  ClientData,
const DcppHandlerRoutine  ErsHandler,
const DcppHandlerRoutine  MsgHandler,
const SdsId *const  tidArg 
)
inlinevirtual

Send a DRAMA Obey message to the task, forgetting the transaction.

This a method for sending an OBEY message to the task referred to by this object, but immediately orphaning the resulting transaction. We must already have path to the task. This version returns the transaction id in a SDS structure set up ready for sending with a Kick message. (It is set up by DcppSpawnKickArgUpdate()).

If all handlers are null (0) then the transaction is completely orphaned and will not be handled by DcppDispatch(). If the success handler is set to "DcppTask::DiscardResponse" then the other handlers are ignored and reponses are not even sent back to this task at all. Otherwise, the various handlers will be invoked if DcppDispatch() is invoked by an orphan handler in response to reply message from this message.

Parameters
nameThe name of the action to obey.
statusInherited Status
argThe argument to the action. Defaults to SdsNull, a null argument.
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.
TriggerHandlerDcppDispatch() will invoke this if a trigger message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected.
ClientDataPassed directly to the handler functions.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
MsgHandlerDcppDispatch() will invoke this if a MsgOut() message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in MsgOut() messages.
tidArgUpdate the DRAMA transaction id in this SDS structure for the started transaction in a form ready for use in a Kick message argument. This is usefull when we might want to kick a spawnable action.

References DcppSpawnKickArgUpdate().

virtual DisconHandler* DcppTask::PutDisconnectHandler ( DisconHandler p)
inlinevirtual

Add a new disconnect handler for this task.

Create a new disconnect handler. This takes an object which implements the abstract class DcppTask::DisconHandler. The Disconnected(DcppTask *) method will be invoked when the task disconnects.

Returns
A pointer to the previous disconnect handler object, if any.
Parameters
pA pointer to the new disconnect handler obgject.
void DcppTask::Report ( StatusType *  status) const

Dump details using MsgOut().

This call causes details of this object to be output using MsgOut().

virtual DcppHandlerRet DcppTask::Set ( const char *const  name,
StatusType *const  status,
const SdsId arg = SdsNull,
const DcppHandlerRoutine  SuccessHandler = 0,
const DcppHandlerRoutine  ErrorHandler = 0,
const DcppVoidPnt  ClientData = 0,
const DcppHandlerRoutine  ErsHandler = 0 
)
inlinevirtual

Send a DRAMA set message to the task.

This is the method for sending an SET message to the task referred to by this object - to set a parameter value. We must already have path to the task.

If this function returns DcppReschedule, then messages are expected and should be dispatched using DcppDispatch() when they arrive. This will ensure that future processing occurs correctly and the the appropriate handler is invoked when the operation completes.

Returns
DcppReschedule if a message was started. Otherwise DcppFinished and status will be set bad.
Parameters
nameThe name of the parameter to set.
statusInherited Status
argThe argument to the message, containing the value for the parameter. Defaults to SdsNull, a null argument.
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.
ErsHandlerDcppDispatch() will invoke this if a Ers message is received. If not specified, DcppDispatch just returns DcppReschedule, which is what your handler would normally return, since more messages are expected. This would normally only happen if the message was sent in UFACE context DitsInterested() was used to indicate an interest in ERS messages.
virtual void DcppTask::SetArgument ( const char *const  LoadArg,
bool const  Append = false 
)
inlinevirtual

Set the load time argument string.

This is a string is becomes the load argument if the task is loaded. For example, under unix it is put into the argv array.

Parameters
LoadArgThe new load argument string.
AppendIf true, append to the previous value, otherwise overwrite.
virtual void DcppTask::SetBuffers ( const DcppBuffers Buffers)
inlinevirtual

Set the DRAMA path buffers.

These are used by by DcppTask::GetPath when getting the path to the task. It is ignored if we already have a path to the task.

virtual void DcppTask::SetFile ( const char *const  File)
inlinevirtual

Set the executable file name.

This is only used if DcppTask::GetPath must load the task

virtual void DcppTask::SetFlowControl ( )
inlinevirtual

Set the FLOW control flag.

This flag is used by DcppTask::GetPath. See DitsPathGet() for more details.

virtual void DcppTask::SetLocation ( const char *const  Location)
inlinevirtual

Set the task location.

This is the location to find the task on (DcppTask::GetPath) if it is not known locally, or to load it on if it is not running

Parameters
LocationThe node name.
virtual void DcppTask::SetName ( const char *const  TaskName)
inlinevirtual

Set the task name.

This is the name to be used on DcppTask::GetPath operations, and is ignored if we already have the path. It can include the nodename using the "taskname\@nodename" format, in which case the node name is removed and used in (in effect) a call to Dcpp::SetLocation.

See also
DcppTask::SetLocation
Parameters
TaskNameThe new name to be used as the task name for this object.
virtual void DcppTask::SetNames ( const bool  Flag = true)
inlinevirtual

Insist that symbols known to IMP_Master be known to the task.

Used to control the inheritance of symbols (logical names and symbols under VMS, environment variables under UNIX) by the new task. If specified, this flag insists that symbols known to the IMP_Master task be inherited by the new task. If not set, it is at the discretion of the master task whether this is done.

Only used when loading the task.

Parameters
FlagThe value for the flag.
virtual void DcppTask::SetPriority ( const int  Priority,
const bool  Absolute = false 
)
inlinevirtual

Set the load time priority for a task when loaded.

Most operating systems allow the priority of a task to be set, through many do now allow a higher priority for unless appropiate privledges are available. This method allows the priority to be set if the task is to be loaded.

Parameters
PriorityThe new priority
AbsoluteIf true, Priority is absolute, otherwise it is relative (an may be negative).
virtual void DcppTask::SetProcess ( const char *const  ProcessName)
inlinevirtual

Set the process names.

Some operatin systems (VMS, VxWorks and Windows) assoicate a process name with a process. This method allow this to be set

Parameters
ProcessNameThe process name string. If a null string, then any previous value is overwritten.
virtual void DcppTask::SetProg ( const bool  Flag = true)
inlinevirtual

Interpert file name as a program name.

Used where the target system is a VMS system to cover any ambiguity in the interpretation of a 'Program' string as either the actual name of a program to be executed or a symbol that causes a program to be executed. If this is set, it forces the string to be interpreted as a program name. (The difference is that a program name needs to be run using a spawned RUN command, or - if no arguments are to be passed to it, by a direct call the the VMS $CREPAR system routine.)

Only used when loading the task.

Parameters
FlagThe value for the flag.
virtual void DcppTask::SetStackSize ( unsigned  bytes)
inlinevirtual

Set the stack size for the load.

Some operating systems (VxWorks) allow you to set the stack size when the program is loaded. This method allows you to set the value. It is ignored for other operation systems.

Parameters
bytesThe number of bytes. If 0, then use the default.
virtual void DcppTask::SetSymbols ( const bool  Flag = true)
inlinevirtual

Interpert file name as a symbol (VMS Target only)

Used where the target system is a VMS system to cover any ambiguity in the interpretation of a 'Program' string as either the actual name of a program to be executed or a symbol that causes a program to be executed. If this is set, it forces the string to be interpreted as a symbol.

Only used when loading the task.

Parameters
FlagThe value for the flag.
void DcppTask::TaskLoggingOff ( )
inline

Turn logging off for this object.

The object no longer log via the DRAMA internal logger, unless overriden by the static log flag or the DRAMA DITS_LOG_LIBS log flag having been set.

void DcppTask::TaskLoggingOn ( )
inline

Turn logging on for this object.

The object will now log via the DRAMA internal logger

const char* DcppTask::TaskName ( ) const
inline

Fetch the task name.

The task name may not be as specified by the constructor in the case where the task was loaded - in that case, the task can specify its own name to DRAMA and that is used.

returns A const pointer to the task name string.


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