MsgOut - Sends a message to the user interface.


Sends a message to the user interface.


This routine creates a \typeit{DITS\_MSG\_MESSAGE} message and sends it to the initiator of the current action. Normally, such a message will be forwarded to the user interface.

The format and it's arguments are the the same as used by the \typeit{printf} C RTL function.

The initiator of the current action may choose to handle the message itself or to forward it to its own initiator (See DitsInterested). In any case, at some level, the message must be handled and if appropriate, output to the user interface.

When an initiating action selects to handle such messages, it will be invoked with a reason code of DITS_REA_MESSAGE. The action can obtain the details of the message by fetching its argument using DitsGetArgument. This will return an Sds id of an item with two components. The first component is a one dimensional character string named TASKNAME, which contains the task name of the originator of the message. The second component is a two dimensional character array, named MESSAGE. This component is an array of the message texts. (currently, the second dimension is always 1).

When this routine is called by a routine with the context DITS_CTX_UFACE, there is no originator to send the message to. Such message will be output using the routine will be output using the routine specified with DitsUfacePutMsgOut or simply be output to stdout in the format "taskname:message" if no such routine has been put.




(Void) = MsgOut (status, format, [arg ,[...]])


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

!statusStatusType *Modified status.
>formatChar *A format statement. See the description of the C printf function.
>argassortedFormating arguments. Set the description of the C printf function.

Include files


External functions used

va_startCrtl Start a variable argument session.
va_argsCrtl Get an argument.
va_endCrtl End a variable argument session.
vprintfCrtl Formated print (with variable arg list).
printfCrtl Formated print.
Dits___SendTapImp internal Send a message to the originator of an action.
SdsNewSds Create a Sds item.
SdsPutSds Put data into an sds item.
SdsDeleteSds Delete an Sds item.
SdsFreeIdSds Free an Sds id.
ErsVSPrintfErs Formated print to a string (with variable arg list).

External values used

DitsTask - details of the current task.

Prior requirements

Can only be called from a Dits application routine or a user interface response routine.

See Also

The Dits Specification Document, DitsUfacePutMsgOut(3), Ers specification.


Tony Farrell, AAO

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

 For more information, contact