/* ao_if.h -- AO System Interface Declarations */ /* $Id: ao_if.h,v 1.4 2006/10/31 22:43:40 aocm Exp $ */ /*---------------------------------------------------------------------------* | | PROJECT: | Palomar Adaptive Optics (PALAO) | Jet Propulsion Laboratory, Pasadena, CA | | A description of the PALAO system, its vision and characteristics | is available from http://AO/ | | REVISION HISTORY: | | Date By Description | | 21-Dec-99 Thang Trinh Version 1.0 delivery. | | DESCRIPTION: | This header file contains type definitions and symbolic constants | for the interface between the Palomar AO system and the science | camera. Currently the interface is that between the AO system and | PHARO. | *--------------------------------------------------------------------------*/ #ifndef AO_IF_H #define AO_IF_H #include "ao_msg.h" #include "ao_tcs_if.h" #ifndef MOTOR_MOVING #define MOTOR_MOVING 1 #endif #ifndef MOTOR_STOPPED #define MOTOR_STOPPED 2 #endif #ifndef NET_CONN #define NET_CONN 1 #endif #ifndef NET_DISCONN #define NET_DISCONN -1 #endif #define NAME_LEN 128 /* maximum length of table filenames */ /* AO status, configuration and performance data */ typedef struct ao_scp { float wfs_delta_x; /* offset from WFS field stop center to PHARO detector center (arcsec) */ float wfs_delta_y; float fsm_int_gain; /* FSM servo gains */ float fsm_prop_gain; float dm_int_gain; /* DM servo gains */ float dm_prop_gain; boolean fsm_on; /* low order on/off */ boolean dm_on; /* high order on/off */ int conn_status; /* AO controller connection status */ int fsm_rate; /* FSM update rate */ int wfs_cam_rate; /* WFS camera readout rate (DM update rate) */ int log_data; /* data types currently being logged */ char reconst_name[NAME_LEN]; /* reconstructor name */ float ao_quality; /* AO quality measure (TBD) */ } AO_SCP; typedef struct ao_scp_msg { MSG_HDR hdr; AO_SCP data; } AO_SCP_MSG; /* PHARO status data */ #define MAXWHEELS 6 #define WHEEL_NAME_LEN 16 typedef enum { PH_SLIT = 0, PH_LYOT, PH_FILTER, PH_GRISM, PH_SHUTTER, PH_CAROUSEL } WHEEL_TYPE; typedef struct pharo_status { char wheel_name[MAXWHEELS][WHEEL_NAME_LEN]; int wheel_pos[MAXWHEELS]; int wheel_status[MAXWHEELS]; /* MOTOR_MOVING or MOTOR_STOPPED */ int int_time_rem; /* integration time remaining */ } PHARO_STATUS; typedef struct pharo_status_msg { MSG_HDR hdr; PHARO_STATUS data; } PHARO_STATUS_MSG; /* PHARO image data */ #define IMGMAXROWS 1024 #define IMGMAXCOLS 1024 typedef struct pharo_image { int int_time; /* actual integration time (msecs) */ /* 0 = bad image data */ int image[IMGMAXROWS][IMGMAXCOLS]; } PHARO_IMAGE; typedef struct pharo_image_msg { MSG_HDR hdr; PHARO_IMAGE data; } PHARO_IMAGE_MSG; #endif /* AO_IF_H */