Main Page | Class List | Directories | File List | Class Members | File Members

acquisition.c File Reference

Control of the acquisition. More...

#include "background.h"
#include "ccu.h"
#include "error.h"
#include "serial.h"
#include <stdlib.h>
#include <gnome.h>
#include "iniconfig.h"
#include "acquisition.h"
#include "semaphore.h"
#include "fitsoutput.h"

Functions

int acquisition_init ()
 Initializes an acqusition.
int acquisition_init_readout ()
 Initializes a readout.
int acquisition_done ()
 called after the last frame of a series has been acquiered.
int acquisition_stop ()
 called in order to stop an acqusition.
void acquisition_push_item (struct acquisition_struct input)
 queues a new acqusition request into the acquisition queue.
int acquisition_pop_item (struct acquisition_struct *dummy)
 pops an acqusition request from the acquisition queue.
void acquisition_readout_failed ()
 This function is called whenever something went wrong with readout.
int acquisition_done_readout ()
 called after a readout has finished.
void acquisition_clear_queue ()
 clears the acquisition queue.
char * acquisition_success_string (int type)
 returns a string to representing the success of an acquisition of a given type.
char * acquisition_type_string (int type)
 returns a string corresdonding to a given type code.
acquisition_struct acq_get_status ()
 returns a structure describing the current status of the acquisition.
void acq_set_progress (char *msg, float f)
 sets the progress of the acquisition .
void acq_start ()
 starts the acquisition .
void acq_stop ()
 stops the acquisition .
void acq_queue_multiple (char *filename)
 queues a multiple exposure

Variables

acquisition_struct acquisition_current
GList * acquisition_list = NULL
sem_t acquisition_sem


Detailed Description

Control of the acquisition.

Copyright (C) 2001-2003 Dirk Huenniger (dhun@astro.uni-bonn.de)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.


Function Documentation

struct acquisition_struct acq_get_status  ) 
 

returns a structure describing the current status of the acquisition.

Returns:
acquisition_struct a struct descibing the current status of the acquisition
This function returns a structure describing the current status of fitsoutput.

void acq_queue_multiple char *  filename  ) 
 

queues a multiple exposure

Parameters:
filename the name of the file containing a list of exposures to be queued
Returns:
void
This function queues a multiple exposure into the acquisition queue, it is used whenever the "OK" button in the multiple exposure window is clicked. Every line in the file given by filename represents a single exposure. The first column contains the exposuretime, the second one the sequence to be used and the third one the gain to be used.

void acq_set_progress char *  msg,
float  f
 

sets the progress of the acquisition .

Parameters:
msg a progress message.
f a number between 0 and 1 descibing how much progress has allready been made
Returns:
void This function sets the progress of the acqusition. The abstract function ui_acq_progress_changed is called in order to inform the ui about this change.

void acq_start  ) 
 

starts the acquisition .

Returns:
void This function starts the acquisition. It should be called by the UI in order to start and aquisition after the items to acquire have been queued using acquisition_push_item.

void acq_stop  ) 
 

stops the acquisition .

Returns:
void This function stops the acquisition. It can be called by the UI at any time.

void acquisition_clear_queue  ) 
 

clears the acquisition queue.

Returns:
void
This function clears the acquisition queue.

int acquisition_done  ) 
 

called after the last frame of a series has been acquiered.

Returns:
int an error/sucess code.
This function is called by the acquisition thread after the last frame of a series has been acquiered. It starts a continues dummy read.

int acquisition_done_readout  ) 
 

called after a readout has finished.

Returns:
int an error/sucess code.
This function is called by the readout thread after the readout is done.

int acquisition_init  ) 
 

Initializes an acqusition.

Returns:
int an error/sucess code.
This function is called at the beginning of an aqusition. acquisition_current has to be initialized with a value poped from acqusition_list before this function is called. This function sends the shutter handling commands to the CCU and starts the exposure thread. This function is called by the acqusition thread once for each frame acquired.

int acquisition_init_readout  ) 
 

Initializes a readout.

Returns:
int an error/sucess code.
This function is called by the exposure thread after the exposure is done and before the readout starts. It initializes the usb-kerneldriver, ,sends the readout command to the ccu and waits for its frame message and initializes the fitsfile. The frame message acknowledges the beginning of the readout. Finally the readout thread is started

int acquisition_pop_item struct acquisition_struct *  dummy  ) 
 

pops an acqusition request from the acquisition queue.

Parameters:
dummy a pointer to an acquisition_struct in which the poped item will be writen
Returns:
integer 0 on success, -1 on failure
This function pops an acqusition request from the acquisition queue.

void acquisition_push_item struct acquisition_struct  input  ) 
 

queues a new acqusition request into the acquisition queue.

Parameters:
input the acqusition request to be queued
Returns:
void
This function queues a new acqusition request into the acquisition queue

void acquisition_readout_failed  ) 
 

This function is called whenever something went wrong with readout.

This function is called whenever something went wrong with readout.

int acquisition_stop  ) 
 

called in order to stop an acqusition.

Returns:
int an error/sucess code.
This function is called by the acquisition thread in order to stop an acqusition. It stops the exposure and the readout threads and closes the fitsfile.

char* acquisition_success_string int  type  ) 
 

returns a string to representing the success of an acquisition of a given type.

Parameters:
type the type of the acqusition as defined in acquisition.h
Returns:
char* the message string
This function returns a string to representing the success of an acquisition of a given type.

char* acquisition_type_string int  type  ) 
 

returns a string corresdonding to a given type code.

Parameters:
type the type code as defined in acquisition.h
Returns:
char* the message string
This function returns a string corresdonding to a given type code.


Variable Documentation

struct acquisition_struct acquisition_current
 

an acquisition_struct descibing the acquisition in progress

GList* acquisition_list = NULL
 

a list of acquisitions to be done

sem_t acquisition_sem
 

a semaphore protecting acquisition_list


Generated on Fri Dec 16 22:23:35 2005 for gboccia by  doxygen 1.4.2