Documentation:Reference:TDI B2 - MdsWiki
Navigation
Personal tools

From MdsWiki

Jump to: navigation, search

BUILD_METHOD (TIME_OUT,METHOD,OBJECT,[ARG]...)

MDS Operation. Make a method descriptor.

Arguments Optional: ARG,... .
TIME_OUT real scalar.
METHOD character scalar.
OBJECT character scalar.
ARG,... as needed by METHOD applied to OBJECT.
Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. None, normally done by module add routine.

BUILD_PARAM (VALUE,HELP,VALIDATION)

MDS Operation. Make a parameter descriptor.

Arguments
VALUE any.
HELP character. Textual information about VALUE.
VALIDATION logical scalar. $VALUE may be used by VALIDATION to
test VALUE without explicit reference to a tree path.
$THIS will give the parameter descriptor itself.
$VALUE and $THIS may only be used within GET_DATA
evaluations of the arguments.
>>>>>>>>>WARNING Use of $THIS and $VALUE may be infinitely recursive.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. BUILD_PARAM(42.0,'The answer.',
$VALUE > 6 && HELP_OF($THIS) <> "").
DATA(above) is 42.0 and VALIDATION(above) is 1BU.

BUILD_PATH (STRING)

MDS Operation. Make a path (tree location) descriptor.

Argument. STRING must be a character scalar expression.

Result.. Class-S, data type-PATH descriptor.
Immediate at compilation.

Example. BUILD_PATH('\TOP.XRAY:LEADER') makes a path that can be
evaluated.

BUILD_PROCEDURE (TIME_OUT,LANGUAGE,PROCEDURE,[ARG],...)

MDS Operation. Make a procedure call

Arguments Optional: ARG,... .
TIME_OUT real scalar.
LANGUAGE character scalar. The language in which the procedure
is written.
PROCEDURE character scalar.
ARG,... as needed by the procedure.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. None, normally done by module add routine.

BUILD_PROGRAM (TIME_OUT,PROGRAM)

MDS Operation. Make a program call

Arguments
TIME_OUT real scalar.
PROGRAM character scalar. The name of a program to be run.
The program must be responsible for entering its data in
the tree.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.
Example. BUILD_PROGRAM(1.2,'MYDISK:MYPROGRAM').

BUILD_RANGE ([START],[END],[DELTA])

MDS Operation. Make a range descriptor.
Usual Form START .. END [.. DELTA] or START : END [: DELTA].

Arguments Optional: DELTA; START and END when used as subscript
limits. See the specific routine; otherwise, required.
START scalar. The starting value.
END scalar. The last value.
DELTA scalar. The increment. Default is one.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.
This uses a data type RANGE, whereas
DTYPE_RANGE(START,END,DELTA) is a function.
On evaluation, the compatible data type.
A vector of length max((END - BEGIN)/DELTA,0) elements.

The first value will be BEGIN and successive values will
differ by DELTA. The last value will not be futher from
BEGIN than END.
>>>>>>>>>WARNING, the number of element cannot always be predicted
for fractional delta, 1:2:.1 may have 10 or 11 elements.
>>>>>>>>>WARNINGS, the colon (:) form may be confused with a tree member
and the dot-dot (..) form is hard to read/understand,
use spaces.

Examples. 2..5 becomes [2,3,4,5] and 2:5:1.8 becomes [2.,3.8].

BUILD_ROUTINE (TIME_OUT,IMAGE,ROUTINE,[ARG],...)

MDS Operation. Make a routine descriptor.

Arguments Optional: ARG,... .
TIME_OUT real scalar.
IMAGE character scalar.
ROUTINE character scalar.
ARG,... as needed by the routine.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. BUILD_ROUTINE(1.2,MYIMAGE,MYROUTINE,5).

BUILD_SIGNAL (DATA,RAW,[DIMENSION,...])

MDS Operation. Make data with dimensions.

Arguments Optional: DIMENSION,... .
DATA any expression. It may include $VALUE for RAW without a
tree reference or $THIS to refer to the whole signal.
$VALUE and $THIS may only be used within GET_DATA
evaluations of the signal.
>>>>>>>>>WARNING Use of $THIS and $VALUE may be infinitely recursive.
RAW any expression. Usually the actual stored integer data.
DIMENSION,... dimension descriptor. The number of dimension
descriptors must match rank of DATA.
>>>>>>>>>WARNING, if the dimension is not of data type dimension, then
subscripting is by index value and not axis value.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. BUILD_SIGNAL(BUILD_WITH_UNITS($VALUE*6,'m/s^2'),
BUILD_WITH_UNITS(5./1024*[1,2,3],'V'),
BUILD_DIMENSION(BUILD_WINDOW(0,2,10.),
BUILD_SLOPE(BUILD_WITH_UNITS(3.,'s'))))

BUILD_SLOPE (SLOPE,[BEGIN,[END]]...)

MDS Operation. Make a piece-wise linear slope-axis for dimension.
>>>>>>>>>WARNING, this is a deprecated feature and there is no assurance
of future support.

Arguments Optional: BEGIN, END, and more segments.
SLOPE real scalar. Ratio of change of axis to change of index.
BEGIN real scalar. Axis starting point.
END real scalar. Axis ending point, the last value.

Note. The axis may be divided into multiple segments.
Without a window ISTART, there must be a first BEGIN.
If the slope is used in a dimension with a window, then
the greater of the window's ISTART or the first BEGIN is
used and the lesser of the window's IEND or the last END
is used, assuming positive slope.

Signals. None.
Units... Combined from SLOPE and BEGIN. END units are combined
from the first segment if no BEGIN is applied.
Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Examples. BUILD_SLOPE(3.0) is a constant ratio of 3 axis values
per index step. Axes can be infinite in extent.
A finite axis of BUILD_SLOPE(3,12,21) has data points
[12,15,18,21].
BUILD_SLOPE(3.0,,10.,4.0,20.0) has points at
...,4.0,7.0,20.0,24.0,28.0,... . Note that the dead zone
from 10 to 20 is absent and that thus 10.0 becomes 20.0.
Often BEGIN[j+1] is the same as END[j] + SLOPE[j] as in
a clock that does not stop but does change rate.

BUILD_WINDOW ([ISTART],[IEND],[X_AT_0])

MDS Operation. Make a window descriptor for a dimension.

Arguments Optional: ISTART, IEND, X_AT_0.
ISTART integer scalar. First element stored.
IEND integer scalar. Last element stored.
X_AT_0 real scalar. Value at index zero.
The effective defaults are -HUGE(1), +HUGE(1), and zero.
If missing completely, the beginning of the axis is
used for X_AT_0 when evaluating a dimension.

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. BUILD_WINDOW(-1024,7168,BUILD_WITH_UNIT(-0.1,'s'))

BUILD_WITH_UNITS (DATA,UNITS)

MDS Operation. Make a describe data with units.

Arguments
DATA any expression that DATA(this) will be valid.
UNITS character string. See the primary section on "Units".

Result.. Class-R descriptor.
Use BUILD_xxx for immediate structure building.
Use MAKE_xxx in FUNs for evaluated non-PUBLIC variables.

Example. _S = BUILD_WITH_UNITS($VALUE*6,'m/s^2') can be used in a
BUILD_SIGNAL(_S,BUILD_WITH_UNITS(5./1024*raw_node,'V')
or similar. Note this could also have been
BUILD_WITH_UNITS(BUILD_SIGNAL($VALUE*6,
BUILD_WITH_UNITS(5./1024*raw_node,'V')),'m/s^2').

BUILTIN_OPCODE (STRING)

MDS Character Elemental. Convert string to a builtin value.

Argument. STRING must be character.

Signals. Same as STRING.
Units... None, bad if STRING has units.
Form.... Unsigned word of same shape.

Result.. The number associated with the builtin name.
Builtin names are like "BUILTIN_OPCODE".

Example. BUILTIN_OPCODE('$') is 0.

BYTE (A)

Conversion Elemental. Convert to one byte integer.

Argument. A must be numeric.

Signals. Same as A.
Units... Same as A.
Form.... Byte-length integer of same shape.

Result.. The truncated whole part of A.
Immediate at compilation.
>>>>>>>>>WARNING, truncation does not cause an error.

Examples. BYTE(123) is 123B. BYTE(257) is 1B.

BYTE_UNSIGNED (A)

Conversion Elemental. Convert to one byte unsigned integer.

Argument. A must be numeric.

Signals. Same as A.
Units... Same as A.
Form.... Byte-length unsigned integer of same shape.

Result.. The truncated whole part of A.
Immediate at compilation.
>>>>>>>>>WARNING, truncation does not cause an error.

Examples. BYTE_UNSIGNED(123) is 123BU. BYTE_UNSIGNED(257) is 1BU.