;-----------------------------------------------------------------------
;
;  Super damper position memories.  These are also known as the Shea
;  memories.  There are four of them per super damper, forming a
;  a single (logical) 4-way interleaved memory of position readings.
;
;  We do not de-interleave them here.  Instead, you have to provide
;  four separate database devices, one for each memory card.
;
;  All we provide is a reading property.  We do not deal here with the
;  enable/disable: that is up to the application program.
;
;  The SSDN for the reading property looks like this:
;
;	SSDNHX READNG ( 5DFF/nncc/0000/0000 )
;
;			nn = slot
;			cc = crate
;
;  The memories provide 21 bits of data, which we read in 4-bytes per
;  entry format.  The entries look like this:
;
;			+-------------------------------+	
;   low 6 bits of bunch	| bunch # |     beam position   | 10 bit A/D
;			+-------------------------------+	
;			| 11 bits of 0's | more bunch # | high 5 bits
;			+-------------------------------+	
;
;  In Fortran, you can read this directly into an INTEGER*4 array and
;  extract the entries as follows:
;
;	beam position = JIAND(N, '3FF'X)
;	bunch number  = JIAND(N, '1FFC00'X) / 1024
;
;  There are 16k entries per memory board, so that the total amount of
;  data for one database device (a single board) is 4*16k = 64k bytes.
;  The database does not allow such a big maximum length.  It is also
;  bigger than any PDP-11 software can ever hope to handle one chunk.
;
;  We fool the database as follows.  In your call to DPREQ you specify
;  the length (in bytes) of the chunk you want to read.  This length
;  can't be greater than 4kb (1k points).  You also specify an 'offset'
;  parameter.  However the 'offset' parameter is really scaled in
;  points (0-16k), not in the more usual bytes (0-64k).  You can think
;  of the 'offset' as a code telling me which memory point to start
;  reading.  The database needs to have a maximum length of 19k bytes,
;  because it thinks that your maximum read is a length of 4k bytes
;  from an 'offset' of '15k bytes'.
;
;-----------------------------------------------------------------------
