DitsPutArgument - Set the argument to return if the action completes.

Function

Set the argument to return if the action completes.

Description

Called by an Action routine to set the argument structure to be returned if this action completes.

It saves the argument for use when the action returns. This routine only has an effect if an appropriate request is put with DitsPutRequest. The appropriate requests are

DITS_REQ_END Action to complete immediately
DITS_REQ_EXIT Action to complete immediately and task to exit.

The argument is encoded in Sds, hence this routine simply does an SdsCopy of the argument or saves its id depending upon the flag.

There are no restrictions on the argument, any value which can encoded in Sds may be supplied as an argument, although there may be limitations to the size of messages which can be sent. See DitsAppInit(3) and DitsPathGet(3) for details of such limitations.

Normally, arguments are encoded and decoded using the ARG package (supplied as part of SDS), but this is not required.

Note, this function is implemented as a macro in C.

Language

C

Call

(Void) = DitsPutArgument (argument, flag, status)

Parameters

(">" input, "!" modified, "W" workspace, "<" output)

>argumentSdsIdTypeThe argument to return. This should be the Sds Id of the argument.
>flagDitsArgFlagTypePossible values are

DITS_ARG_COPY A copy is made of the argument using SdsCopy and this copy is deleted after the action completes.
DITS_ARG_DELETE No copy is made, the original argument is deleted after the action completes using SdsDelete, followed by SdsFreeId(). You should not delete this item yourself.
DITS_ARG_READFREE No copy is made, the original argument is read-free-ed after the action completes using SdsReadFree(), followed by SdsFreeId().
DITS_ARG_FREEID No copy is made. the original argument is free-ed using SdsFreeId() after the action completes.
DITS_ARG_NODELETE The argument is not copied and not deleted and not read-free-ed. You should not delete this item yourself until after this reschedule of this action exit.

!statusStatusType *Modified status.

Include files

DitsFix.h

External functions used

SdsCopySDS Makes a copy of the argument.

External values used

DitsTask - Details of the current task

Prior requirements

Can only be called from a Dits application routine

See Also

The Dits Specification Document, DitsGetArgument(3), Sds manual.

Support

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aao.gov.au