get_command_channels.m
SYNTAX: [channels,cpus,gains,names] = get_command_channels(pcs_dir,tokamak,category,signal_names)
PURPOSE: Get the command channel indices, cpu numbers that produces each command,
and gain of the digital-to-analog convertor that sends out the command,
for all commands to be used by simserver. Supports use of command signals from any
category.
INPUT:
pcs_dir = directory where PCS has already been built
tokamak = tokamak corresponding to PCS (one of 'd3d','east','kstar','nstx-u')
category = string defining category whose commands are to be used OR 'default'
(the standard PCS commands); the category is the short name in
macros like CMD_<name>*, CMDA_<name>* in simulation_includes.m. Usually
these are the same as those listed in categories.h, but not always.
signal_names = cell array with names of command signals to be used by simserver or 'all'
(optional; if not specified, the only valid returned argument is "names")
OUTPUT:
channels = vector of indices of the command channels comprising
the PCS interface output, indexed from 1
cpus = vector of cpu numbers where intcom values are coming from,
indexed from 1
gains = vector of DAC gains, indexed from 1
names = struct with fields = channel_names,gain_names, cpu_names, each providing a list of
preprocessor variables defined for the specified tokamak and category (currently not
returned if category='default')
See also get_command_indices, get_cpu_indices, and get_command_da_gain for fetching DEFAULT commands
Dependencies