00001
00013 #ifndef __acquisition_h
00014 #define __acquisition_h 1
00015 #define acq_type_object 0
00016 #define acq_type_special 1
00017 #define acq_type_user_readout 2
00018 #define acq_type_bias 3
00019 #define acq_type_flat 4
00020 #define acq_type_dark 5
00021 #define acq_status_running 0
00022 #define acq_status_stoped_by_user 1
00023 #define acq_status_accomplished 2
00024 #define acq_status_failed 3
00025 #include "serial.h"
00026 #include "semaphore.h"
00027
00028
00029 struct acquisition_struct {
00030 char objectname[1000];
00031 char filename[1000];
00032 float exposuretime;
00033 int sequence;
00034 int gain;
00035 int type;
00036 int status;
00037
00038 char readoutcommand[1000];
00039 int dummy_read_before_start;
00040 int open_shutter_before_wait;
00041 int wait;
00042 int close_shutter_after_wait;
00043 int readout;
00044 int close_shutter_after_readout;
00045 int dummy_read_after_end;
00046
00047 unsigned long filenum;
00048 };
00049
00050 extern sem_t acquisition_sem;
00051 extern volatile struct acquisition_struct acquisition_current;
00052 int acquisition_init();
00053 int acquisition_stop();
00054 int acquisition_init_readout();
00055 int acquisition_pop_item(struct acquisition_struct *dummy);
00056 void acquisition_push_item(struct acquisition_struct input);
00057 void acquisition_clear_queue();
00058 int acquisition_done();
00059 int acquisition_done_readout();
00060 void acq_queue_multiple(char * filename);
00061 char* acquisition_success_string( int type );
00062 char* acquisition_type_string( int type );
00063 struct acquisition_struct acq_get_status();
00064 extern void ui_acq_progress_changed();
00065 extern void ui_acquisition_stoped();
00066 extern void ui_acq_readout_finished();
00067 void acq_set_progress(char *msg, float f);
00068 void acq_start();
00069 void acq_stop();
00070 #endif