Guardian Programmer's Guide

Table Of Contents
Communicating With a TACL Process
Guardian Programmer’s Guide 421922-014
8 - 20
Causing the TACL Process to Display Text
STRING .CI^NAME[0:MAXLEN - 1]; !CI process name
! Set up the correct message code:
WAKEUP^MSG.MSGCODE := -20;
! Open the TACL process:
CI^NAME ':=' "$G55";
LENGTH := 4;
ERROR := FILE_OPEN_(CI^NAME:LENGTH,CI^NUM);
IF ERROR <> 0 THEN CALL DEBUG;
! Write the Wakeup message to the TACL process:
CALL WRITE(CI^NUM,WAKEUP^MSG,2);
IF <> THEN CALL DEBUG;
END;
Causing the TACL Process to Display Text
You can cause a TACL process to display text on the terminal by sending a Display
message to it. The TACL process displays the text sent in the message before the
next command prompt.
The message code for the Display message is -21. The complete structure of the
message is shown below:
Note. The recommended way of determining the name of your creator process is to obtain its
process handle using the PROCESSPAIR_GETINFO_ procedure, then pass the process
handle to the PROCESSHANDLE_DECOMPOSE_ procedure to obtain the process name.
For brevity, however, the above example simply uses the hard-coded name. For information
about the PROCESSPAIR_GETINFO_ and PROCESSHANDLE_DECOMPOSE_ procedures,
see Section
16, Creating and Managing Processes, or the Guardian Procedure Calls
Reference Manual.
Display message structure:
STRUCT DISPLAY^MSG;
BEGIN
INT MSGCODE; !value -21
STRING TEXT[0:n-1]; !n <= 132
END;