bpm_read_frame_file_data_c

	status.i4.v = bpm_read_frame_file_data_c(detector_name.ia.r,
						 data_type.i4.v,
						 particle_type.i4.v,
						 file_number.i4.v,
						 start_frame.i4.v,
						 max_frames.i4.v,
						 num_frames.i4.r,
						 values.r4a.r,
						 status_values.i1a.r,
						 timestamps.u4a.r,
						 nano_offsets.u4a.r,
						 time_in_cycle.r4a.r,
						 turn_numbers.i4a.r,
						 frame_type.i4.r,
						 metadata.g.v)

	This routine reads saved BPM frame data for the machine last requested
	by a call to bpm_machine_c.  A value of NULL can be passed for
	any returned argument, if that value is not needed.

	detector_name	null terminated detector name
	data_type	data type for the data to be read
			(BPM_HORZ_POS -> horizontal position,
			 BPM_VERT_POS -> vertical position,
			 BPM_HORZ_INT -> horizontal intensity,
			 BPM_VERT_INT -> vertical intensity,
			 BPM_LOSS_DATA -> loss reading)
	particle_type	type of particle being requested
			(BPM_PROTON_DATA -> proton data,
			 BPM_PBAR_DATA -> pbar data)
	file_number	file number
	start_frame	starting frame number
	max_frames	maximum number of frames to return
			(If a value of zero is passed for this argument,
			all saved frames will be returned.)
	num_frames	number of frames returned
	values		array of values to be saved
	status_values	array of status values to be saved
			(If there is no corresponding status, a value of
			 NULL can be passed for this argument.)
	timestamps	array of frame timestamps in clinks
	nano_offsets	timestamp fractions of a second in nanoseconds
	time_in_cycle	times in the cycle that the data was taken
	turn_numbers	turn numbers at which data was taken
	frame_type	returned type of BPM frame
			(BPM_DISPLAY_FRAME -> display frame,
			 BPM_SNAPSHOT -> snapshot frame,
			 BPM_PROFILE -> profile frame,
			 BPM_FLASH -> flash frame)
	metadata	returned metadata structure
			(BPM_TEVATRON -> structure of type
					 BPM_TEVATRON_METADATA,
			 BPM_TEV_DEVL -> structure of type
					 BPM_TEVATRON_METADATA,
			 BPM_MAIN_INJECTOR -> structure of type
					      BPM_MI_METADATA,
			 BPM_MI_DEVL -> structure of type
					BPM_MI_METADATA,
			 BPM_RECYCLER -> structure of type
					 BPM_RECYCLER_METADATA)

	This function returns ACNET status values as follows:

	OK			success
	CBS_INVARG		invalid save record specified
	CBS_MEMFAIL		error in allocating dynamic memory
	SQL_xxx			database error

	This function requires the following include files:

	ul_cbsaux/bpmuti.h, acnet_errors_h

	Related functions:

	bpm_machine_c, bpm_save_frame_data_c, bpm_get_frame_save_file,
	bpm_set_frame_save_file, bpm_read_file_range_data_c, bpm_data_source_c,
	bpm_file_menu_c, bpm_directory_info, bpm_plot_data, bpm_get_data_c,
	blm_get_data_c, bpm_get_intensity_c

	C/C++ usage:

	static const char	detector_name[] = "I:LM100";
	char		status_values[NUM_FRAMES];
	int		status;
	int		data_type = BPM_LOSS_DATA;
	int		particle_type = BPM_PROTON_DATA;
	int		file_number = 1;
	int		start_frame = 0;
	int		max_frames = NUM_FRAMES;
	int		num_frames;
	int		turn_numbers[NUM_FRAMES];
	int		frame_type;
	unsigned int	timestamps[NUM_FRAMES];
	unsigned int	nano_offsets[NUM_FRAMES];
	float		values[NUM_FRAMES];
	float		time_in_cycle[NUM_FRAMES];
	void		*metadata = (void *) NULL;

	status = bpm_read_frame_file_data_c(detector_name,data_type,
					    particle_type,file_number,
					    start_frame,max_frames,num_frames,
					    values,status_values,
					    timestamps,nano_offsets,
					    time_in_cycle,turn_numbers,
					    &frame_type,metadata);