NAME

switch_str -- switchable string copy

PROTOTYPES

unitptr switch_input_str( int iNum, unitptr uHost)

unitptr switch_output_str( int iNum, unitptr uHost)

ARGUMENTS

int iNum
nr of input channels
unitptr uHost
host unit

INTERFACE OF CREATED UNIT:

For switch_input_str:: If iNum>0::
in_0[]:
(first input field, pin 0) string for first input channel ...
in_iNum-1[]:
(input field iNum, pin 0) string for last input channel
in_iNum[1]:
index of selected input (internally, value clipped to index range will be used)
out_0[]:
copy of selected input string.
If -iNum>0::
in_0[]:
(input field 0, pin 0) string for first input channel ...
in_0[-iNum-1]:
(input field 0, pin -iNum-1) string for last input channel
in_1[1]:
index of selected input (internally, value clipped to index range will be used)
out_0[]:
copy of selected input string.
For switch_output_str::
in_0[]:
(first input field) input string
in_1[1]:
index of selected input (internally, value clipped to index range will be used)
CTL_in[0]:
control field. A value of CTL_in[0]=0 switches the unit off.
If iNum>0:: -.out_0[0] (first output field) string from first output channel. ...
out_iNum-1[0]:
(last output field) string from last output channel
If -iNum>0:: -.out_0[0] (first output field) string from first output channel. ...
out_0[-iNum-1]:
(last output field) string from last output channel

EXECUTION OF THE CREATED UNIT:

For switch_input_str, a call to exec_unit will copy the string at input field in_i (or pin i. of in_0, if iNum<0) into output field out_0. The index i of the selected channel is given by in_iNum[0] (or in_1[0], if iNum<0; in both cases this is the second-to-last input field). For switch_output_str, a call to exec_unit will copy the string at input field in_0 into output field out_i (or pin i of out_0, if iNum<0). The values of the other output fields/pins will not change. The index i of the selected channel is given by in_1[0]. In both cases, the index i of the selected channel will be clipped to the legal range [0..iNum-1], if necessary.

FILE

/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../foldersrc/nst_string.c