-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathApplication.h
executable file
·136 lines (112 loc) · 4.08 KB
/
Application.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#ifndef __Application_H
#define __Application_H
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
// put your global typedefs here
class Application {
public:
Application();
// Menu Item Actions
void send_clockset_command(void);
void send_atten_state(bool value);
void send_voltage_command(void);
// --------------------- File Menu -------------------------------
// Set the directory that the data file will be written to
void set_datafile_dir(void);
// Read data from file
void readFile();
// Flush all data buffers
void FlushData(void);
// void dataSync(); //sync data...may not be necessary (Menu Menu)
void setDetector(int detector); //set the detector to show in main windows (Detector Menu)
// Various GUI Buttons
void initialize(void); // Initialize a connection to a data stream
void close_data(void); // Close a connection to a data stream
void openSendParamsWindow(void); // Open the send params window
void openSetHoldTimeWindow(void); // Open the set hold time window
void openSetTrigWindow(void); // Open the trigger options window
//END Menu Item Actions -----------------------------------------------------------
//START Text Output Actions -------------------------------------------------------
float getRate(int detector); //get the count rate
int getFrameNum(void); //get the frame number
int getShutState(void); //get the shutter state
float getTemp(void); //get the temperature
const char getPixel(void);
// Callbacks for the send params window
void send_params(void);
//void break_acq(int data);
void save_settings(void);
void restore_settings(void);
void test(void);
void stop_reading_data(void);
void start_reading_data(void); // start thread to control read functions.
// Callbacks for the set hold time window
void send_global_params(int option); // set trigger options
void start_auto_run(void); // auto-run sequence of acquisitions with varying hold times
// open the data file for saving data
// executed when someone clicks on "Write to File" Button
void start_file(void);
void read_file(void);
void write_header(FILE *file);
//void set_datafile_dir(void);
// clear the existing text displayed in the console
// executed when someone clicks the "Clear" Button next to the console
void clear_console(void);
void save_preferences(void);
void read_preferences(void);
void update_preferencewindow(void);
// convienience function to print text to the console
// not yet implemented
static void printf_to_console(const char *string1, char *string2, int number);
static void print_to_console(const char *text);
float get_pixel_half_life(void);
void set_pixel_half_life(float new_value);
void reset_read_counter(void);
void set_lowthreshold(void);
void flush_histogram(void);
void flush_image(void);
void flush_timeseries(void);
void update_histogrambinsize(void);
void update_timebinsize(void);
void set_energy_histogram(void);
void set_channel_histogram(void);
void update_lightcurvexmax(void);
void update_histogramxmax(void);
void toggle_image_integrate(void);
void save_histogram_to_file(void);
void save_image_to_file(void);
void set_lightcurve_ymax(void);
void set_gsesync_file(void);
void set_formatter_playback_file(void);
void toggle_show_mask(void);
void toggle_detector_display(void);
void flush_all(void);
int elapsed_time_sec;
void set_imagemax(void);
void set_histogram_max(void);
void testfunction(void);
void set_detector_to_display(int detector_number);
unsigned long long frame_display_count;
unsigned long long frame_miss_count;
unsigned long long bad_check_sum_count;
unsigned long long frame_read_count;
unsigned long long no_trigger_count;
unsigned long long formatter_start_time;
int get_data_source(void);
char *get_datafilename(void);
void set_data_source(int value);
uint32_t frame_number;
float temperature_limits_low[13];
float temperature_limits_hi[13];
float voltage_tolerance;
int number_of_temperature_sensors;
private:
int data_source;
char filename[40];
float pixel_half_life;
char read_filename[200];
};
#endif