hpdefs_h

/*******************************************************************************
**  Copyright 1993-2015, Fermi Research Alliance, LLC.  All rights reserved.
*******************************************************************************/
/* hpdefs.h	definitions for hp_ routines
**
**  MODIFICATION HISTORY:
**			This file has been consolidated to provide a header
**			for hputi.c.  This will become part of a library
**
**      Dean Still	7 Mar 96	Created
**	[@tbs@]...
**
*/
#ifndef HPDEFS_H_DEFINED		/* do this only once */
#define	HPDEFS_H_DEFINED

#define SIZE		160		/* Channel 1 to take data	*/
#define COM_SIZE	160		/* Channel 1 to take data	*/
#define LF		10		/* Channel 1 to take data	*/

#define RAND		1      		/* RANDOM NOISE			*/
#define PERN      	2		/* PERIODIC NOISE		*/

#define CHANNEL		1      		/* Channel 1 to take data	*/
#define WMEM		0      		/* Channel 1 to take data	*/

#define HP_CHAN1	1      		/* Channel 1 to take data	*/
#define HP_CHAN2	2      		/* Channel 2 to take data	*/
#define HP_CHAN3	3      		/* Channel 3 to take data	*/
#define HP_CHAN4      	4		/* Channel 4 to take data	*/

#define HP_WMEM1	1      		/* WMEMORY 1 to take data	*/
#define HP_WMEM2	2      		/* WMEMORY 2 to take data	*/
#define HP_WMEM3	3      		/* WMEMORY 3 to take data	*/
#define HP_WMEM4      	4		/* WMEMORY 4 to take data	*/

#define HP_PMEM1	1      		/* PMEMORY 1 to take data	*/
#define HP_PMEM2	2      		/* PMEMORY 2 to take data	*/
#define HP_PMEM3	3      		/* PMEMORY 3 to take data	*/
#define HP_PMEM4      	4		/* PMEMORY 4 to take data	*/

#define HP_1_SCREENS	1		/* Channel 4 to take data	*/
#define HP_2_SCREENS	2		/* Channel 4 to take data	*/
#define HP_4_SCREENS	4		/* Channel 4 to take data	*/

#define HP_TX      	10		/* Length of an HP disk file	*/
#define HP_FL_LEN      	8		/* Length of an HP disk file	*/
#define HP_FL_LONG     	60		/* Length of an HP disk file	*/
#define HP_BINS      	400		/* Size of return 3561 data 	*/
#define HP_BINS_800	800		/* Size of return 3561 data 	*/

#define HP_MARKER_MAX	1      		/* Marker to max		*/
#define HP_MARKER_NEXT	2      		/* Marker to next max		*/
#define HP_MARKER_LEFT	3      		/* Marker to max left		*/
#define HP_MARKER_RIGHT	4		/* Marker to max right		*/

#define HP_RUN		0		/* hp vsa run			*/
#define HP_PAUSE	1      		/* hp VSA Pause			*/

#define MILI_SEC  1E-3  
#define MICRO_SEC 1E-6
#define NANO_SEC 1E-9

#define PAGE_IMAGE	"TEVATRON_MISC:GPIB.IMG"

#define CONVERT_START(cntr_freq,span) ( (cntr_freq) - ((double)(span)) / 2.0 )
#define CONVERT_STOP(start_freq,span) ( (start_freq) + ((double)(span)) )



/*******************************************************************************
** function prototypes
*/
extern "C" {
int 	convert_str(char *source,int size_tmp) ;



/* Routines for the HP54504B */
int 	hp_get_plot_limits(int,int,float *,float *,float *,float *);
int 	hp_get_waveform(float **, int, int,int *);
int 	hp_set_channel(int,int);
int 	hp_set_display(int);
int 	hp_set_root(int);
int 	hp_set_timebase(int);
int 	hp_set_trigger(int);
int 	hp_set_utilities(int);
int 	hp_set_waveform(int);

/* Routines for the HP54200A */
int	hp54200_get_waveform(float **, int, int, int *);
int 	hp54200_set_channel(int,int);
int 	hp54200_set_display(int);
int 	hp54200_init(int,char *);
int 	hp54200_message(int,int,int,char *);
int 	hp54200_set_root(int);
int 	hp54200_set_timebase(int);
int 	hp54200_set_trigger(int);

/* Routines for the HP54600B */
int 	hp54600_display_pmem(int,int,int);
int 	hp54600_get_plot_limits(int,int,int,float *,float *,float *,float *);
int 	hp54600_get_pmem(float **,int,int,int *);
int 	hp54600_get_waveform(float **,int,int,int *);
int 	hp54600_message(int,int,int,char *);
int 	hp54600_set_acquire(int);
int 	hp54600_set_channel(int, int);
int 	hp54600_set_display(int);
int 	hp54600_set_timebase(int);
int 	hp54600_set_trigger(int);
int 	hp54600_set_waveform(int);
int 	hp54600_store_pmem(int,int);

/* Routines for the HP54500B, */
int 	hp54500_change_dir(int);
int 	hp54500_del_disk_file(int);
int 	hp54500_display_wmem(int,int,int);
int 	hp54500_format_disk(int);
int 	hp54500_get_disk_dir(int,char *,int *);
int 	hp54500_get_waveform(float **,int,int,int *,int);
int 	hp54500_init(int,char *);
int 	hp54500_load_from_disk(int);
int 	hp54500_message(int,int,int,char *);
int 	hp54500_num_points(int,int);
int 	hp54500_num_screens(int,int *,int *);
int 	hp54500_set_acquire(int);
int 	hp54500_set_channel(int,int);
int 	hp54500_set_display(int);
int 	hp54500_set_root(int);
int 	hp54500_set_timebase(int);
int 	hp54500_set_trigger(int);
int 	hp54500_set_utilities(int);
int 	hp54500_set_waveform(int);
int 	hp54500_store_wmem(int,int,int);
int 	hp54500_write_to_disk(int);

/* Routines for the HP54503A scopes  most routines for HP54500 will 
will work for these scopes however		*/
int 	hp54503_set_acquire(int);
int 	hp54503_set_timebase(int);
int 	hp54503_set_trigger(int);
int 	hp54503_store_wmem(int,int,int);

/* Routines for the HP3561 */
int 	hp3561_get_waveform(float **, int,int *,float *,float *,int *);
int 	hp3561_init(int,char *);
int	hp3561_marker_to_peak(int);
int	hp3561_read_marker(int,float *,float *);
int 	hp3561_read_source_values(int,float *);
int 	hp3561_read_values(int,float *,float *,int *);
int     hp3561_set_source_atten(int,float,float *,int,int);
int 	hp3561_source_on(int,int,int);
int 	hp3561_source_window(int,int,int);

/* Routines for the HP89410a */
int 	hp89410a_get_waveform(float **, int,int *,float *,float *,int *);
int 	hp89410a_init(int,char *);
int	hp89410a_marker_to_peak(int, int, int);
int	hp89410a_read_marker(int ,int ,float *,float *);
int 	hp89410a_set_mode(int *mode_is,int dev_address);

/* Routines for the HP35665A */
int 	hp35665a_get_waveform(float **, float **, int,int *);
int 	hp35665a_get_plot_limits(int,int,float *,float *,float *, float *,
				float *,int *);
}
#endif