NAME

switch_input - switch one of a set of input vectors to output

switch_output - switch one of a set of output vectors to input

PROTOTYPES

unitptr switch_input(int n, int k, unitptr uHost)

unitptr switch_output(int n, int k, unitptr uHost)

ARGUMENTS

int n
dimension of switched vector dimension of switched vector
int k
nr of channels to switch between. If k>0, channels are implemented as k separate fields, otherwise as one big single field. nr of channels to switch between. If k>0, channels are implemented as k separate fields, otherwise as one big single field.
unitptr uHost
host unit host unit

INTERFACE OF CREATED UNIT:

For switch_input:

If k>0:
in_0[n]:
first input vector (packed field, if n<0 ) ...
in_k-1[n]:
last input vector (packed field, if n<0 )
in_k[1]:
index of selected input (internally, value clipped to index range will be used)
if k<0:
in_0[-k*n]:
concatenated input vectors (packed field, if n<0)
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.
X_out[n]:
copy of selected input vector (packed field, if n<0 ).
For switch_output::
X_in[n]:
input vector (packed field, if .n<0 )
Y_in[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 k>0:
-.out_0[n] first output vector (packed field, if n<0 ). ...
out_k-1[n]:
last output vector (packed field, if n<0 )
if k<0:
out_0[-k*n]:
concatenated output vectors (packed field, if n<0)

EXECUTION OF THE CREATED UNIT:

For switch_input, a call to exec_unit will copy the values at input field in_i into output field X_out. The index i of the selected channel is given by in_k[0] (this is the second-to-last input field). For switch_output, a call to exec_unit will copy the values at input field X_in into output field out_i (the values of the other output fields will not change). The index i of the selected channel is given by Y_in[0]. In both cases, the index i of the selected channel will be clipped to the legal range [0..k-1], if necessary.

FILE

/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../nstsrc/nst_stdr.c