diff FXAnalyse.h @ 88:9b7588cd4013

Move data acquisition into separate thread The data acquisition thread transfers data to the main thread trough a Thread Safe Queue. This separation allows for making the data acquisition system pluggable. The old file based communication to the KK counter is implemented along with a very simple fake data provider.
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Thu, 21 Mar 2013 18:24:45 +0100
parents c03263186dd7
children 675cb8d5e8a7
line wrap: on
line diff
--- a/FXAnalyse.h	Thu Mar 21 12:08:27 2013 +0100
+++ b/FXAnalyse.h	Thu Mar 21 18:24:45 2013 +0100
@@ -54,104 +54,101 @@
 #define  PANEL_CHECKBOX_FREQ2PLOT         17      /* control type: radioButton, callback function: CB_OnFreqPlot */
 #define  PANEL_CHECKBOX_MATH1PLOT         18      /* control type: radioButton, callback function: CB_OnFreqPlot */
 #define  PANEL_CHECKBOX_FREQ1PLOT         19      /* control type: radioButton, callback function: CB_OnFreqPlot */
-#define  PANEL_TIMER                      20      /* control type: timer, callback function: CB_OnTimer */
-#define  PANEL_DDS2                       21      /* control type: numeric, callback function: CB_ChangeDDSOut */
-#define  PANEL_TEXTMSG                    22      /* control type: textMsg, callback function: (none) */
-#define  PANEL_TEXTMSG_2                  23      /* control type: textMsg, callback function: (none) */
-#define  PANEL_SLOPETIME                  24      /* control type: numeric, callback function: CB_ChangeSlopeTime */
-#define  PANEL_DDS1                       25      /* control type: numeric, callback function: CB_ChangeDDSOut */
-#define  PANEL_SPLITTER                   26      /* control type: splitter, callback function: (none) */
-#define  PANEL_CHANGENDIV                 27      /* control type: numeric, callback function: CB_OnChangeNdiv */
-#define  PANEL_N3CHOICE                   28      /* control type: numeric, callback function: CB_ChangeN */
-#define  PANEL_N3CALCULUS                 29      /* control type: command, callback function: CB_OnNCalculus */
-#define  PANEL_N1CHOICE                   30      /* control type: numeric, callback function: CB_ChangeN */
-#define  PANEL_N2CHOICE                   31      /* control type: numeric, callback function: CB_ChangeN */
-#define  PANEL_N2CALCULUS                 32      /* control type: command, callback function: CB_OnNCalculus */
-#define  PANEL_DDS4STEP                   33      /* control type: ring, callback function: CB_ChangeDDSStep */
-#define  PANEL_DDS3STEP                   34      /* control type: ring, callback function: CB_ChangeDDSStep */
-#define  PANEL_DDS2STEP                   35      /* control type: ring, callback function: CB_ChangeDDSStep */
-#define  PANEL_CENTERFREQUENCY            36      /* control type: numeric, callback function: (none) */
-#define  PANEL_SLOPE_APPLIED              37      /* control type: numeric, callback function: CB_SetSlope */
-#define  PANEL_MATH4                      38      /* control type: numeric, callback function: (none) */
-#define  PANEL_MATH5                      39      /* control type: numeric, callback function: (none) */
-#define  PANEL_MATH3                      40      /* control type: numeric, callback function: (none) */
-#define  PANEL_CHECKBOX_MATH5PLOT         41      /* control type: radioButton, callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH4PLOT         42      /* control type: radioButton, callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH4ALLAN        43      /* control type: radioButton, callback function: CB_OnAllanPlot */
-#define  PANEL_DDS1STEP                   44      /* control type: ring, callback function: CB_ChangeDDSStep */
-#define  PANEL_TEXTMSG_15                 45      /* control type: textMsg, callback function: (none) */
-#define  PANEL_CHECKBOX_MATH5ALLAN        46      /* control type: radioButton, callback function: CB_OnAllanPlot */
-#define  PANEL_CHECKBOX_MATH3PLOT         47      /* control type: radioButton, callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH5SAVE         48      /* control type: radioButton, callback function: (none) */
-#define  PANEL_CHECKBOX_MATH4SAVE         49      /* control type: radioButton, callback function: (none) */
-#define  PANEL_CHECKBOX_MATH3ALLAN        50      /* control type: radioButton, callback function: CB_OnAllanPlot */
-#define  PANEL_MATHSTRING4                51      /* control type: string, callback function: CB_ChangeMath */
-#define  PANEL_TEXTMSG_17                 52      /* control type: textMsg, callback function: (none) */
-#define  PANEL_MATH2                      53      /* control type: numeric, callback function: (none) */
-#define  PANEL_SPLITTER_15                54      /* control type: splitter, callback function: (none) */
-#define  PANEL_SPLITTER_12                55      /* control type: splitter, callback function: (none) */
-#define  PANEL_CHECKBOX_MATH2PLOT         56      /* control type: radioButton, callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH3SAVE         57      /* control type: radioButton, callback function: (none) */
-#define  PANEL_CHECKBOX_MATH2SAVE         58      /* control type: radioButton, callback function: (none) */
-#define  PANEL_CHECKBOX_MATH2ALLAN        59      /* control type: radioButton, callback function: CB_OnAllanPlot */
-#define  PANEL_TEXTMSG_7                  60      /* control type: textMsg, callback function: (none) */
-#define  PANEL_MATHSTRING3                61      /* control type: string, callback function: CB_ChangeMath */
-#define  PANEL_MATH1                      62      /* control type: numeric, callback function: (none) */
-#define  PANEL_SPLITTER_6                 63      /* control type: splitter, callback function: (none) */
-#define  PANEL_TEXTMSG_18                 64      /* control type: textMsg, callback function: (none) */
-#define  PANEL_TEXTMSG_6                  65      /* control type: textMsg, callback function: (none) */
-#define  PANEL_TEXTMSG_8                  66      /* control type: textMsg, callback function: (none) */
-#define  PANEL_TEXTMSG_19                 67      /* control type: textMsg, callback function: (none) */
-#define  PANEL_MATHSTRING1                68      /* control type: string, callback function: CB_ChangeMath */
-#define  PANEL_TEXTMSG_9                  69      /* control type: textMsg, callback function: (none) */
-#define  PANEL_TEXTMSG_10                 70      /* control type: textMsg, callback function: (none) */
-#define  PANEL_MATHSTRING2                71      /* control type: string, callback function: CB_ChangeMath */
-#define  PANEL_TEXTMSG_16                 72      /* control type: textMsg, callback function: (none) */
-#define  PANEL_SPLITTER_11                73      /* control type: splitter, callback function: (none) */
-#define  PANEL_SPLITTER_16                74      /* control type: splitter, callback function: (none) */
-#define  PANEL_SPLITTER_9                 75      /* control type: splitter, callback function: (none) */
-#define  PANEL_SPLITTER_3                 76      /* control type: splitter, callback function: (none) */
-#define  PANEL_MINUS10KDDS1               77      /* control type: command, callback function: CB_OnMinus10k */
-#define  PANEL_MINUS10KDDS4               78      /* control type: command, callback function: CB_OnMinus10k */
-#define  PANEL_MINUS10KDDS3               79      /* control type: command, callback function: CB_OnMinus10k */
-#define  PANEL_MINUS10KDDS2               80      /* control type: command, callback function: CB_OnMinus10k */
-#define  PANEL_PLUS10KDDS4                81      /* control type: command, callback function: CB_OnPlus10k */
-#define  PANEL_PLUS10KDDS3                82      /* control type: command, callback function: CB_OnPlus10k */
-#define  PANEL_PLUS10KDDS1                83      /* control type: command, callback function: CB_OnPlus10k */
-#define  PANEL_PLUS10KDDS2                84      /* control type: command, callback function: CB_OnPlus10k */
-#define  PANEL_TEXTMSG_11                 85      /* control type: textMsg, callback function: (none) */
-#define  PANEL_MATHSTRING5                86      /* control type: textBox, callback function: CB_ChangeMath */
-#define  PANEL_SPLITTER_8                 87      /* control type: splitter, callback function: (none) */
-#define  PANEL_MJD                        88      /* control type: numeric, callback function: (none) */
-#define  PANEL_UTC                        89      /* control type: numeric, callback function: (none) */
-#define  PANEL_TIME                       90      /* control type: string, callback function: (none) */
-#define  PANEL_DATE                       91      /* control type: string, callback function: (none) */
-#define  PANEL_SPLITTER_14                92      /* control type: splitter, callback function: (none) */
-#define  PANEL_SPLITTER_13                93      /* control type: splitter, callback function: (none) */
-#define  PANEL_DDS4                       94      /* control type: numeric, callback function: CB_ChangeDDSOut */
-#define  PANEL_SPLITTER_2                 95      /* control type: splitter, callback function: (none) */
-#define  PANEL_DDS3                       96      /* control type: numeric, callback function: CB_ChangeDDSOut */
-#define  PANEL_N1CALCULUS                 97      /* control type: command, callback function: CB_OnNCalculus */
-#define  PANEL_FINDSIGN3                  98      /* control type: command, callback function: CB_OnFindSign */
-#define  PANEL_SIGN3                      99      /* control type: numeric, callback function: (none) */
-#define  PANEL_FINDSIGN2                  100     /* control type: command, callback function: CB_OnFindSign */
-#define  PANEL_SIGN2                      101     /* control type: numeric, callback function: (none) */
-#define  PANEL_FINDSIGN1                  102     /* control type: command, callback function: CB_OnFindSign */
-#define  PANEL_SIGN1                      103     /* control type: numeric, callback function: (none) */
-#define  PANEL_FIND10K3                   104     /* control type: command, callback function: CB_OnFind275K */
-#define  PANEL_FIND275K2                  105     /* control type: command, callback function: CB_OnFind275K */
-#define  PANEL_RESETSLOPE                 106     /* control type: command, callback function: CB_OnResetSlope */
-#define  PANEL_CHECKBOX_STOPIFAUTODE      107     /* control type: radioButton, callback function: CB_OnStopSlopeCancellingOnUnlocked */
-#define  PANEL_CHECKBOX_RECENTER          108     /* control type: radioButton, callback function: CB_OnReCentering */
-#define  PANEL_CHECKBOX_KEEPSLOPE         109     /* control type: radioButton, callback function: CB_OnCROX */
-#define  PANEL_CHECKBOX_KEEP              110     /* control type: radioButton, callback function: CB_OnCROX */
-#define  PANEL_SLOPE_REFERENCE            111     /* control type: ring, callback function: CB_OnSlopeReference */
-#define  PANEL_ESTIMATE_N3                112     /* control type: command, callback function: CB_OnEstimateN */
-#define  PANEL_INVERT_SLOPE_SIGN          113     /* control type: radioButton, callback function: CB_InvertSlopeSign */
-#define  PANEL_MEASURE_SLOPE              114     /* control type: LED, callback function: CB_MeasureSlope */
-#define  PANEL_SLOPE_MEASURED             115     /* control type: numeric, callback function: (none) */
-#define  PANEL_RESET_DEDRIFT_DDS          116     /* control type: command, callback function: CB_ResetDedriftDDS */
-#define  PANEL_SHOWLOG                    117     /* control type: command, callback function: CB_ShowLog */
+#define  PANEL_DDS2                       20      /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_TEXTMSG                    21      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_2                  22      /* control type: textMsg, callback function: (none) */
+#define  PANEL_SLOPETIME                  23      /* control type: numeric, callback function: CB_ChangeSlopeTime */
+#define  PANEL_DDS1                       24      /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_SPLITTER                   25      /* control type: splitter, callback function: (none) */
+#define  PANEL_CHANGENDIV                 26      /* control type: numeric, callback function: CB_OnChangeNdiv */
+#define  PANEL_N3CHOICE                   27      /* control type: numeric, callback function: CB_ChangeN */
+#define  PANEL_N3CALCULUS                 28      /* control type: command, callback function: CB_OnNCalculus */
+#define  PANEL_N1CHOICE                   29      /* control type: numeric, callback function: CB_ChangeN */
+#define  PANEL_N2CHOICE                   30      /* control type: numeric, callback function: CB_ChangeN */
+#define  PANEL_N2CALCULUS                 31      /* control type: command, callback function: CB_OnNCalculus */
+#define  PANEL_DDS4STEP                   32      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_DDS3STEP                   33      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_DDS2STEP                   34      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_CENTERFREQUENCY            35      /* control type: numeric, callback function: (none) */
+#define  PANEL_SLOPE_APPLIED              36      /* control type: numeric, callback function: CB_SetSlope */
+#define  PANEL_MATH4                      37      /* control type: numeric, callback function: (none) */
+#define  PANEL_MATH5                      38      /* control type: numeric, callback function: (none) */
+#define  PANEL_MATH3                      39      /* control type: numeric, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH5PLOT         40      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH4PLOT         41      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH4ALLAN        42      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_DDS1STEP                   43      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_TEXTMSG_15                 44      /* control type: textMsg, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH5ALLAN        45      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_CHECKBOX_MATH3PLOT         46      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH5SAVE         47      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH4SAVE         48      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH3ALLAN        49      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_MATHSTRING4                50      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_TEXTMSG_17                 51      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATH2                      52      /* control type: numeric, callback function: (none) */
+#define  PANEL_SPLITTER_15                53      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_12                54      /* control type: splitter, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH2PLOT         55      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH3SAVE         56      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH2SAVE         57      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH2ALLAN        58      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_TEXTMSG_7                  59      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING3                60      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_MATH1                      61      /* control type: numeric, callback function: (none) */
+#define  PANEL_SPLITTER_6                 62      /* control type: splitter, callback function: (none) */
+#define  PANEL_TEXTMSG_18                 63      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_6                  64      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_8                  65      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_19                 66      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING1                67      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_TEXTMSG_9                  68      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_10                 69      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING2                70      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_TEXTMSG_16                 71      /* control type: textMsg, callback function: (none) */
+#define  PANEL_SPLITTER_11                72      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_16                73      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_9                 74      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_3                 75      /* control type: splitter, callback function: (none) */
+#define  PANEL_MINUS10KDDS1               76      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_MINUS10KDDS4               77      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_MINUS10KDDS3               78      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_MINUS10KDDS2               79      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_PLUS10KDDS4                80      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_PLUS10KDDS3                81      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_PLUS10KDDS1                82      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_PLUS10KDDS2                83      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_TEXTMSG_11                 84      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING5                85      /* control type: textBox, callback function: CB_ChangeMath */
+#define  PANEL_SPLITTER_8                 86      /* control type: splitter, callback function: (none) */
+#define  PANEL_UTC                        87      /* control type: numeric, callback function: (none) */
+#define  PANEL_TIME                       88      /* control type: string, callback function: (none) */
+#define  PANEL_SPLITTER_14                89      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_13                90      /* control type: splitter, callback function: (none) */
+#define  PANEL_DDS4                       91      /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_SPLITTER_2                 92      /* control type: splitter, callback function: (none) */
+#define  PANEL_DDS3                       93      /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_N1CALCULUS                 94      /* control type: command, callback function: CB_OnNCalculus */
+#define  PANEL_FINDSIGN3                  95      /* control type: command, callback function: CB_OnFindSign */
+#define  PANEL_SIGN3                      96      /* control type: numeric, callback function: (none) */
+#define  PANEL_FINDSIGN2                  97      /* control type: command, callback function: CB_OnFindSign */
+#define  PANEL_SIGN2                      98      /* control type: numeric, callback function: (none) */
+#define  PANEL_FINDSIGN1                  99      /* control type: command, callback function: CB_OnFindSign */
+#define  PANEL_SIGN1                      100     /* control type: numeric, callback function: (none) */
+#define  PANEL_FIND10K3                   101     /* control type: command, callback function: CB_OnFind275K */
+#define  PANEL_FIND275K2                  102     /* control type: command, callback function: CB_OnFind275K */
+#define  PANEL_RESETSLOPE                 103     /* control type: command, callback function: CB_OnResetSlope */
+#define  PANEL_CHECKBOX_STOPIFAUTODE      104     /* control type: radioButton, callback function: CB_OnStopSlopeCancellingOnUnlocked */
+#define  PANEL_CHECKBOX_RECENTER          105     /* control type: radioButton, callback function: CB_OnReCentering */
+#define  PANEL_CHECKBOX_KEEPSLOPE         106     /* control type: radioButton, callback function: CB_OnCROX */
+#define  PANEL_CHECKBOX_KEEP              107     /* control type: radioButton, callback function: CB_OnCROX */
+#define  PANEL_SLOPE_REFERENCE            108     /* control type: ring, callback function: CB_OnSlopeReference */
+#define  PANEL_ESTIMATE_N3                109     /* control type: command, callback function: CB_OnEstimateN */
+#define  PANEL_INVERT_SLOPE_SIGN          110     /* control type: radioButton, callback function: CB_InvertSlopeSign */
+#define  PANEL_MEASURE_SLOPE              111     /* control type: LED, callback function: CB_MeasureSlope */
+#define  PANEL_SLOPE_MEASURED             112     /* control type: numeric, callback function: (none) */
+#define  PANEL_RESET_DEDRIFT_DDS          113     /* control type: command, callback function: CB_ResetDedriftDDS */
+#define  PANEL_SHOWLOG                    114     /* control type: command, callback function: CB_ShowLog */
 
 
      /* Menu Bars, Menus, and Menu Items: */
@@ -192,7 +189,6 @@
 int  CVICALLBACK CB_OnStartNCalculus(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK CB_OnStop(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK CB_OnStopSlopeCancellingOnUnlocked(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
-int  CVICALLBACK CB_OnTimer(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK CB_ResetDedriftDDS(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK CB_SetSlope(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK CB_ShowLog(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);