[comp.os.vms] Can I set an AST for BRDCST messages?

nagy%warner.hepnet@LBL.GOV (Frank J. Nagy, VAX Wizard & Guru) (06/04/88)

> I am looking for a way to set an AST for receiving a broadcast message
> from $BRKTHRU and handling it. I know its possible because TPU seems
> to do it nicely but I can't find how. Since I want to handle the
> message SET BROADCAST is not enough, and since the message is an
> asynchronous event I assume I need an AST.
     
There are two ways to do this.

#1: Use the SMG routines.  SMG provides routines for handling broadcast
    messages, including getting a notification AST.  See the descriptions
    of the SMG routines and the introductory SMG chapter in the RunTime
    Library manuals.

#2: Create a temporary mailbox and associate this with a channel open to
    the terminal.  The simpliest way to do this is with LIB$ASN_WITH_MBX
    which encapsulates the $CREMBX and $ASSIGN.  You then do a $QIO to
    read from the mailbox with a completion AST.  Broadcast notification
    messages come via the mailbox.  This is descibed in the chapter on
    the terminal driver in the I/O User's Guide Part 1.
    

= Frank J. Nagy   "VAX Guru & Wizard"
= Fermilab Research Division EED/Controls
= HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY)
= BitNet: NAGY@FNAL
= USnail: Fermilab POB 500 MS/220 Batavia, IL 60510

GG.SPY@ISUMVS.BITNET ("John Hascall") (06/04/88)

> Date:         Thu, 2 Jun 88 19:09:00 O
> Sender:       INFO-VAX Discussion <INFO-VAX@UBVM>
> From:         TENE@TECHMAX
> Subject:      Can I set an AST for BRDCST messages?
> To:           John Hascall <GA.JPH@ISUMVS>
>
> I am looking for a way to set an AST for receiving a broadcast message
> from $BRKTHRU and handling it. I know its possible because TPU seems
> to do it nicely but I can't find how. Since I want to handle the
> message SET BROADCAST is not enough, and since the message is an
> asynchronous event I assume I need an AST.
>
> What kind of AST is it?
> HOW do I set such an AST?
>
> Does anybody have any clues?
>

      1) use SYS$CREMBX to create a mailbox (and assign a channel to it)
      2) use SYS$ASSIGN to assign a channel to the terminal and associate
             the mailbox to the terminal
      3) use SYS$QIOW specifying the mailbox_channel and function
             IO$_SETMODE+IO$M_READATTN and an AST_RTN

      now in the AST_RTN you will need to
          1) read the mailbox channel using SYS$QIOW (the format of the
             message is in the I/O user's refernece manual Vol 1 in
             either the terminal driver or mailbox driver section)
          2) re-enable the READATTN as in 3) above

John Hascall
Iowa State Univ Computation Center
Ames, Iowa