NAME

void_unit2 - create a void unit and return pointer

void_unit3 - create a void unit and return pointer

primitive_unit2 - create a primitive unit and return pointer

<B>primitive_unit3</B> - create a primitive unit and return pointer

PROTOTYPES:


   void_unit2(iNumInp,pcInp1,...,iNumOut,pcOut1,...,uHost)
   void_unit3(iNumInp,apcInp,iNumOut,apcOut,uHost)
   primitive_unit2(iNumInp,pcInp1,...,iNumOut,pcOut1,...,uHost)
   primitive_unit3(iNumInp,apcInp,iNumOut,apcOut,uHost)

ARGUMENTS:

int iNumInp
number of input fields
char *pcInp1..*pcInpi
descriptors of the i=iNumInp input fields (see below).
char *apcOut[]
as before, but descriptors are given by a single pointer array.
int iNumOut
number of input fields
char *pcInp1..k
descriptors of the k=iNumOut output fields (see below).
char *apcInp[]
as before, but descriptors are given by a single pointer array.
unitptr uHost
unit to contain newly created instance as a new subunit.

RETURN VALUE:

unitptr u
pointer to newly created instance of a void or primitive unit with the speci- fied input and output fields.

DESCRIPTION:

These are alternative versions of the basic void_unit and primitive_unit routines that offer a different parameter interface. Instead of using the reserved constants NST_SCALAR, NST_FLOAT, ...NST_STRING for specifying typed fields, here each field is specified with a character string consisting of a sequence of letter/number pairs. Type letters are 's','c','i' (for NST_SCALAR, NST_BYTE, NST_INT, NST_FLOAT, NST_STRING) followed by a number of desired elements.

Example:


   apcInp[f] = "s10s5f1000f20t100"

builds an input field f with 15 scalar pins ( "s10s5" is the same as "s15", this concatenation occurs only for scalar pins, since here each pin always has a single element so that the number specifies the nr of such pins), one float vector pin with 1000 elements, one float vector pin with 20 elements, and one text pin for which ini- tially 100 bytes are allocated. The sequence

      { char *apcInp[]={"c100t10i3","f5"};
        char *apcOut[]={"s7f7"};
        u = void_unit3(2,apcInp,1,apcOut,uHost);
      }

would create a void_unit u with two input fields and one output field. The first input field has a vector pin of 100 bytes, a text string pin for initially 10 chars and an int vector pin of 3 elements. The second input field has a single float vector pin of 5 elements (and is, therefore, equivalent to a packed field of 5 elements in earlier NST-Versions). The output field has 7 scalar float pins (the only pin type available in earlier NST versions) plus an additional float vector pin, again of 7 elements.

SEE ALSO:

void_unit, void_unit1, primitive_unit, primitive_unit1, nst_typedef

FILE

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