AAO DRAMA C++ Interface (Old style)
DRAMA C++, Depreciated, don't use for new code

◆ Initialise()

virtual DcppHandlerRet GitTask::Initialise ( StatusType *  status,
GitTaskResponseHandler responseHandler = 0,
bool  freeResponse = false 
)
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

  • DRAMA networking may be started if supported by a sub-class
  • The task is loaded if it is already running.
  • The path to the task is obtained.
  • The simulation level is set.
  • The task version numbers etc. are fetched.
  • The INITIALISE or RESET 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.

Note
This operation may return DcppFinished with status ok. This will occur if as a result of sub-classing or as a result of the reset mode being Recover, no messages are sent.
If status is set bad on the call (as against during processing of responses, then the response handler is not invoked.
Parameters
statusInherited status
responseHandlerIf 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.
freeResponseIf set true, then the response handler is deleted just after the ok or error completion handler is invoked.