device_listing_c

	status.i4.v = device_listing_c(devices.g.v, num_devices.i4.v,
				       array_indices.i4a.r, format_spec.i1a.r,
				       output_type.i4.v, output_spec.g.v,
				       option_data.sa.r, num_options.i4.v,
				       data_source.i4.v, data_src_data.g.v)

	This routine builds a formatted listing of a set of parameters
	for a list of devices.

	devices		device specification  (This can be an array
			of device indices, an array of device names, a file
			name containing device names, a database table
			(db={table_name}) or a device database search string
			of the form "tag = value".)
	num_devices	number of devices
			(>0 -> "devices" will be treated as an array of
			       "num_devices" device indices,
			 <0 -> "devices" will be treated as an array of
			       device names,
			  0 -> "devices" will either be treated as a device
			       search specification if it has the form
			       "tag = value" or a file name containing
			       device names otherwise
			       (supported search tags are:
				"file" -> list all devices in a given file,
				"db" -> list all devices from a database
					table where the device is specified
					by a device index in a field
					named "di",
				"dbname" -> list all devices from a database
					    table where the device is specified
					    by a device name in a field
					    named "name",
				"dbquery" -> list all devices from an
					     arbitrary database query
					     on tables containing device
					     indices,
				"dbqueryname" -> list all devices from an
						 arbitrary database query
						 on tables containing device
						 names,
				"devices" -> list devices from an explicit
					     delimited list of names,
				"node" -> list all devices on a given node (nd),
				"trunk" -> list all devices on a given trunk,
				"name" -> list all devices with names
					  matching a string (nm),
				"full_name" -> list all devices with full names
					       matching a string,
				"family" -> list all devices froma given
					    family device,
				"text" -> list all devices with descriptive
					  text matching a string (tx),
				"full_text" -> list all devices with full
					       descriptive text matching
					       a string,
				"save_list" -> list all devices from a given
					       save list (sl),
				"user_save_list" -> list all devices from a
						    given user save list (usl),
				"save_code" -> list all devices having a given
					       save code (sc),
				"type" -> list all devices of a given type,
				"class" -> list all devices of a given class,
				"transform" -> list all devices using a given
					       common transform,
				"primary_transform" -> list all devices using a
						       given primary transform,
				"crate" -> list all devices from a given crate,
				"slot" -> list all devices from a given slot,
				"madc" -> list all devices from a given MADC,
				"driver" -> list all devices with a given
					    driver code,
				"vm" -> list all devices belonging to a given
					virtual machine,
				"units" -> list all devices having a given
					   units text,
				"alarm_list" -> list all devices from a given
						alarm list (al),
				"user_alarm_list" -> list all devices from a
						     given alarm user list (ual),
				"alarm_handler" -> list all devices having a
						   given alarm handler (ah),
				"controlling_device" -> list all devices
							controlled by a given
							device,
				"expr[ession]" -> list all devices containing
						  a given string in its
						  reading expression,
				"expr_device" -> list all devices containing
						 a given device in its
						 reading expression,
				"ssdn" -> list all devices having an SSDN
					  matching a pattern,
				"logger_list" -> list all devices in a given
						 data logger list,
				"download_list" -> list all devices from a given
						   node's download list (dl),
				"save_file" -> list all devices saved in a
					       particular save file (sf),
				"sda_case" -> list all devices configured for a
					      particular SDA case,
				"sda_set" -> list all devices saved in a
					     particular SDA set,
				"sibling_list" -> list all siblings descended
						  from a given device
						  (siblings),
				"parameter_page" -> list all devices on a
						    specific parameter page
						    subpage,
				"lex_sa" -> list all devices on a specific
					    Lex SA display,
				"wg_list" -> list all devices from a
					     waveform generator list (I14/I15),
					     (wglist),
				"console_class" -> list all devices which are
						   settable by a console class,
				"user" -> list all devices modified by a given
					  user,
				"user_created" -> list all devices created
						  by a given user,
				"foreign_device" -> list all devices mapped
						    to a particular
						    foreign device)
	array_indices	array of device array indices
			(Note: If the first value is less than zero, all
			 devices will be submitted with the starting element
			 requested equal to the absolute value of that value.)
			(If a value of NULL is passed for this argument,
			 a value of 0 will be used for each device.)
	format_spec	output format specification (If no format specifiers
			(%) are found in this string, this string will be
			treated as a file name containing a format
			specification.)
			format specifiers include:
			("name" -> display device name (nm, device, cnv_device),
			 "full_name" -> display full device name (fn, fullname),
			 "previous_name" -> display previous device name
					    (pn, prev_name),
			 "di" -> display device index (cnv_device_index),
			 "text" -> display device descriptive text
				   (tx, txt, cnv_device_description),
			 "full_text" -> display full device descriptive text
					(fd, full_descr),
			 "type_p" -> display device type
				     (device_type, cnv_device_type),
			 "type_long_p" -> display device type (long description)
					  (device_type_long,
					   cnv_device_type_long),
			 "class_p" -> display device class
				      (device_class, cnv_device_class),
			 "cnv_device_driver_p" -> display device driver value,
			 "read" -> display device reading (rd, cnv_reading),
			 "read_units" -> display device reading units,
			 "set" -> display device setting (cnv_setting),
			 "set_units" -> display device setting units,
			 "status" -> display device basic status (sts),
			 "raw_p" -> display a raw reading value,
			 "primary_p" -> display a reading value in
					primary units,
			 "analog_alarm" -> display analog alarm
					   (aa, alarm, cnv_analog_alarm),
			 "analog_alarm_min" -> display analog alarm minimum
					       (aa_min),
			 "analog_alarm_max" -> display analog alarm maximum
					       (aa_max),
			 "analog_alarm_nom" -> display analog alarm nominal
					       (aa_nom),
			 "analog_alarm_tol" -> display analog alarm tolerance
					       (aa_tol),
			 "analog_alarm_limlen" -> display analog alarm
						  limit length (aa_ll),
			 "analog_alarm_lt" -> display analog alarm
					      limit type (aa_lt),
			 "analog_alarm_ldt" -> display analog alarm
					       limit data type (aa_ldt),
			 "analog_alarm_status" -> display analog alarm status
						  (aa_status),
			 "analog_alarm_highlow" -> display analog alarm
						   high/low status (aa_hl),
			 "analog_alarm_ena" -> display analog alarm
					       enable status (aa_ena),
			 "analog_alarm_abort" -> display analog alarm
						 abort status (aa_abort),
			 "analog_alarm_abtena" -> display analog alarm
						  abort enable status
						  (aa_abtena),
			 "analog_alarm_pri" -> display analog alarm priority
					       (aa_pri),
			 "analog_alarm_text" -> display analog alarm text
						(aa_text),
			 "analog_alarm_disp" -> display analog alarm
						display enable status
						(aa_disp),
			 "analog_alarm_log" -> display analog alarm
					       logging enable status
					       (aa_log),
			 "analog_alarm_tries_needed" -> display analog alarm
							tries needed
							(aa_triesneeded),
			 "analog_alarm_tries_now" -> display analog alarm
						     tries now
						     (aa_triesnow),
			 "analog_alarm_event_1" -> display analog alarm
						   event 1 (aa_evt1),
			 "analog_alarm_event_2" -> display analog alarm
						   event 2 (aa_evt2),
			 "analog_alarm_ftd" -> display analog alarm FTD
					       (aa_ftd),
			 "analog_alarm_pm" -> display analog alarm
					      post method (aa_pm),
			 "analog_alarm_data" -> display analog alarm
						special data (aa_data),
			 "analog_alarm_flags" -> display analog alarm
						 flags word (aa_flags),
			 "digital_alarm" -> display digital alarm
					    (da, cnv_digital_alarm),
			 "digital_alarm_nom" -> display digital alarm nominal
					       (da_nom),
			 "digital_alarm_mask" -> display digital alarm mask
						 (da_mask),
			 "digital_alarm_limlen" -> display digital alarm
						   limit length (da_ll),
			 "digital_alarm_status" -> display digital alarm status
						   (da_status),
			 "digital_alarm_ena" -> display digital alarm
						enable status (da_ena),
			 "digital_alarm_abort" -> display digital alarm
						  abort status (da_abort),
			 "digital_alarm_abtena" -> display digital alarm
						   abort enable status
						   (da_abtena),
			 "digital_alarm_disp" -> display digital alarm
						 display enable status
						 (da_disp),
			 "digital_alarm_log" -> display digital alarm
						logging enable status
						(da_log),
			 "digital_alarm_tries_needed" -> display digital alarm
							 tries needed
							 (da_triesneeded),
			 "digital_alarm_tries_now" -> display digital alarm
						      tries now
						      (da_triesnow),
			 "digital_alarm_event_1" -> display digital alarm
						    event 1 (da_evt1),
			 "digital_alarm_event_2" -> display digital alarm
						    event 2 (da_evt2),
			 "digital_alarm_ftd" -> display digital alarm FTD
						(da_ftd),
			 "digital_alarm_pm" -> display digital alarm
					       post method (da_pm),
			 "digital_alarm_data" -> display digital alarm
						 special data (da_data),
			 "digital_alarm_flags" -> display digital alarm
						  flags word (da_flags),
			 "dbset_p" -> display saved database setting values,
			 "dbset_raw_p" -> display raw saved database
					  setting values,
			 "units_p" -> display common units text (cnv_units),
			 "pt_p" -> display primary transform
				   (cnv_primary_transform),
			 "pt_index_p" -> display primary transform index
					 (cnv_primary_transform_index),
			 "ct_p" -> display common transform
				   (cnv_common_transform),
			 "ct_index_p" -> display common transform index
					 (cnv_common_transform_index),
			 "const_p(_n)" -> display scaling constants
					  (cnv_scaling_constant) (If "n" is
					  specified, only the corresponding
					  constant will be displayed.),
			 "dl_p" -> display scaled display length
				   (cnv_display_length),
			 "df_p" -> display scaled display format
				   (cnv_display_format),
			 "node[_p]" -> display device node (nd, cnv_node),
			 "trunk_node[_p]" -> display device trunk and node
					     (tn, cnv_trunk_node),
			 "first_audit_date" -> display first audit date
					       (fa_date),
			 "first_audit_author" -> display first audit author
						 (fa_author),
			 "last_audit_date" -> display last audit date (la_date),
			 "last_audit_author" -> display last audit author
						(la_author),
			 "previous_sibling" -> display previous sibling
					       (ps, cnv_previous_sibling),
			 "next_sibling" -> display next sibling
					   (ns, cnv_next_sibling),
			 "save_list" -> display save list (sl, cnv_save_list),
			 "save_list_number" -> display save list number
					       (sln, cnv_save_list_number),
			 "save_code" -> display save code (sc, cnv_save_code),
			 "save_properties" -> display save properties
					      (sp, cnv_save_properties),
			 "save_mask" -> display save property mask
					(sm, cnv_save_mask),
			 "display_code" -> display S/R display code
					   (dc, cnv_display_code),
			 "protection_mask" -> display device setting
					      protection mask
					      (pm, cnv_protection_mask),
			 "virtual_machine" -> display device virtual machine
					      information
					      (vm, cnv_virtual_machine),
			 "broken_status" -> display device broken status
					    (oos, broken, cnv_broken_status),
			 "ssdn_p(_n)" -> display device SSDN (cnv_ssdn)
					 (If "n" is specified, only the
					 corresponding word will be displayed.),
			 "ds_p" -> display device default size
				   (default_size, cnv_default_size),
			 "as_p" -> display device atomic size
				   (atomic_size, cnv_atomic_size),
			 "ms_p" -> display device maximum size
				   (maximum_size, cnv_maximum_size),
			 "ss_p" -> display device scaling size
				   (scaling_size, cnv_scaling_size),
			 "ne_p" -> display device number of elements
				   (num_elements, cnv_num_elements),
			 "emc_p" -> display device EMC (cnv_emc),
			 "crate_p" -> display device crate (cr, cnv_crate),
			 "slot_p" -> display device slot (slt, cnv_slot),
			 "madc_ch_p" -> display device MADC channel
					property value is optional)
					(ch, madc_channel, cnv_madc_channel),
			 "madc_num_p" -> display device MADC number
					 property value is optional)
					 (madc_number, cnv_madc_number),
			 "ftd_p" -> display device default FTD (cnv_ftd),
			 "state_value" -> display state value text (sv),
			 "fermi_name" -> FermiName for device
					 (fn, cnv_fermi_name),
			 "fermi_index" -> FermiName atom index for device
					  (fi, cnv_fermi_index),
			 "ftp_class" -> display FTP class (cnv_ftp_class),
			 "ftp_class_index" -> display FTP class index
					      (cnv_ftp_class_index),
			 "snp_class" -> display SNP class (cnv_snp_class),
			 "snp_class_index" -> display SNP class index
					      (cnv_snp_class_index),
			 "is_cntrl_set[_p]" -> display controlled setting status
					       (is_controlled_set,
						cnv_is_controlled_set),
			 "is_motor" -> display motor controller status
				       (is_motor_controller,
					cnv_is_motor_controller),
			 "data_type_id_p" -> display device data type ID
					     (cnv_device_data_type_id),
			 "alarm_list" -> display alarm list
					 (al, cnv_alarm_list),
			 "alarm_list_number" -> display alarm list number
						(aln, cnv_alarm_list_number),
			 "alarm_control_list" -> display alarm control list
						 (acl, cnv_alarm_control_list),
			 "alarm_handler_p" -> display alarm handler
					      (ah, cnv_alarm_handler_code),
			 "alarm_handler_number_p" -> display alarm handler number
						     (ahn, cnv_alarm_handler_number),
			 "alarm_sound_id_p" -> display alarm sound ID
					       (asid, cnv_alarm_sound_id),
			 "alarm_speech_id_p" -> display alarm speech ID
						(aspid, cnv_alarm_speech_id),
			 "controlling_device" -> display controlling device
						 (cd, cnv_controlling_device),
			 "expression" -> display expression used to calculate
					 the device's reading value
					 (expr, cnv_device_expression),
			 "status_xxx" -> display basic status mask values where
					 "xxx" is replaced by "onoff",
					 "readytripped", "localremote",
					 "polarity" or "rampdc",
			 "command_xxx" -> display basic control command values
					  where "xxx" is replaced by "reset",
					  "on", "off", "positice", "negative",
					  "ramp", or "dc",
			 "foreign_name" -> display the foreign device name that
					   an ACNET device is mapped to,
			 "foreign_system" -> display the system type of a
					     foreign device mapping,
			 "foreign_data_type" -> display the data type of a
						foreign device mapping)
			(Suffixes of "_p" mean that a property string
			 should be inserted in place of the "p".  The
			 property strings for this are "read", "rd", "set",
			 "status", "control", "analog_alarm", "aa",
			 "digital_alarm", and "da".)
	output_type	type of output desired
			(DEVLST_OUTPUT_FILE -> write output to a file
					       specified by "output_spec"
					       (a value of "stdout" can be
						passed for standard output),
			 DEVLST_OUTPUT_MAIL -> mail output to the user
					       specified by "output_spec", 
			 DEVLST_OUTPUT_PRINTER -> print output on the printer
						  specified by "output_spec", 
			 DEVLST_OUTPUT_MEMORY -> return the output in a
						 structure of type
						 DEVLST_OUTPUT_MEMORY_DATA
						 provided by the caller
						 in "output_spec")
	output_spec	output specifier whose interpretation depends
			upon the value of "output_type"
	option_data	device listing options
			(array of structures of type DEVLST_OPTION_DATA)
			(DEVLST_TITLE_OPTION -> specifies whether or not
						to provide a title in the
						output  (If a title is
						desired and a value of NULL
						is passed for the title, a
						default title will be
						constructed.),
			 DEVLST_HEADINGS_OPTION -> specifies whether or not
						   to provide column headers in
						   the output,
			 DEVLST_FOOTERS_OPTION -> specifies whether or not
						  to provide footers in
						  the output,
			 DEVLST_COMMENTS_OPTION -> allows the caller to
						   insert a comment line
						   in the output,
			 DEVLST_SKIP_INVALID_OPTION -> specifies that invalid
						       device names in an input
						       file should be skipped,
			 DEVLST_FILTER_ANALOG_ALARM -> only include devices in
						       alarm (analog),
			 DEVLST_FILTER_DIGITAL_ALARM -> only include devices in
							alarm (digital),
			 DEVLST_FILTER_BROKEN -> only include devices which are
						 broken (out of service),
			 DEVLST_FILTER_ANALOG_BYPASSED -> only include devices
							  whose alarm is
							  bypassed (analog),
			 DEVLST_FILTER_DIGITAL_BYPASSED -> only include devices
							   whose alarm is
							   bypassed (digital),
			 DEVLST_FILTER_READ_ARRAY -> only include devices whose
						     reading property is an
						     array device,
			 DEVLST_FILTER_SET_ARRAY -> only include devices whose
						    setting property is an
						    array device,
			 DEVLST_FILTER_STATUS_ARRAY -> only include devices
						       whose status property
						       is an array device,
			 DEVLST_FILTER_READ_SIZE_MISMATCH -> only include
							     devices whose
							     reading size does
							     not match its PDB,
			 DEVLST_FILTER_SET_SIZE_MISMATCH -> only include
							    devices whose
							    setting size does
							    not match its PDB,
			DEVLST_FILTER_PROP_READING -> only include devices
						      which have a reading
						      property,
			DEVLST_FILTER_PROP_SETTING -> only include devices
						      which have a setting
						      property,
			DEVLST_FILTER_PROP_STATUS -> only include devices
						     which have a basic status
						     property,
			DEVLST_FILTER_PROP_CONTROL -> only include devices
						      which have a
						      basic control property,
			DEVLST_FILTER_PROP_ANALOG_ALARM -> only include devices
							   which have an analog
							   alarm property,
			DEVLST_FILTER_PROP_DIGITAL_ALARM -> only include devices
							    which have a digital
							    alarm property)
	num_options	number of options passed
	data_source	source of any "live" data
			(DIO_SOURCE_ACCELERATOR -> get data from the
						   accelerator,
			 DIO_SOURCE_DATABASE -> get data from the database,
			 DIO_SOURCE_SAVERESTORE -> get data from a save/restore
						   file specified by
						   "data_src_data",
			 DIO_SOURCE_SDA -> get data from an SDA file specified
					   by "data_src_data",
			 DIO_SOURCE_DATALOGGER -> get data from a data logger,
			 DIO_SOURCE_MEMORY -> get data from a DIO memory pool)
	data_src_data	data to further specify the data source
			(DIO_SOURCE_SAVERESTORE -> structure of type
						   DEVLST_SR_SOURCE_DATA,
			 DIO_SOURCE_SDA -> structure of type
					   DEVLST_SDA_SOURCE_DATA,
			 DIO_SOURCE_DATALOGGER -> structure of type
						  DEVLST_LOGGER_SOURCE_DATA,
			 DIO_SOURCE_MEMORY -> structure of type
					      DEVLST_MEMORY_SOURCE_DATA)

	This function returns status values as follows:

	DIO_OK			success
	DIO_MEMFAIL		memory allocation failure
	DIO_INVDEV		at least one entry is not a valid array device
	DIO_BADARG		invalid number of elements or starting element
	DIO_NOTENB		writes not allowed on this console
	CLIB_SYNTAX		invalid search string requested
	negative value		other ACNET format error
	positive value		number of devices in error

	This function requires the following include files:

	dbprops_h, diolib_h, acnet_errors.h, tclk_events_h

	Related functions:

	dio_get_lst, dio_build_get_array_list_c, dio_get_array_device_c,
	dio_can_get_lst, dio_bld_get_raw(_c), td_build

	C usage:

	static const char	devices[] = "node = BOOSTR";
	static const char	format_spec[] = "%name %di %text";
	static const char	output_spec[] = "stdout";
	int	status;
	int	num_devices = 0;
	int	array_indices = 0;
	int	output_type = DEVLST_OUTPUT_FILE;
	int	num_options = 1;
	int	data_source = DIO_SOURCE_DATAPOOL;
	void	*data_source_data = (void *) NULL;
	static const DEVLST_OPTION_DATA	option_data =
	{DEVLST_TITLE_OPTION, TRUE, (void *) NULL};

	status = device_listing_c((void *) devices,num_devices,&array_indices,
				  format_spec,output_type,(void *) output_spec,
				  &option_data,num_options,data_source,
				  data_source_data);