sr_read_device_c

	status.i4.v = sr_read_device_c(device_indices.i4a.r, properties.i2a.r,
				       file_number.i4.v, values.r8a.r,
				       errors.i2a.r [,raw_lengths.i4a.r]
				       [,raw_offsets.i4a.r] [,units_text.i1a.r]
				       [,num_devices.i4.v] [,data_source.i4.v]
				       [,case_number.i4.v] [,is_snapshot.i4.v]
				       [,user_id.i4.v] [,vals_per_dev.i4a.r]
				       [,sda_usage.i1a.r])

	This routine returns data that has been previously saved by
	the save/restore system or by SDA.  If "num_devices" is
	specified, information for a list of devices can be retrieved.
	This routine can handle reading array devices.

	device_indices	device index or array of device indices
	properties	property index or array of property indices
			(If the first value is less than zero, all devices
			 will be requested with a property index which is
			 equal to the absolute value of this argument.)
			(constants are in dbprops)
	file_number	file number from which to retrieve data
			(This is the subsystem number or user key 1 for
			 detached snapshot manager data.)
	values		returned value or array of returned values
	errors		returned ACNET status or array of status values
	[raw_lengths]	raw data length or array of data lengths in bytes
			(default is NULL which results in the use of the
			 database maximum size for each device)
	[raw_offsets]	raw data offset or array of data offsets in bytes
			(default is NULL which results in the use of an
			 offset of 0 for all devices except snapshots
			 which will be offset past the header information)
	[units_text]	units text (LEN_DEV_UNITS characters per device)
			(default is NULL)
	[num_devices]	number of devices (default is 1)
	[data_source]	source of data
			(CLIB_DEFAULT_ARG -> use previously selected source
					     (default),
			 SRMNGR_NORMAL -> normal save/restore files,
			 SRMNGR_SDA_DATA -> SDA data,
			 SRMNGR_SNAP_DATA -> detached snapshot manager data)
	[case_number]	SDA case number (This is the record number or user
			key 2 for detached snapshot data.)
			(default (CLIB_DEFAULT_ARG) is SDA_DEFAULT_CASE_NUMBER
			 for SDA data and 0 for detached snapshot data)
	[is_snapshot]	request is for snapshot data (default is FALSE unless
			the data source is SRMNGR_SNAP_DATA)
			(TRUE -> snapshot data,
			 FALSE -> normal data)
	[user_id]	user ID or SDA subcase (This is user ID for detached
			snapshot manager data or the subcase number for
			SDA data.) (default (CLIB_DEFAULT_ARG) is
			SDA_DEFAULT_SUBCASE_NUMBER for SDA data and
			0 for detached snapshot manager data)
	[vals_per_dev]	returned number of values per device (default is NULL)
	[sda_usage]	null terminated SDA usage string (This argument only
			has meaning if the data source is SDA.)
			(default is NULL which results in Collider shot access)

	This function returns status values as follows:

	OK			success
	DIO_MEMFAIL		memory allocation failure
	DIO_INVLEN		too much data requested
	negative value		ACNET format error indicating overall failure
	positive value		number of devices in error indicating partial
				success

	This function requires the following include files:

	cnsparam_h, dbprops_h, cbslib_h, acnet_errors_h

	Related functions:

	sr_get_device_c, sr_set_source_c, sr_get_device_raw_c,
	sr_data_length_c, sr_sda_data_lengths_c, sr_status_c, sr_status_text_c,
	sr_is_on_c, sr_is_positive_c, sr_sda_snapshot_stats_c,
	sr_snapshot_header_c, sr_snapshot_info_c, sr_snapshot_info_list_c,
	sr_get_snapshot_c, sr_read_snapshot_c, sr_disconnect,
	sr_get_array_device_c, sr_sda_cases_present_c, sr_sda_num_subcases_c,
	sr_sda_subcases_present_c, sr_sda_case_times_c

	C/C++ usage:

	char	units_text[NUM_DEVICES][LEN_DEV_UNITS];
	char	*sda_usage = (char *) NULL;
	short	properties[NUM_DEVICES] = {PRSET};
	short	errors[NUM_DEVICES];
	int	status;
	int	device_indices[NUM_DEVICES] = {14430};
	int	file_number = 0;
	int	raw_lengths[NUM_DEVICES] = {RAW_LENGTH};
	int	raw_offsets[NUM_DEVICES] = {0};
	int	num_devices = NUM_DEVICES;
	int	data_source = SRMNGR_NORMAL;
	int	case_number = SDA_DEFAULT_CASE_NUMBER;
	int	subcase_num = SDA_DEFAULT_SUBCASE_NUMBER;
	int	is_snapshot = FALSE;
	int	values_per_dev[NUM_DEVICES];
	double	values[NUM_ELEMENTS];

	status = sr_read_device_c(device_indices,properties,file_number,
				  values,errors,raw_lengths,raw_offsets,
				  (char *) units_text,num_devices,
				  data_source,case_number,is_snapshot,
				  subcase_num,vals_per_dev,sda_usage);