📄 pvcam.h
字号:
/*****************************************************************************/
/*****************************************************************************/
/* bit_depth Bit depth of buffer to allocate (PRECISION_UNS16,...) */
/* exp_num Exposure number to get information about */
/* year Year exposure was taken */
/* month Month of the year the exposure was taken */
/* day Day of the month the exposure was taken */
/* hour Hour of the Day the exposure was taken */
/* min Minute of the Hour the exposure was taken */
/* sec Second of the Minute the exposure was taken */
/* msec Millisecond of the Second the exposure was taken */
/* exp_msec Exposure duration (in milliseconds) */
/* total_exps Number of exposures in buffer */
/* himg Single image in buffer */
/* ibin Serial binning factor of image */
/* jbin Parallel binning factor of image */
/* img_num Number of region in exposure to retrieve */
/* s_ofs Serial offset of image */
/* p_ofs Parallel offset of image */
/* x_size Width of image */
/* y_size Height of image */
/* totl_imgs Number of images in each exposure */
/* buf_size Size of buffer in bytes */
/*****************************************************************************/
rs_bool PV_DECL pl_buf_init (void);
rs_bool PV_DECL pl_buf_uninit (void);
rs_bool PV_DECL pl_buf_alloc (int16_ptr hbuf, int16 exp_total,
int16 bit_depth, int16 rgn_total,
rgn_const_ptr rgn_array);
rs_bool PV_DECL pl_buf_get_bits (int16 hbuf, int16_ptr bit_depth);
rs_bool PV_DECL pl_buf_get_exp_date (int16 hbuf, int16 exp_num,
int16_ptr year, uns8_ptr month,
uns8_ptr day, uns8_ptr hour,
uns8_ptr min, uns8_ptr sec,
uns16_ptr msec);
rs_bool PV_DECL pl_buf_set_exp_date (int16 hbuf, int16 exp_num, int16 year,
uns8 month, uns8 day, uns8 hour,
uns8 min, uns8 sec, uns16 msec);
rs_bool PV_DECL pl_buf_get_exp_time (int16 hbuf, int16 exp_num,
uns32_ptr exp_msec);
rs_bool PV_DECL pl_buf_get_exp_total (int16 hbuf, int16_ptr total_exps);
rs_bool PV_DECL pl_buf_get_img_bin (int16 himg, int16_ptr ibin,
int16_ptr jbin);
rs_bool PV_DECL pl_buf_get_img_handle (int16 hbuf, int16 exp_num,
int16 img_num, int16_ptr himg);
rs_bool PV_DECL pl_buf_get_img_ofs (int16 himg, int16_ptr s_ofs,
int16_ptr p_ofs);
rs_bool PV_DECL pl_buf_get_img_ptr (int16 himg, void_ptr_ptr img_addr);
rs_bool PV_DECL pl_buf_get_img_size (int16 himg, int16_ptr x_size,
int16_ptr y_size);
rs_bool PV_DECL pl_buf_get_img_total (int16 hbuf, int16_ptr totl_imgs);
rs_bool PV_DECL pl_buf_get_size (int16 hbuf, int32_ptr buf_size);
rs_bool PV_DECL pl_buf_free (int16 hbuf);
/*****************************************************************************/
/* The following functions are obsolete and their corresponding PARAM_ */
/* parameters should be used with pl_get_param(), pl_set_param(), */
/* pl_get_enum_param(), and pl_enum_str_length() */
/*****************************************************************************/
rs_bool PV_DECL pl_dd_get_info (int16 hcam, int16 bytes, char_ptr text);
/* Use PARAM_DD_INFO */
rs_bool PV_DECL pl_dd_get_info_length (int16 hcam, int16_ptr bytes);
/* Use PARAM_DD_INFO_LENGTH */
rs_bool PV_DECL pl_dd_get_ver (int16 hcam, uns16_ptr dd_version);
/* Use PARAM_DD_VERSION */
rs_bool PV_DECL pl_dd_get_retries (int16 hcam, uns16_ptr max_retries);
rs_bool PV_DECL pl_dd_set_retries (int16 hcam, uns16 max_retries);
/* Use PARAM_DD_RETRIES */
rs_bool PV_DECL pl_dd_get_timeout (int16 hcam, uns16_ptr m_sec);
rs_bool PV_DECL pl_dd_set_timeout (int16 hcam, uns16 m_sec);
/* Use PARAM_DD_TIMEOUT */
rs_bool PV_DECL pl_ccd_get_adc_offset (int16 hcam, int16_ptr offset);
rs_bool PV_DECL pl_ccd_set_adc_offset (int16 hcam, int16 offset);
/* Use PARAM_ADC_OFFSET */
rs_bool PV_DECL pl_ccd_get_chip_name (int16 hcam, char_ptr chip_name);
/* Use PARAM_CHIP_NAME */
rs_bool PV_DECL pl_ccd_get_clear_cycles (int16 hcam, uns16_ptr clear_cycles);
rs_bool PV_DECL pl_ccd_set_clear_cycles (int16 hcam, uns16 clr_cycles);
/* Use PARAM_CLEAR_CYCLES */
rs_bool PV_DECL pl_ccd_get_clear_mode (int16 hcam, int16_ptr clear_mode);
rs_bool PV_DECL pl_ccd_set_clear_mode (int16 hcam, int16 ccd_clear);
/* Use PARAM_CLEAR_MODE */
rs_bool PV_DECL pl_ccd_get_color_mode (int16 hcam, uns16_ptr color_mode);
/* Use PARAM_COLOR_MODE */
rs_bool PV_DECL pl_ccd_get_cooling_mode (int16 hcam, int16_ptr cooling);
/* Use PARAM_COOLING_MODE */
rs_bool PV_DECL pl_ccd_get_frame_capable (int16 hcam,
rs_bool_ptr frame_capable);
/* Use PARAM_FRAME_CAPABLE */
rs_bool PV_DECL pl_ccd_get_fwell_capacity (int16 hcam,
uns32_ptr fwell_capacity);
/* Use PARAM_FWELL_CAPACITY */
rs_bool PV_DECL pl_ccd_get_mpp_capable (int16 hcam, int16_ptr mpp_capable);
/* Use PARAM_MPP_CAPABLE */
rs_bool PV_DECL pl_ccd_get_preamp_dly (int16 hcam, uns16_ptr preamp_dly);
/* Use PARAM_PREAMP_DELAY */
rs_bool PV_DECL pl_ccd_get_preamp_off_control (int16 hcam,
uns32_ptr preamp_off_control);
rs_bool PV_DECL pl_ccd_set_preamp_off_control (int16 hcam,
uns32 preamp_off_control);
/* Use PARAM_PREAMP_OFF_CONTROL */
rs_bool PV_DECL pl_ccd_get_preflash (int16 hcam, uns16_ptr pre_flash);
/* Use PARAM_PREFLASH */
rs_bool PV_DECL pl_ccd_get_pmode (int16 hcam, int16_ptr pmode);
rs_bool PV_DECL pl_ccd_set_pmode (int16 hcam, int16 pmode);
/* Use PARAM_PMODE */
rs_bool PV_DECL pl_ccd_get_premask (int16 hcam, uns16_ptr pre_mask);
/* Use PARAM_PREMASK */
rs_bool PV_DECL pl_ccd_get_prescan (int16 hcam, uns16_ptr prescan);
/* Use PARAM_PRESCAN */
rs_bool PV_DECL pl_ccd_get_postmask (int16 hcam, uns16_ptr post_mask);
/* Use PARAM_POSTMASK */
rs_bool PV_DECL pl_ccd_get_postscan (int16 hcam, uns16_ptr postscan);
/* Use PARAM_POSTSCAN */
rs_bool PV_DECL pl_ccd_get_par_size (int16 hcam, uns16_ptr par_size);
/* Use PARAM_PAR_SIZE */
rs_bool PV_DECL pl_ccd_get_ser_size (int16 hcam, uns16_ptr ser_size);
/* Use PARAM_SER_SIZE */
rs_bool PV_DECL pl_ccd_get_serial_num (int16 hcam, uns16_ptr serial_num);
/* Use PARAM_SERIAL_NUM */
rs_bool PV_DECL pl_ccs_get_status (int16 hcam, int16_ptr ccs_status);
/* Use PARAM_CCS_STATUS */
rs_bool PV_DECL pl_ccd_get_summing_well (int16 hcam,
rs_bool_ptr s_well_exists);
/* Use PARAM_SUMMING_WELL */
rs_bool PV_DECL pl_ccd_get_tmp (int16 hcam, int16_ptr cur_tmp);
rs_bool PV_DECL pl_ccd_get_tmp_range (int16 hcam, int16_ptr tmp_hi_val,
int16_ptr tmp_lo_val);
/* Use PARAM_TEMP */
rs_bool PV_DECL pl_ccd_get_tmp_setpoint (int16 hcam, int16_ptr tmp_setpoint);
rs_bool PV_DECL pl_ccd_set_tmp_setpoint (int16 hcam, int16 tmp_setpoint);
/* Use PARAM_TEMP_SETPOINT */
rs_bool PV_DECL pl_ccd_set_readout_port (int16 , int16 );
rs_bool PV_DECL pl_ccd_get_pix_par_dist (int16 hcam, uns16_ptr pix_par_dist);
/* Use PARAM_PIX_PAR_DIST */
rs_bool PV_DECL pl_ccd_get_pix_par_size (int16 hcam, uns16_ptr pix_par_size);
/* Use PARAM_PIX_PAR_SIZE */
rs_bool PV_DECL pl_ccd_get_pix_ser_dist (int16 hcam, uns16_ptr pix_ser_dist);
/* Use PARAM_PIX_SER_DIST */
rs_bool PV_DECL pl_ccd_get_pix_ser_size (int16 hcam, uns16_ptr pix_ser_size);
/* Use PARAM_PIX_SER_SIZE */
rs_bool PV_DECL pl_spdtab_get_bits (int16 hcam, int16_ptr spdtab_bits);
/* Use PARAM_BIT_DEPTH */
rs_bool PV_DECL pl_spdtab_get_gain (int16 hcam, int16_ptr spdtab_gain);
rs_bool PV_DECL pl_spdtab_set_gain (int16 hcam, int16 spdtab_gain);
rs_bool PV_DECL pl_spdtab_get_max_gain (int16 hcam,
int16_ptr spdtab_max_gain);
/* Use PARAM_GAIN_INDEX */
rs_bool PV_DECL pl_spdtab_get_num (int16 hcam, int16_ptr spdtab_num);
rs_bool PV_DECL pl_spdtab_set_num (int16 hcam, int16 spdtab_num);
/* Use PARAM_SPDTAB_INDEX */
rs_bool PV_DECL pl_spdtab_get_entries (int16 hcam, int16_ptr spdtab_entries);
/* Use PARAM_SPDTAB_INDEX (ATTR_MAX) */
rs_bool PV_DECL pl_spdtab_get_port (int16 hcam, int16_ptr spdtab_port);
rs_bool PV_DECL pl_spdtab_get_port_total (int16 hcam, int16_ptr total_ports);
/* Use PARAM_READOUT_PORT */
rs_bool PV_DECL pl_spdtab_get_time (int16 hcam, uns16_ptr spdtab_time);
/* Use PARAM_PIX_TIME */
rs_bool PV_DECL pl_shtr_get_close_dly (int16 hcam, uns16_ptr shtr_close_dly);
rs_bool PV_DECL pl_shtr_set_close_dly (int16 hcam, uns16 shtr_close_dly);
/* Use PARAM_SHTR_CLOSE_DELAY */
rs_bool PV_DECL pl_shtr_get_open_dly (int16 hcam, uns16_ptr shtr_open_dly);
rs_bool PV_DECL pl_shtr_set_open_dly (int16 hcam, uns16 shtr_open_dly);
/* Use PARAM_SHTR_OPEN_DELAY */
rs_bool PV_DECL pl_shtr_get_open_mode (int16 hcam, int16_ptr shtr_open_mode);
rs_bool PV_DECL pl_shtr_set_open_mode (int16 hcam, int16 shtr_open_mode);
/* Use PARAM_SHTR_OPEN_MODE */
rs_bool PV_DECL pl_shtr_get_status (int16 hcam, int16_ptr shtr_status);
/* Use PARAM_SHTR_STATUS */
rs_bool PV_DECL pl_exp_get_time_seq (int16 hcam, uns16_ptr exp_time);
rs_bool PV_DECL pl_exp_set_time_seq (int16 hcam, uns16 exp_time);
/* Use PARAM_EXP_TIME */
rs_bool PV_DECL pl_exp_check_progress (int16 hcam, int16_ptr status,
uns32_ptr bytes_arrived);
/* Use pl_exp_check_status or pl_exp_check_cont_status */
/*****************************************************************************/
/* These functions should not be used. They are included for compatibility */
/* reasons. */
/*****************************************************************************/
rs_bool PV_DECL pl_exp_set_cont_mode (int16 hcam, int16 mode);
rs_bool PV_DECL pl_subsys_do_diag (int16 hcam, uns8 subsys_id,
uns16_ptr err_code);
rs_bool PV_DECL pl_subsys_get_id (int16 hcam, uns8 subsys_id,
uns16_ptr part_num, uns8_ptr revision);
rs_bool PV_DECL pl_subsys_get_name (int16 hcam, uns8 subsys_id,
char_ptr subsys_name);
/*****************************************************************************/
/* End of function definitions. */
/*****************************************************************************/
#ifdef PV_C_PLUS_PLUS
};
#endif
/************************* SINGLE-BYTE MACROS ********************************/
/* These will pull out a single uns8 from either a two-uns8 integer quantity,*/
/* or a four-uns8 integer quantity. They ARE NOT machine specific. The */
/* software using them is responsible for handling the interface requirements*/
/* of the NGC camera, which expects the high uns8 first, then the lower bytes*/
/* in order. There are several macros: */
/* */
/* ??16_BYTE extract one of two bytes from a two-uns8 integer input */
/* VAL_UNS16 produces a two-uns8 integer value from high & low uns8 input */
/* ??32_BYTE extracts one of four bytes from a four-uns8 integer input */
/* VAL_UNS32 produces a four-uns8 integer value from 4 input bytes */
#define MS16_BYTE(two_byte_value) ((uns8) ((two_byte_value) >> 8))
#define LS16_BYTE(two_byte_value) ((uns8) (two_byte_value))
#define VAL_UNS16(ms_byte,ls_byte) ( (uns16)(((uns16)((uns8)(ms_byte))<<8) |\
((uns16)((uns8)(ls_byte)))) )
#define MS32_BYTE(four_byte_val) ((uns8) ((four_byte_val) >> 24))
#define MH32_BYTE(four_byte_val) ((uns8) ((four_byte_val) >> 16))
#define ML32_BYTE(four_byte_val) ((uns8) ((four_byte_val) >> 8))
#define LS32_BYTE(four_byte_val) ((uns8) (four_byte_val))
#define VAL_UNS32(ms_byte,mh_byte,ml_byte,ls_byte) (\
((uns32)((uns8)(ms_byte))<<24) |\
((uns32)((uns8)(mh_byte))<<16) |\
((uns32)((uns8)(ml_byte))<<8) |\
((uns32)((uns8)(ls_byte)) ) )
#endif /* _PVCAM_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -