A class built on DcppTask which control AAO GIT Tasks. More...
#include <gittask.h>
Public Types | |
enum | SelfPathType { SelfPath } |
Use to ensure the constructor knows it is constructing a self path. More... | |
Public Member Functions | |
GitTask (const std::string &name, const std::string &node="", const std::string &file="") | |
Construct a GitTask object. More... | |
GitTask (SelfPathType) | |
Path to self constructor. More... | |
virtual void | SetSimulation (const std::string &value, const float TimeBase, const std::string &string, StatusType *status) |
Set simulation and timebase. More... | |
virtual void | SetResetMode (GitResetType &mode, StatusType *status) |
Set the reset mode. More... | |
virtual DcppHandlerRet | Initialise (StatusType *status, GitTaskResponseHandler *responseHandler=0, bool freeResponse=false) |
Perform the complete initialisation sequence for a GIT task. More... | |
virtual DcppHandlerRet | Poll (StatusType *status, GitTaskResponseHandler *responseHandler=0, bool freeResponse=false) |
Send POLL to the GIT task. More... | |
virtual DcppHandlerRet | Exit (StatusType *status, GitTaskResponseHandler *responseHandler=0, bool freeResponse=false) |
Cause a GIT task to exit. More... | |
virtual void | Report (StatusType *status) |
Dump details using MsgOut. More... | |
virtual int | IsActive () const |
Returns true if the task is active (on active list) More... | |
virtual | ~GitTask () |
Destructor. More... | |
![]() | |
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 DisconHandler * | PutDisconnectHandler (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... | |
Protected Member Functions | |
virtual DcppHandlerRet | SendSimulate (StatusType *status) |
Obey the SIMULATE_LEVEL action to the task. More... | |
virtual DcppHandlerRet | GetVersionInfo (StatusType *status) |
Send the parameter get message which fetchs the version details. More... | |
virtual DcppHandlerRet | GetInitialisedPar (StatusType *status) |
Send the parameter get message which fetchs the INITIALISED parameter. More... | |
virtual DcppHandlerRet | HandleVerComp (StatusType *status) |
Continue on after fetch version information. More... | |
virtual DcppHandlerRet | HandleInitParGetComp (bool initialised, StatusType *status) |
Continue on after fetching the INITIALISED parameter value. More... | |
virtual DcppHandlerRet | SendInitialise (StatusType *status) |
Actually send the initialise. More... | |
virtual DcppHandlerRet | NoNetOnRemote (StatusType *status) |
Invoked when the get path operation finds that there is no network on the remote node. More... | |
virtual void | SetInfo (const Arg &info, StatusType *status) |
Set the version information for the sub-tasks. More... | |
virtual void | SetInitial (StatusType *status) |
Set task to its Initial state. More... | |
virtual void | SetPathWait (StatusType *status) |
Indicate we are waiting for a path to the task. More... | |
virtual void | SetInitialising (StatusType *status) |
Indicate we are Initialising the task. More... | |
virtual void | SetResetting (StatusType *status) |
Indicate we are Restting the task. More... | |
virtual void | SetIdle (StatusType *status) |
Indicate the task is idle. More... | |
virtual void | SetExiting (StatusType *status) |
Indicate the task is exiting. More... | |
virtual void | SetFailed () |
Indicate an operation has failed. More... | |
virtual void | SetDied () |
Indicate the task has died. More... | |
virtual DcppHandlerRet | RemoteNetStarted (StatusType *status) |
To be invoked when a REMOTE DRAMA network has started. More... | |
virtual DcppHandlerRet | RemoteNetStartErr (StatusType *status) |
To be invoked when a REMOTE DRAMA network start has failed. More... | |
virtual bool | RecoveryNeeded () |
Returns true if recovery is needed. More... | |
Static Protected Member Functions | |
static DcppHandlerRet | HandleSimSuccess (DcppVoidPnt ClientData, StatusType *status) |
To be invoked when the SIMULATE_LEVEL action completes ok. More... | |
static DcppHandlerRet | HandleSimError (DcppVoidPnt ClientData, StatusType *status) |
To be invoked when the SIMULATE_LEVEL action fails. More... | |
static DcppHandlerRet | HandleInitSuccess (DcppVoidPnt ClientData, StatusType *status) |
To be invoked when the INITIAISE/RESET action completes ok. More... | |
static DcppHandlerRet | HandleInitError (DcppVoidPnt ClientData, StatusType *status) |
To be invoked when the INITIAISE/RESET action fails. More... | |
Protected Attributes | |
int | pollDont |
If > PollRetry, don't poll. More... | |
bool | pollCancelling |
Polling is being cancelled. More... | |
GitResetType | resetMode |
Mode of reset. More... | |
std::string | simulationLevel |
Simulate level. More... | |
std::string | simulationArg |
Extra simulation level argument. More... | |
float | timeBase |
Timebase for simulation. More... | |
bool | havePath |
Set true when we have the path. More... | |
bool | failed |
Task has failed in some way and should be reset on Initiailse() More... | |
bool | amExiting |
Set true when the EXIT message is sent. More... | |
bool | resetting |
Set true if we are resetting. More... | |
bool | firstTime |
Set true for first init attempt. More... | |
std::string | verDate |
From ENQ_VER_DATE parameter. More... | |
std::string | verNum |
From ENQ_VER_NUM parameter. More... | |
std::string | taskDescr |
From ENQ_DEV_DESCR parameter. More... | |
Static Protected Attributes | |
static const int | PollRetry = 5 |
How many times to try poll. More... | |
Friends | |
class | GitTaskActiveList |
class | GitTaskActiveListIterator |
class | GitTaskKnownList |
class | GitTaskKnownListIterator |
Additional Inherited Members | |
![]() | |
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... | |
A class built on DcppTask which control AAO GIT Tasks.
DcppTask intended to abstract the control of tasks which obey the GIT specification.
The basic concept is that much of the time, we will want to perform the same operation (say INITIALISE/RESET) on every task we control. This class can implement that operation using the underlying DcppTask primitives providing us with a simple interface.
Then all we need to do to perform such an action is to loop round a list of the tasks invoking the appropiate function for each task.
Now when a particular type of task needs to modify such an operation, it can sub-class GitTask. Thus the general parts of a control such as Initialisation, are presented with a standard interface, regardless of the types of tasks being controlled.
Each GitTask object may be put on one of two internally supported lists, classes for both of which are defined in the assocaited include file. An object of class GitTaskActiveList is used to maintain a list of the currently controlled tasks. GitTaskKnownList is used to maintain a list of all known task objects, whether currently controlled or not. Note that both these lists are special purpose lists that make use of data storage within the GitTask object type and thus each task can only be on one of each type of this list at a time (which is normally all the the program requires).
We also define an Iterator class for each list type.
For each method which returns a DcppHandlerType, action rescheduling should be handled using DcppDispatch() (or via a DcppHandler object). Each of these such methods also take an optional address of an object of type GitTaskResponseHandler. The CompleteOk() method of this object is invoked if the operation completes ok, whilst the CompleteWithError()method is invoked if it completes in error. The Triggered() method is invoked if a trigger message is received. This object is only used if the call returned DcppReschedule. If not supplied, then a default version is used with does nothing but return DcppFinished such that DcppDispatch()/ DcppHandler() know the action is complete. An optional third argument, freeHandler, can be used to indicate the GitTaskResponseHandler object, if any, should be deleted using the delete operator after the CompleteOk/CompleteError method is invoked. If you want notifiction of completion, you should subclass GitTaskResponseHandler appropiately. There are a set of functions called when the state of the task is seen to change. These may be overriden as required, but the GitTask version should also be invoked. Most take a status argument, but SetFailed() and SetDied() need to work regardless so don't take a status argument.
Use to ensure the constructor knows it is constructing a self path.
This enum has one value, which is passed to the SelfPath constructor to ensure it
GitTask::GitTask | ( | const std::string & | name, |
const std::string & | node = "" , |
||
const std::string & | file = "" |
||
) |
Construct a GitTask object.
Allows the the task name, location and file to be set. Details are the same as the DcppTask:: standard constructor.
name | The name the task will be known as (unless loaded, when the name the task registers as will be used) |
node | The node name on which the task is running or is to be loaded. Only used if not already running locally or known locally. |
file | The 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. |
|
inline |
Path to self constructor.
Constructor a GitTask object which can be used to send messages to the invoking task itself.
self | Distingishes this constructor from the other constructor. Value is ignored, just specify GitTask::SelfPath (an enumerated value) . |
References SetInitial(), and GitResetType::SetRecover().
|
inlinevirtual |
Destructor.
|
virtual |
Cause a GIT task to exit.
This method sends the EXIT action to the task
This function returns DcppReschedule if it sent a message. In that case, replies 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.
status | Inherited status |
responseHandler | If non-null, then this is the address of an object which is notified of the completion of the exit sequence. The GitTaskResponseHandler::CompleteOk method will be invoked on successfull completion of exit whilst GitTaskResponseHandler::CompleteWithError will be invoked if exit operation fails. |
freeResponse | If set true, then the response handler is deleted just after the ok or error completion handler is invoked. |
|
protectedvirtual |
Send the parameter get message which fetchs the INITIALISED parameter.
This method fetchs the parameter named INITIALISED from the task.
The default version sends a MGET message to the task to fetch the value of the INITIALISED parameter. parameters. It then returns DcppReschedule. On completion, it sets the values appropiately and invokes HandleInitParGetComp() to continue the operation. Inheritors which send the message themselves should also do this.
This call is only invoked the first time an attempt is made to initialise this task, any only if the task was not loaded.
status | Inherited status |
|
protectedvirtual |
Send the parameter get message which fetchs the version details.
This method fetchs the task version details
The default version sends a MGET message to the task to fetch the value of the ENQ_VER_DATE, ENQ_VER_NUM and ENQ_VER_DESCR parameters. It then returns DcppReschedule. On completion, it sets the values appropiately and invokes HandleVerComp() to continue the operation. Inheritors which send the message themselves should also do this.
status | Inherited status |
|
staticprotected |
To be invoked when the INITIAISE/RESET action fails.
This function is a DcppTask callback which is invoked when the INITIALISE/RESET action completes with an error.
ClientData | Points to the GitTask object. |
status | Inherited status. |
|
protectedvirtual |
Continue on after fetching the INITIALISED parameter value.
This function is used to continue after the value of the INITIALISED parameter is fetched. It is not normally overriden, but instead invoked by inheriting classes when they have completed the get operation. The returned value is returned to the caller.
initalised | Indicates the task was already initialised. |
status | Inherited status |
|
staticprotected |
To be invoked when the INITIAISE/RESET action completes ok.
This function is a DcppTask callback which is invoked when the INITIALISE/RESET action completes successfully.
ClientData | Points to the GitTask object. |
status | Inherited status. |
|
staticprotected |
To be invoked when the SIMULATE_LEVEL action fails.
This function is a DcppTask callback which is invoked when the SIMULATE_LEVEL action completes with an error.
ClientData | Points to the GitTask object. |
status | Inherited status. |
|
staticprotected |
To be invoked when the SIMULATE_LEVEL action completes ok.
This function is a DcppTask callback which is invoked when the SIMULATE_LEVEL action completes successfully.
ClientData | Points to the GitTask object. |
status | Inherited status. |
|
protectedvirtual |
Continue on after fetch version information.
This function is used to continue after the version details message is invoked. It is not normally overriden, but instead invoked by inheriting classes when they have completed the version get operation. The returned value is returned to the caller.
status | Inherited status |
|
virtual |
Perform the complete initialisation sequence for a GIT task.
Initiate the sequence of operations required to Initialise/Reset a DRAMA task obeying the GIT spec. The sequence is as follows
This function returns DcppReschedule if it sent a message. In that case, replies 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.
status | Inherited status |
responseHandler | If non-null, then this is the address of an object which is notified of the completion of the initialisation sequence. The GitTaskResponseHandler::CompleteOk method will be invoked on successfull completion of initialisation whilst GitTaskResponseHandler::CompleteWithError will be invoked if initialisation fails. |
freeResponse | If set true, then the response handler is deleted just after the ok or error completion handler is invoked. |
|
inlinevirtual |
Returns true if the task is active (on active list)
|
inlineprotectedvirtual |
Invoked when the get path operation finds that there is no network on the remote node.
Invoked if during a get path operation, it is discovered the DRAMA networking is not running on the remote node. By default, this does nothing and the get path operation will fail. But if an inheritor has some way of starting the remote DRAMA networking (say using the DRAMA Unix Start Server) then it should initiate that operation at this point and return DcppReschedule. It should then invoke either GitTask::RemoteNetStarted or GitTask::RemoteNetStartErr when it had ether started the networking or it has failed.
status | Inherited status |
References DcppFinished.
|
virtual |
Send POLL to the GIT task.
The POLL action is sent to the task.
This function returns DcppReschedule if it sent a message. In that case, replies 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.
status | Inherited status |
responseHandler | If non-null, then this is the address of an object which is notified of the completion of the poll action. The GitTaskResponseHandler::CompleteOk method will be invoked on successfull completion of polling whilst GitTaskResponseHandler::CompleteWithError will be invoked if polling fails. GitTaskResponseHandler::Triggered will be invoked each time a trigger message is received. |
freeResponse | If set true, then the response handler is deleted just after the ok or error completion handler is invoked. |
|
protectedvirtual |
Returns true if recovery is needed.
This function is invoked if GitTask is resetting the task and the reset mode is recover. In this case, this function should return true if a reset operation should be sent (argument to the RESET will be (RECOVER). Otherwise it should return false, and no RESET command will be sent to the task.
The default version of this function returns false all the time, such that we do not RESET tasks which we are already talking to, if the reset mode is RECOVER. An inheritor should consider the current state of the task.
|
protectedvirtual |
To be invoked when a REMOTE DRAMA network has started.
If an inheritor is trying to start a REMOTE DRAMA network, after overriding GitTask::NoNetOnRemote it must invoke this method to tell GitTask that the remote DRAMA network has been started and GitTask can now try again to load the task
status | Inherited status. |
|
protectedvirtual |
To be invoked when a REMOTE DRAMA network start has failed.
If an inheritor is trying to start a REMOTE DRAMA network after overriding GitTask::NoNetOnRemote, and that operation has failed, it must invoke this method to tell GitTask of the failure. The failure status should be available in DitsGetEntStatus()
status | Inherited status. |
|
virtual |
Dump details using MsgOut.
This call causes details of this object to be output using MsgOut(). (This adds the GIT task version details to the details normally output by the DcppTask::Report - hiding that function.)
|
protectedvirtual |
Actually send the initialise.
Actually sends the INITIALISE/RESET action to the task.
If the task is being reset, then the default vesion sends the RESET action with an appropiate argument. Otherwise, it sends the INITIALISE action. A task is RESET if it was already running (it did not have to be loaded). If a inheritor sends the message itself, then it should invoke GitTask::HandleInitSuccess / GitTask::HandleInitError when the operation completes, with the object address as the client data item. This will ensure the chain continues. If an inheritor is not sending a message it can just return DcppFinished.
status | Inherited status |
|
protectedvirtual |
Obey the SIMULATE_LEVEL action to the task.
This method sends the SIMULATE_LEVEL action to the task.
The default version fetches the simulation string and timebase and sends these as parameters of a SIMULATE_LEVEL action. If a inheritor sends the message itself, then it should invoke GitTask::HandlerSimSuccess / GitTask::HandleSimError when the operation completes, with the object address as the client data item. This will ensure the chain continues. If an inheritor is not sending a message it can just return DcppFinished immediately.
status | Inherited status |
|
inlineprotectedvirtual |
Indicate the task has died.
|
inlineprotectedvirtual |
Indicate the task is exiting.
Invoked when an exit has been invoked.
status | Inherited status |
|
inlineprotectedvirtual |
Indicate an operation has failed.
|
inlineprotectedvirtual |
Indicate the task is idle.
Invoke when Initialise/Reset has completed.
status | Inherited status |
|
protectedvirtual |
Set the version information for the sub-tasks.
Invoked when the task details from the ENQ_VER_NUM, ENQ_VER_DATE and ENQ_TASK_DESCR parameters has been fetch. The argument contains the relevant values, which are by default put into the verNum, verData and taskDescr variables.
info | An Arg (SDS) structure containing all the details. |
status | Inherited status |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Indicate we are Initialising the task.
Invoked when we start initialising a loaded task.
status | Inherited status |
|
inlineprotectedvirtual |
Indicate we are waiting for a path to the task.
Invoked while we are waiting for the path to the task.
status | Inherited status |
|
inlinevirtual |
Set the reset mode.
This Should be done prior to calling GitTask::Initialise
mode | The required reset mode. |
status | Inherited status |
|
inlineprotectedvirtual |
Indicate we are Restting the task.
Invoked when we start the reset procedure.
status | Inherited status |
|
virtual |
Set simulation and timebase.
Set the simulation level and timebase values to be used when the SIMULATE_LEVEL action is sent to the task.
value | The simulation level, as accpeted by the target task, and normally as appropiate for the GIT spec, Normally one of NONE or FULL. |
TimeBase | The simulation time base. The meaning of this depends on the target target but it often means that any simulation runs this times faster then normal. Many GIT tasks ignore this value. |
string | An extra string which is stored in the simulationArg protected variable. It may or may not be used as an extra argument to the simulation level action, depending on how a sub-class is implemented. The default implementation does not use this value. |
status | Inherited status. |
|
protected |
Set true when the EXIT message is sent.
|
protected |
Task has failed in some way and should be reset on Initiailse()
|
protected |
Set true for first init attempt.
|
protected |
Set true when we have the path.
|
protected |
Polling is being cancelled.
|
protected |
If > PollRetry, don't poll.
|
staticprotected |
How many times to try poll.
|
protected |
Mode of reset.
|
protected |
Set true if we are resetting.
|
protected |
Extra simulation level argument.
|
protected |
Simulate level.
|
protected |
From ENQ_DEV_DESCR parameter.
|
protected |
Timebase for simulation.
|
protected |
From ENQ_VER_DATE parameter.
|
protected |
From ENQ_VER_NUM parameter.
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