#include <stdio.h>
#include "serial.h"
#include <sys/time.h>
#include <progress.h>
Go to the source code of this file.
Defines | |
#define | __ccu_h 1 |
#define | ccu_errorcode_ok 0 |
#define | ccu_errorcode_domino 1 |
#define | ccu_errorcode_load 2 |
#define | ccu_errorcode_sequence 3 |
#define | ccu_errorcode_copy_memory 4 |
#define | ccu_errorcode_protocol 5 |
#define | ccu_errorcode_time_out 6 |
#define | ccu_errorcode_vme 7 |
#define | ccu_origin_dummy_logic 1 |
#define | ccu_origin_transfer 2 |
#define | ccu_origin_image 3 |
#define | ccu_origin_readout 4 |
#define | ccu_origin_device 5 |
#define | ccu_origin_load 6 |
#define | ccu_origin_wait 7 |
#define | ccu_status_idle 0 |
#define | ccu_status_ok 1 |
#define | ccu_status_busy 2 |
#define | ccu_status_fail 3 |
#define | ccu_status_readout 4 |
#define | ccu_status_waiting 5 |
#define | ccu_status_dummy_read 6 |
#define | ccu_status_downloading 8 |
#define | ccu_timeout 10 |
#define | ccu_closed 0 |
#define | ccu_open 1 |
Functions | |
void | ui_ccu_progress_changed (struct ccu_status_struct) |
called by ccu.c whenever its progress-/status- property has changed. | |
void | ui_ccu_switches_changed (struct ccu_status_struct) |
called by ccu.c whenever its switches property changed. | |
void | ui_ccu_codes_changed (struct ccu_status_struct) |
called by ccu.c whenever its codes property changed. | |
void | ui_ccu_ser_in (const char *str) |
called by ccu.c whenever something is received from the CCU's serial port. | |
void | ui_ccu_ser_out (const char *str) |
called by ccu.c whenever something is send to the CCU's serial port. | |
void | ui_ccu_sequences_changed (struct ccu_sequence_struct) |
called by ccu.c whenever the sequence list changed. | |
void | ui_ccu_zero_volt_set (void) |
called by ccu.c whenever the zero volt sequence has been successfully executed. | |
int | ccu_test_avail (void) |
tests whether the CCU is available and initalized it if possible. | |
int | ccu_init (void) |
initializes ccu.c. | |
int | ccu_zero_volt () |
starts the zero volt sequence on the CCU. | |
void | ccu_done (void) |
closes ccu.c. | |
int | ccu_reset_kerneldriver () |
resets the kernel driver. | |
void | ccu_display_ser_in (const char *str) |
void | ccu_display_ser_out (const char *str) |
int | end_message_get_error_code (const char *endmsg) |
extracts the error code from an endmessage received from the CCU. | |
int | ccu_quit () |
sends a quit signal to the CCU | |
int | ccu_quit_msg () |
sends a quit signal to the CCU | |
int | ccu_dummy_read () |
starts a continues dummy read | |
int | ccu_shutter_open () |
opens the shutter. | |
int | ccu_shutter_close () |
closes the shutter. | |
int | ccu_load_sequence_context (void) |
loads the sequence list from the CCU. | |
int | ccu_parse_database () |
loads and parses a database given in the .SQ file | |
int | ccu_start_queue () |
starts a queue in the ccu. | |
int | ccu_clear_queue () |
clears the queue CCU and empties the queue in ccu.c | |
int | ccu_readout_user (char *str) |
starts a readout, with a user defined readout command. | |
int | ccu_queue_pop_item (char *dummy) |
pops a command from the queue. | |
void | ccu_queue_push_item (char *input) |
queues a new command into the queue. | |
int | ccu_upload_database_file (char *filename) |
downloads a database into the CCU. | |
ccu_status_struct | ccu_get_status () |
returns the current status of the CCU. | |
char * | ccu_function_origin_message (int funcorig) |
retruns a string corresponding to the given function origin code emitted by the CCU. | |
char * | ccu_error_message (int error) |
retruns a string corresponding to the given error code emitted by the CCU. | |
void | ccu_parse_endmessage (const char *endmsg) |
parses an endmessage and sets the status accordingly | |
int | ccu_get_ysize () |
returns the y size of the image beeing acquired currently. | |
int | ccu_get_xsize () |
returns the x size of the image beeing acquired currently. | |
progress_struct | ccu_get_progress () |
returns the current progress of the CCU. | |
void | ccu_ser_in (const char *str) |
called whenever something is received from the CCU | |
void | ccu_ser_out (const char *str) |
called whenever something is sent to the CCU | |
char * | ccu_status_message (int code) |
retruns a string corresponding to status code defined in ccu.h. | |
void | ccu_reset_breakcondition () |
resets the CCUs break condition flag. | |
void | ccu_reset_warning () |
resets the CCUs warning flag. | |
int | ccu_wait_for_end_message (int timeout) |
waits for the CCU to send an end message. | |
void | ccu_reset_com_problem (void) |
resets the CCUs communication problem flag. | |
void | ccu_set_com_problem (void) |
sets the CCUs communication problem flag. | |
char * | ccu_status_text (int code) |
retruns a string corresponding to status code defined in ccu.h. | |
int | ccu_queue_file (char *filename) |
queues a list of commands read from a file. | |
int | ccu_send_queue () |
send a queue to the CCU. | |
size_t | ccu_read_usb (unsigned char *data) |
reads 512 bytesfrom the usb kerneldriver. | |
int | ccu_finish () |
Destuctor. | |
void | ccu_simulate_image () |
Fills the image buffer with some pseudoastronimical data. | |
void | ccu_start_database_dowload (char *str) |
starts a thread that will download the database into the CCU | |
void | ccu_start_database_dowload_basename (char *str) |
starts a thread that will download the database into the CCU | |
void | ccu_set_progress (char *msg, float f) |
sets the progress struct of ccu.c. | |
void | ccu_start_zero_volt () |
starts a thread that will run the zero volt sequence in the CCU | |
Variables | |
int | command_block |
double | ccu_shutter_offset |
char | ccu_sequence_context_full [100][1000] |
serdev * | ccu_device |
char | ccu_sequence_context [100][1000] |
FILE * | ccu_usbdev_file |
ccu_database_struct | ccu_database [100] |
char | ccu_database_filename [1000] |
char | ccu_usbdev [1000] |
char | ccu_dev [1000] |
char | ccu_ctrldir [1000] |
char | logfile_name [1000] |
char | ccu_database_dir [1000] |
int | ccu_stty_baud |
int | ccu_channels |
char | ui_ccu_sequence_context [100][1000] |
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.
|
clears the queue CCU and empties the queue in ccu.c
|
|
closes ccu.c.
|
|
starts a continues dummy read
|
|
retruns a string corresponding to the given error code emitted by the CCU.
|
|
Destuctor.
|
|
retruns a string corresponding to the given function origin code emitted by the CCU.
|
|
returns the current progress of the CCU.
|
|
returns the current status of the CCU.
|
|
returns the x size of the image beeing acquired currently.
|
|
returns the y size of the image beeing acquired currently.
|
|
initializes ccu.c.
|
|
loads the sequence list from the CCU.
|
|
loads and parses a database given in the .SQ file
|
|
parses an endmessage and sets the status accordingly
|
|
queues a list of commands read from a file.
|
|
pops a command from the queue.
|
|
queues a new command into the queue.
|
|
sends a quit signal to the CCU
|
|
sends a quit signal to the CCU
|
|
reads 512 bytesfrom the usb kerneldriver.
|
|
starts a readout, with a user defined readout command.
|
|
resets the CCUs break condition flag.
|
|
resets the CCUs communication problem flag.
|
|
resets the kernel driver.
|
|
resets the CCUs warning flag.
|
|
send a queue to the CCU.
|
|
called whenever something is received from the CCU
|
|
called whenever something is sent to the CCU
|
|
sets the CCUs communication problem flag.
|
|
sets the progress struct of ccu.c.
|
|
closes the shutter.
|
|
opens the shutter.
|
|
Fills the image buffer with some pseudoastronimical data.
|
|
starts a thread that will download the database into the CCU
|
|
starts a thread that will download the database into the CCU
|
|
starts a queue in the ccu.
|
|
starts a thread that will run the zero volt sequence in the CCU
|
|
retruns a string corresponding to status code defined in ccu.h.
|
|
retruns a string corresponding to status code defined in ccu.h.
|
|
tests whether the CCU is available and initalized it if possible.
|
|
downloads a database into the CCU.
|
|
waits for the CCU to send an end message.
|
|
starts the zero volt sequence on the CCU.
|
|
extracts the error code from an endmessage received from the CCU.
|
|
called by ccu.c whenever its codes property changed.
|
|
called by ccu.c whenever its progress-/status- property has changed.
|
|
called by ccu.c whenever the sequence list changed.
|
|
called by ccu.c whenever something is received from the CCU's serial port.
|
|
called by ccu.c whenever something is send to the CCU's serial port.
|
|
called by ccu.c whenever its switches property changed.
|
|
called by ccu.c whenever the zero volt sequence has been successfully executed.
|
|
the number of channels to be read out simutaneously |
|
the name of the directory for ccu control files received via network |
|
the CCU Database as read form the ".SQ" file |
|
the name of the directory containing the .DB and .SQ files to be selected |
|
the name of the ".DB" file containing the sequences |
|
the name of the file representing the serial port the CCU is connected to |
|
serial device |
|
the names of the sequences as read from the CCU |
|
the full description of the sequences as read from the CCU, via H 13 |
|
Correction for incorrect shutter open time exposuretime_send_to_controlller=exposuretime_set_by_user-ccu_shutter_offset |
|
the baud rate of the serial (ttyS) port used by the CCU |
|
the name of the file representing the usb device for fast data transfer form the CCU into the computer |
|
a file pointer for data acquistion via usb |
|
if this is not 0, any command to be sent to the ccu will be blocked |
|
the names of the sequences for display in a user interface |