Tree Data Interface Descriptors
TDISHR Descriptors
A descriptor has information about a block
of memory. All forms used in TDISHR have:
dsc$w_length element length in bytes
dsc$b_dtype element data type
dsc$b_class descriptor type
dsc$a_pointer the address of the first element
DSC$K_CLASS_A descriptors add
dsc$b_scale a binary or decimal scaling (not used in TDISHR)
dsc$b_digits decimal digits (not used in TDISHR)
dsc$b_aflags flag bits
dsc$b_dimct the number of dimensions
dsc$l_arsize number of bytes (digits or bits)
if dsc$b_aflags.dsc$v_fl_coeff also add
dsc$a_a0 address of index 0
dsc$a_m[dsc$b_dimct] multipliers
followed by dsc$b_dimct pairs dsc$bounds.dsc$l_l and dsc$bounds.dsc$l_u,
if dsc$b_aflags.dsc$v_fl_bounds is set.
DSC$K_CLASS_R descriptors add dsc$b_ndesc in a longword as a count
of the number of descriptor pointers that follow, maximum 255.
DSC$K_CLASS_XD and DSC$K_CLASS_XS descriptors have a
longword count of
the number of bytes used, dsc$l_length.
Class
A data class is the form of the data, it is not the length or type.
Some data types, however, appear in only certain classes. The classes
used by TDISHR are:
DSC$K_CLASS_S static, scalars of fixed length.
DSC$K_CLASS_D dynamic, (text) scalar of varing length,
dynamically allocated, limited to 65535 bytes.
DSC$K_CLASS_A array, arrays of fixed element length.
DSC$K_CLASS_XD extended dynamic, contiguous data block.
DSC$K_CLASS_XS extended static, contiguous data block.
DSC$K_CLASS_R record, a list of descriptor pointers and
a single pointer to an operation code.
DSC$K_CLASS_CA array descriptor with a pointer to further
evaluate data, which is usually compress
data. DATA(CLASS_CA) is a CLASS_A.
DSC$K_CLASS_APD array of pointers to descriptors. EVALUATE(APD)
is an array of the pointed-to objects.
Class-R descriptors always have MDS types, excluding NIDs, PATHs,
and EVENTs. The other MDS types appear in class-R descriptors and
could be in CLASS_APD lists (not today).
Class-XD descriptors are used to return any data form described by
the pointed-to descriptors and thus will have DSC$K_DTYPE_DSC dtype.
Dtype/Kind
The kind (Fortran-90) or data type (VMS) of some
information tells its characteristics.
Logicals are stored in DTYPE_BU as 0 for false and 1 for true.
Any integer type may be tested as a logical using the low bit.
The unsigned integer dtypes are:
DSC$K_DTYPE_BU byte unsigned (1 byte)
DSC$K_DTYPE_WU word unsigned (2 bytes)
DSC$K_DTYPE_LU longword unsigned (4 bytes)
DSC$K_DTYPE_QU quadword unsigned (8 bytes)
DSC$K_DTYPE_OU octaword unsigned (16 bytes)
The two's-complement signed integer dtypes are:
DSC$K_DTYPE_B byte signed (1 byte)
DSC$K_DTYPE_W word signed (2 bytes)
DSC$K_DTYPE_L longword signed (4 bytes)
DSC$K_DTYPE_Q quadword signed (8 bytes)
DSC$K_DTYPE_O octaword signed (16 bytes)
The floating point real number types are:
DSC$K_DTYPE_F float (24 bit fraction, 10^38 exponent range)
DSC$K_DTYPE_D double (56 bit fraction, 10^38 exponent range)
DSC$K_DTYPE_G double (52 bit fraction, 10^307 exponent range)
DSC$K_DTYPE_H quad (113 bit fraction, 10^4931 exponent range)
Two floating point reals are used to form complex number types:
The real part is first and the imaginary part is second.
DSC$K_DTYPE_FC float complex (8 bytes)
DSC$K_DTYPE_DC double complex (16 bytes)
DSC$K_DTYPE_GC double complex (16 bytes)
DSC$K_DTYPE_HC quad complex (32 bytes)
Text is:
DSC$K_DTYPE_T ASCII text
MDSplus "data" dtypes are:
DSC$K_DTYPE_MISSING internal missing argument, 0 or blanks
DSC$K_DTYPE_IDENT internal text-like form or variable name
DSC$K_DTYPE_NID 4-byte node identifier.
DSC$K_DTYPE_PATH text-like form of node identifier
DSC$K_DTYPE_EVENT text-like form of event identifier
MDSplus record (class-R) dtypes are:
DSC$K_DTYPE_PARAM value, help, validation
DSC$K_DTYPE_SIGNAL data, raw, dimensions
DSC$K_DTYPE_DIMENSION window, axis
DSC$K_DTYPE_WINDOW startidx, endidx, value_at_idx0
DSC$K_DTYPE_SLOPE axis with slope, [begin], [end],...
DSC$K_DTYPE_FUNCTION arguments (uses word opcode)
DSC$K_DTYPE_CONGLOM image, model, name, qualifiers
DSC$K_DTYPE_RANGE begin, end, [delta]
DSC$K_DTYPE_ACTION dispatch, task
DSC$K_DTYPE_DISPATCH ident, phase, when, completion
DSC$K_DTYPE_PROGRAM time_out, program
DSC$K_DTYPE_ROUTINE time_out, image, routine, arguments
DSC$K_DTYPE_PROCEDURE time_out, language, procedure, arguments
DSC$K_DTYPE_METHOD time_out, method, object, arguments
DSC$K_DTYPE_DEPENDENCY arguments (uses byte opcode)
DSC$K_DTYPE_CONDITION condition (uses byte opcode)
DSC$K_DTYPE_WITH_UNITS data, units
DSC$K_DTYPE_CALL image, routine, arg...