c**********
c
c Include files for lower level routines using the message queue, contains
c structure definitions and mask bits for modifying message GETs and SENDs
c
c Author: SES	1/25/93
c
c $Revision: 1.2 $
c $Modtime:   06 Mar 1996 12:19:08  $
c
c**********

c M$MSGFUNC() argument definitions
	integer*4 MSGF_INIT,MSGF_QUEUED,MSGF_INPTR,MSGF_OUTPTR
	parameter (MSGF_INIT=1,MSGF_QUEUED=2,MSGF_INPTR=3,MSGF_OUTPTR=4)
	integer*4 MSGF_MAP,MSGF_READERS,MSGF_BCREADERS
	parameter (MSGF_MAP=5,MSGF_READERS=6,MSGF_BCREADERS=7)

c M$GET_MSG and M$SEND_MSG mask values by bit number (use IBSET)
	integer*4 MQB_SENDER, MQB_READER, MQB_NAME, MQB_MODE
	integer*4 MQB_ANYREADER, MQB_LAST, MQB_CLEAR, MQB_NOWARN
	integer*4 MQB_TOP, MQB_PEEK, MQB_KEEP, MQB_ADVANCE, MQB_NOLOCK
	integer*4 MQB_UPDATE
	parameter (MQB_SENDER=1, MQB_READER=2, MQB_NAME=3, MQB_MODE=4)
	parameter (MQB_ANYREADER=5, MQB_LAST=6, MQB_CLEAR=7, MQB_NOWARN=8)
	parameter (MQB_TOP=9, MQB_PEEK=10, MQB_KEEP=11, MQB_ADVANCE=12)
	parameter (MQB_NOLOCK=13, MQB_UPDATE=14)

c M$GET_MSG and M$SEND_MSG mask values (use +)
	integer*4 MQK_SENDER, MQK_READER, MQK_NAME, MQK_MODE
	integer*4 MQK_ANYREADER, MQK_LAST, MQK_CLEAR, MQK_NOWARN
	integer*4 MQK_TOP, MQK_PEEK, MQK_KEEP, MQK_ADVANCE, MQK_NOLOCK
	integer*4 MQK_UPDATE
	parameter (MQK_SENDER=2, MQK_READER=4, MQK_NAME=8, MQK_MODE=16)
	parameter (MQK_ANYREADER=32, MQK_LAST=64, MQK_CLEAR=128)
	parameter (MQK_NOWARN=256, MQK_TOP=512, MQK_PEEK=1024)
	parameter (MQK_KEEP=2048, MQK_ADVANCE=4096, MQK_NOLOCK=8192)
	parameter (MQK_UPDATE=16384)
c
	integer*4 BYTES_PER_SLOT
	parameter (BYTES_PER_SLOT=8)
	integer*4 SLOTS_PER_HOM_MQH
	parameter (SLOTS_PER_HOM_MQH=4)
	integer*4 SLOTS_PER_HET_MQH
	parameter (SLOTS_PER_HET_MQH=15)
	integer*4 MAX_MESSAGE_ID
	parameter (MAX_MESSAGE_ID=4095)
	integer*4 MAX_BROADCAST_ID
	parameter (MAX_BROADCAST_ID=127)
	integer*4 SLOTS_PER_BROADCAST
	parameter (SLOTS_PER_BROADCAST=2)
c
	STRUCTURE /MQ_QUEUESLOT/
	  integer*4	reader		! who's the msg to ?
	  integer*2	nslots		! total # slots in the msg
	  character	type		! msg type (A,D,F,L,I,B or H)
	  byte		nhslots		! # slots in just the header
	END STRUCTURE

	STRUCTURE /MQ_HEADER/
	  integer*4	reader		! who the message is to
	  integer*2	nslots		! msg to id, # slots for entire msg
	  character	type		! message type
	  byte		nhslots		! # slots for msg header only
	  integer*4	sender		! who the message is for
	  integer*4	ndata		! # data values
	  integer*4	info		! extra mesg data, mode field
	  integer*4	mode		! extra mesg data, mode field
	  character*8	name		! message name string
	  integer*2	ntype		! length of types string
	  character*86	types		! non-homogeneous types string
	END STRUCTURE
c
