DESCRIPTION:
Provides functions to set the inputs of a named nst unit.
FUNCTIONS:
- int press_button(char *label, char *name)
- press labelled button of
named input_window.
- int inp(char *name, ...)
- set data of input pins of named unit name,
starting at pin 0 of field 0.
- int inp(int f, char *name, ...)
- dito, but starting at pin 0 of field f.
- int inp(int p, int f, char *name, ...)
- dito, but starting at pin p of field f.
Each argument parameter after name is a scalar ( float or int ), a
float array or a char string. Its data is copied into one or several consecutive
input pins of unit name according to the following conversion rules:
- scalar (float or int) argument:
- requires a single scalar pin into
which the value is copied
- array (float* or char*) argument:
- this is copied, when (i) the destination pin
is a fixed array of the same dimension or a dynamic array (types need not match;
for a dynamic array, the dimension will be adjusted), or (ii) a scalar
float pin followed (in the same field) by sufficiently many further scalar float
pins to accomodate all array elements, or (iii) a text pin, in which case
the dimensions need not match, the copied elements are rounded to ascii
codes and copying will stop when a null character was copied (otherwise,
there will be a null character appended after the last array element).
If none of these cases applies, copying stops and an exception is thrown
(cf. below).
RETURN VALUES:
These routines return the number of data input arguments (not pins)
that were used. A return value of 0 therefore indicates some error.
EXCEPTIONS:
- "badop"
- indicates that the specified units has no input fields.
- "badarg:type"
- indicates that an argument was provided whose
type is not appropriate for the intended pin
- "badarg:array:dim"
- indicates that an array argument was provided whose
dimension is not appropriate for the intended pin
- "badarg:value"
- indicates that name designates a unit that could
not be found, or the specified pin and field numbers reference a
non-existing pin.
NOTE:
Data transfer through these routines is slower than the use of wires.
FILE
/local/homes/rhaschke/nst7/man/../o.linx86//../nstsrc/nst_prog_libs.c