#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <sys/types.h>
#include <unistd.h>
#include "background.h"
#include "uc.h"
#include "ccu.h"
#include "error.h"
#include "logfile.h"
#include "serial.h"
#include "gui.h"
#include "semaphore.h"
#include "acquisition.h"
#include "progress.h"
#include "instctrl.h"
#include "telescope.h"
#include "preview.h"
#include "auto.h"
#include "texoutput.h"
#include "iniconfig.h"
#include <time.h>
Functions | |
void | background_start_download (char *dummy) |
starts the threaded download of the database (firmware) into to CCD Controller | |
int | background_anything_running () |
checks whether any background process is running, that has got anything to do with the CCD Controller | |
int | background_anything_except_acquire_running () |
checks whether any background process (except the acquisition process) is running, that has got anything to do with the CCD Controller | |
void | threads_info (char *infostr) |
writes the pid and a given string into a logfile, is used to write the start into the logfile | |
void * | task_serial (void *arg) |
thread for communication with the serial RS232 interface. | |
void * | task_readout (void *arg) |
thread for CCD readout | |
void * | task_instctrl (void *arg) |
thread for communication with the instrument control program. | |
void * | task_exposure (void *arg) |
thread for exposure. | |
void * | task_acquire (void *arg) |
thread for acquistion. | |
void * | task_download (void *arg) |
thread for loading database (firmware) into the CCD Controller. | |
void * | task_preview (void *arg) |
thread for sending the preview to the User Interface | |
void * | task_texoutput (void *arg) |
thread for texoutput related background operations. | |
void * | task_auto (void *arg) |
thread for automated functions. | |
void * | task_postproc (void *arg) |
thread for postprocessing fits files. | |
void * | task_terminal (void *arg) |
thread for interaction with the user interface. | |
void | task_ser_test (void) |
initialization of uc.c (unused). | |
void | task_readout_init (void) |
initialization of the readout thread | |
void | task_instctrl_init (void) |
initialization of the insturment control communication thread | |
void | task_preview_init (void) |
initialization of the preview thread | |
void | task_auto_init (void) |
initialization of the auto thread | |
void | task_texoutput_init (void) |
initialization of the LaTeX file output thread | |
void | task_postproc_init (void) |
initialization of the fitsfile postprocessing thread | |
void | task_exposure_init (void) |
initialization of the exposure thread | |
void | task_acquire_init (void) |
initialization of the acquistion thread | |
void | task_download_init (void) |
initialization of the CCD Controller loading thread | |
void | task_serial_init (void) |
initializaties the thread for communication with the serial RS232 interface | |
void | task_terminal_init (void) |
initializaties the thread for communication with the User Interface | |
void | task_serial_done (void) |
destroys the thread for communication with the RS232 Interface | |
void | task_readout_done (void) |
destroys the thread for communication CCD readout | |
void | task_instctrl_done (void) |
destroys the thread for communication with instrument control program | |
void | task_exposure_done (void) |
destroys the thread for exposures | |
void | task_acquire_done (void) |
destroys the thread for acquisition control | |
void | task_download_done (void) |
destroys the thread for loading a database (firmware) into the CCD Controller | |
void | task_terminal_done (void) |
destroys the thread for user interface interaction | |
void | task_preview_done (void) |
destroys the thread for copying preview | |
void | task_auto_done (void) |
destroys the thread for automated flatfielding | |
void | task_texoutput_done (void) |
destroys the thread for automated tex file logging | |
void | task_postproc_done (void) |
destroys the thread for fitsfile postprocessing | |
void | task_terminal_suspend (void) |
suspends the thread for user interface interaction | |
void | task_exposure_suspend (void) |
suspends the thread for user interface interaction | |
void | init_background_tasks (void) |
starts all background threads | |
int | done_background_tasks (void) |
stops all background threads | |
int | main_init_everything () |
main intializer | |
Variables | |
volatile int | program_is_running = 1 |
volatile int | readout_is_running = 0 |
volatile int | readout_is_stopped = 0 |
volatile int | exposure_is_running = 0 |
volatile int | exposure_is_stopped = 0 |
volatile int | acquire_is_running = 0 |
volatile int | acquire_restart = 0 |
volatile int | acquire_stop = 0 |
volatile int | auto_is_running = 0 |
volatile int | auto_stop = 0 |
volatile int | download_start = 0 |
volatile int | download_is_running = 0 |
volatile int | zero_volt_is_running = 0 |
volatile int | zero_volt_start = 0 |
volatile int | terminal_is_running = 1 |
volatile int | terminal_is_stopped = 0 |
volatile int | background_retries = 300 |
volatile int | postproc_is_running = 0 |
volatile int | gui_clock = 0 |
char | acquire_stop_string [1000] = "" |
char | download_filename [1000] = "" |
char | postproc_filename [1000] = "" |
float | background_exposuretime |
double | background_time_begin |
int | background_acquisitions_done |
int | task_uc_avail = 0 |
int | task_ccu_avail = 0 |
int | task_ser_block = 1 |
sem_t | terminalsem |
GList * | terminallist = NULL |
pthread_t | task_serial_thread |
pthread_t | task_readout_thread |
pthread_t | task_exposure_thread |
pthread_t | task_terminal_thread |
pthread_t | task_acquire_thread |
pthread_t | task_download_thread |
pthread_t | task_preview_thread |
pthread_t | task_auto_thread |
pthread_t | task_texoutput_thread |
pthread_t | task_postproc_thread |
pthread_t | task_instctrl_thread |
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.
|
checks whether any background process (except the acquisition process) is running, that has got anything to do with the CCD Controller
|
|
checks whether any background process is running, that has got anything to do with the CCD Controller
|
|
starts the threaded download of the database (firmware) into to CCD Controller
|
|
stops all background threads
|
|
starts all background threads
|
|
main intializer
|
|
thread for acquistion.
|
|
destroys the thread for acquisition control
|
|
initialization of the acquistion thread
|
|
thread for automated functions.
|
|
destroys the thread for automated flatfielding
|
|
initialization of the auto thread
|
|
thread for loading database (firmware) into the CCD Controller.
|
|
destroys the thread for loading a database (firmware) into the CCD Controller
|
|
initialization of the CCD Controller loading thread
|
|
thread for exposure.
|
|
destroys the thread for exposures
|
|
initialization of the exposure thread
|
|
suspends the thread for user interface interaction
|
|
thread for communication with the instrument control program.
|
|
destroys the thread for communication with instrument control program
|
|
initialization of the insturment control communication thread
|
|
thread for postprocessing fits files.
|
|
destroys the thread for fitsfile postprocessing
|
|
initialization of the fitsfile postprocessing thread
|
|
thread for sending the preview to the User Interface
|
|
destroys the thread for copying preview
|
|
initialization of the preview thread
|
|
thread for CCD readout
|
|
destroys the thread for communication CCD readout
|
|
initialization of the readout thread
|
|
initialization of uc.c (unused).
|
|
thread for communication with the serial RS232 interface.
|
|
destroys the thread for communication with the RS232 Interface
|
|
initializaties the thread for communication with the serial RS232 interface
|
|
thread for interaction with the user interface.
|
|
destroys the thread for user interface interaction
|
|
initializaties the thread for communication with the User Interface
|
|
suspends the thread for user interface interaction
|
|
thread for texoutput related background operations.
|
|
destroys the thread for automated tex file logging
|
|
initialization of the LaTeX file output thread
|
|
writes the pid and a given string into a logfile, is used to write the start into the logfile
|
|
1 if the acquisition thread is running |
|
set to 1 in order to ask the acquisition threat to (re)start |
|
set to 1 in order to ask the acquisition threat to stop |
|
a string describing why the readout thread was stopped |
|
1 if the auto thread is running |
|
set to 1 in order to ask the auto threat to stop |
|
the number of acquistions done |
|
the exposuretime of to be passed to the exposure thread |
|
the number of retries to read new data from the USB Kernel driver |
|
the time when the exposure thread was started |
|
the name of the Database (firmware) to be loaded into the CCU |
|
1 if the Databese (firmware) download into the CCU is running |
|
set to 1 in order to start the download of the Database (firmware) into the CCD Controller |
|
1 if the exposure thread is active, 0 otherwise, set to 0 in order to ask the the thread to stop |
|
1 if the exposure thread was stopped |
|
a counter couinting from one to 20 once pers second |
|
the name of the fitsfile to be postprocessed |
|
1 if the fits file postprocessing thread is running |
|
1 if the programm is running 0 otherwise |
|
1 if the readout thread is active, 0 otherwise |
|
1 if the readout thread was stopped, set to 0 in order to ask the the thread to stop |
|
the thread for acquisition |
|
the thread for automated flatfield and focus systems |
|
ask Oliver Cord23es 2 |
|
the thread for database (firmware) loading from the PC to the CCD Controller |
|
the thread for exposure |
|
the thread for communication with the instrument control programm |
|
the thread for .fits file postprocessing |
|
the thread that is sending the online display (preview) information to the GUI |
|
the thread for readout |
|
ask Oliver Cor23des |
|
the thread for the serial interface |
|
the thread for unser interface interaction |
|
the thread for LaTeX logging |
|
ask Oliver Corde312s |
|
1 if the terminal (User interface interaction) thread is running |
|
1 if the terminal (User interface interaction) thread is stopped |
|
A queue to decople the GTK user interface from the rest of treaded evironment |
|
semaphore and List for terminal thead, protoecting terminallist and terminallist2, only needed for direct GTK binding |
|
1 if the zero volt thread is running |
|
set to 1 in order to start the zero Volt Sequence in the CCU |