SYNOPSIS:

The container unit is provided to encapsulate NST circuits within a single unit. Execution (or adaptation) of a container unit has as its only effect the execution (or adaptation) of the subunits that it contains. Therefore, the only thing that needs to be specified for the creation of a container unit is its interface (see below). The container unit is actually a void_unit, offered under Neo with a special editor to allow changes to the interface after the container unit has been created.

DEFINING THE INTERFACE:

Each input field can consist of one or several pins of one of the types scalar float ( "float"), float vector ( "float[]"), int vector ( "int[]"), byte vector ( "char[]"), null-terminated string ( "char[]" ) or a user-specified, special data type ( "special"). To make a field with several scalar float pins or a single vector pin of a desired dimension, first enter the number of values in the desired field location (chosen field locations must start in the first line and must be vertically contiguous in both the left (input) and the right (output) column). For a field with scalar float pins, the entered value will be the number of pins (each pin holding a single value). For a field with a single vector pin ( float[],int[] or byte[]) the entered value will be the dimension of the single pin. Then choose the desired pin type by toggling the type button (selecting the leftward/rightward half of the button will switch the type values in backward/forward order).

Inserting a new field:

To insert a new field in a desired location, first use the pointer to bring the cursor into the field before which a new field shall be inserted. Then use the INS_FLD button to create a new empty space and fill in the dimension and set the type.

Inserting a new pin:

In the same way, it is possible to add a pin to an existing field (use the INS_PIN button this time). The added pin need not be the same type as the pin(s) already present. In this way, you can make composite multi-pin fields. Groups of pins that together belong to the same field will be indicated by the setting of the inp/out/-- buttons: buttons showing inp or out indicate the start of a field, all subsequent entries with the button showing "-" are pins belonging to this field. The field ends with the next button showing "inp" or "out" or with the last entry.

Removing a new pin:

Analogous, using the DEL_PIN button. NOTE: You cannot toggle the "inp/out" buttons directly to change the structure of the interface. Adding and removing pins 'only' works in the described way, using the INS_PIN and DEL_PIN buttons and the position of the cursor to indicate the point of insertion or deletion.

SPECIAL PINS:

Choosing the field type as special creates a pin that will not connect to any of the predefined NST pin types (the dimension value will be ignored in this case; set it always to 1 to avoid conflicts with later releases). Instead, this pin is reserved to connect to such pin types that belong to user-specified data types. Such pin types may occur on user-programmed units (they can be defined with the nst_typedef function at the NST programming level). The special pin type is provided to allow the interface of container units to accommodate the data values of such user-defined pin types and thereby to allow communication between user-defined pins via wires that have to cross container boundaries. To this end, the NST special pins will recognize the user-defined pin type and cast themselves to the same type as long as they are connected with a user-defined pin.

SEE ALSO:

void_unit1, void_unit2, primitive_unit, primitive_unit1, primitive_unit2, nst_typedef

FILE

/local/homes/rhaschke/nst7/man/../o.linx86//../nstsrc/nst3.c