Measure Reference Manual

Header Record
Use the template structure CONTAB^HDR to define the header record, which contains:
DescriptionVariable
The numeric value 50 or the literal CONTAB^T (declared in the MEASDECS file). This
field identifies this record as the header record.
Type
The length of the entire configuration table, in bytes.Len
An array of offsets in bytes that point to each entity type’s descriptor section within the
table. The first word of the array is always zero. The following offsets are ordered by
Sections
entity type number and indexed to the beginning of the configuration table. (For a
description of entity type numbers, see Chapter 5: Entity Descriptors (page 451).) If an
entity type is not being measured, its offset is zero.
The header format. Maxents is the first element in the sections array (that is,
SECTIONS[0]).
Maxents
NOTE: If you have older custom programs that do not use this header format, recompile those
programs.
Entity Descriptor Sections
The body of the configuration table is an array of entity descriptors. The entity descriptors are
grouped into sections according to entity type, with the sections ordered by their numeric identifiers.
All CPU descriptors (type number 1) appear first, followed by all PROCESS descriptors (type number
2), then all PROCESSH descriptors (type number 3), and so on.
If an entity type is not being measured, do not include a section for that type.
DELETE descriptors take precedence over ADD descriptors. If a match is found in the contab on
an ADD descriptor, the return value is tentatively set to true. However, if a match is then found on
a DELETE descriptor, a return value of false is immediately returned.
Trailer Record
Use the template structure CONTAB^TRAILER to define the trailer record. It contains:
DescriptionVariable
The numeric value 51 or the string literal CONTAB^TRAILER^T (declared in the
MEASDECS file). This field identifies this record as the trailer record.
Type
The length of the trailer record, in bytes.Len
Use the template structure CONTAB^TRAILER to define the trailer record and to assign the literal
CONTAB^TRAILER^T to the type field.
Interpreting Error Codes in Measure Procedures
The Measure procedures are integer function procedures that return an error word. If no error
occurs, the procedures return 0 (zero) in the error word. If an error occurs, the procedures return
an error code.
Errors unique to the Measure procedures have error codes between 3200 and 3499 and are
described in Appendix B: Error Codes (page 518). The MEASDECS file declares literal identifiers
for the error codes.
The Measure procedures use space on your program data stack to execute. (The maximum space
used by a Measure procedure is approximately three pages.) If you receive an invalid address
reference trap (trap 0) or a stack overflow trap (trap 3) while a Measure procedure is executing,
378 Measure Callable Procedures