read_packeted_data_c

	status.i4.v = read_packeted_data_c(device_indices.i4a.r,
					   properties.i2a.r, raw_data.i1a.r,
					   errors.i2a.r, lengths.i2a.r,
					   offsets.i2a.r, atomic_lengths.i2a.r,
					   num_devices.i4.v, data_source.i4.v,
					   specs.g.v, default_flags.i4.v
					   [,ret_lengths.i2a.r])

	This routine allows reading raw data from a list of devices
	whose total size can be larger than one ACNET packet.  The data
	can be read from a variety of data sources.  This routine provides
	only one shot data acquisition.

	device_indices	device index or array of device indices
	properties	property or array of properties
			(constants are in 'dbprops')
	raw_data	returned raw data
	errors		returned ACNET status value or array of values
	lengths		length in bytes or array of lengths
			(If a value of NULL is passed for this argument,
			 the database default lengths will be used.)
	offsets		offset in bytes or array of offsets
			(If a value of NULL is passed for this argument,
			 an offset of zero will be used for all devices.)
	atomic_lengths	smallest indivisible size of each device in bytes
			(If a value of NULL is passed for this argument,
			 the database default lengths will be used.)
	num_devices	number of devices
	data_source	source of the data
			(DIO_SOURCE_ACCELERATOR -> read live data,
			 DIO_SOURCE_DATABASE -> read the last setting stored
						in the database,
			 DIO_SOURCE_SAVERESTORE -> read data from save/restore,
			 DIO_SOURCE_SDA -> read data from SDA,
			 DIO_SOURCE_DATALOGGER -> read data from a lumberjack,
			 DIO_SOURCE_MEMORY -> read data from a memory pool)
	specs		data acquisition specifications depending on data source
			(DIO_SOURCE_ACCELERATOR -> not used,
			 DIO_SOURCE_DATABASE -> not used,
			 DIO_SOURCE_SAVERESTORE -> structure of type DIO_SR_SPEC,
			 DIO_SOURCE_SDA -> structure of type DIO_SDA_SPEC,
			 DIO_SOURCE_DATALOGGER-> structure of type DIO_DL_SPEC,
			 DIO_SOURCE_MEMORY -> structure of type DIO_MEMORY_SPEC)
	default_flags	flags indicating whether or not different
			parameters should all be treated the same
			(Note: These values can be logically 'OR'ed together
			 if more than one argument is to be defaulted.)
			(DIO_SAME_PI -> all devices will be requested
					using the first property,
			 DIO_SAME_LENGTH -> all devices will be requested
					    using the first length value,
			 DIO_SAME_OFFSET -> all devices will be requested
					    using the first offset value,
			 DIO_SAME_ATOMIC -> all devices will use the first
					    atomic length value)
	[ret_lengths]	actual returned length or array of lengths in bytes
			(default is NULL)

	This function returns status values as follows:

	OK			success
	DIO_BADARG		invalid data source or file number
	DIO_MEMFAIL		memory allocation failure
	negative value		other ACNET format error
	positive value		number of first device in error

	This function requires the following include files:

	cnsparam_h, cbslib_h, dbprops_h, diolib_h, acnet_errors_h

	Related functions:

	read_packeted_device_c, dio_get_raw(_c), dio_bld_get_raw(_c),
	dio_get_lst_raw(_c), sr_get_device_raw_c,
	dio_get_last_setting_raw, logger_get_device_list_c

	C/C++ usage:

	char	raw_data[TOTAL_LENGTH];
	short	errors[NUM_DEVICES];
	short	ret_lengths[NUM_DEVICES];
	short	properties = PRSET;
	static const short	lengths[NUM_DEVICES] = {128, 128};
	static const short	offsets[NUM_DEVICES] = {0, 0};
	short	*atomic_lengths = (short *) NULL;
	int	status;
	static const int	device_indices[NUM_DEVICES] = {14430, 14431};
	int	num_devices = NUM_DEVICES;
	int	data_source = DIO_SOURCE_ACCELERATOR;
	int	default_flags = DIO_SAME_PI;
	void	*specs = (void *) NULL;

	status = read_packeted_data_c(device_indices,&properties,
				      raw_data,errors,lengths,offsets,
				      atomic_lengths,num_devices,
				      data_source,specs,default_flags,
				      ret_lengths);