Scope
FPGAPhotonCounterPage.cpp
1 #include "StdAfx.h"
2 #include "FPGAPhotonCounterPage.h"
3 #include "devices\InputsFPGA.h"
4 
5 namespace scope {
6  namespace gui {
7 
9  : myFPGA(nullptr)
10  , tohostoverflow1_led(&_parameters->diagnosis.ToHostOverflowCh1)
11  , tohostoverflow2_led(&_parameters->diagnosis.ToHostOverflowCh2)
12  , interloopoverflow_led(&_parameters->diagnosis.InterloopOverflow)
13  , interlooptimeout_led(&_parameters->diagnosis.InterloopTimeout)
14  , acquiring_led(&_parameters->diagnosis.Acquiring, SCOPELED_OKONTRUE) {
15 }
16 
17 BOOL CFPGAPhotonCounterPage::OnInitDialog(CWindow wndFocus, LPARAM lInitParam) {
18  tohostoverflow1_led.AttachToDlgItem(GetDlgItem(IDC_TOHOSTOVERFLOW1_BUTTON));
19  tohostoverflow2_led.AttachToDlgItem(GetDlgItem(IDC_TOHOSTOVERFLOW2_BUTTON));
20  interloopoverflow_led.AttachToDlgItem(GetDlgItem(IDC_INTERLOOPOVERFLOW_BUTTON));
21  interlooptimeout_led.AttachToDlgItem(GetDlgItem(IDC_INTERLOOPTIMEOUT1_BUTTON));
22  acquiring_led.AttachToDlgItem(GetDlgItem(IDC_ACQUIRING_BUTTON));
23 
24  counthigh_button.Attach(GetDlgItem(IDC_COUNTHIGH_RADIO));
25  countpulses_button.Attach(GetDlgItem(IDC_COUNTPULSES_RADIO));
26 
27  counthigh_button.SetCheck(BST_CHECKED);
28  countpulses_button.SetCheck(BST_UNCHECKED);
29 
30  return 0;
31 }
32 
33 LRESULT CFPGAPhotonCounterPage::OnCountModeChange(WORD code, WORD id, HWND wnd, BOOL&) {
34  DBOUT(L"COUNTMODECHANGE");
35  if ( id == IDC_COUNTHIGH_RADIO ) {
36  //myFPGA->SetCountMode(true);
37  }
38  if ( id == IDC_COUNTPULSES_RADIO ) {
39  //myFPGA->SetCountMode(false);
40  }
41  return 0;
42 }
43 
44 }}
LRESULT OnCountModeChange(WORD, WORD, HWND, BOOL &)
Handles count mode changes.
bool AttachToDlgItem(HWND hWnd)
Attach the control to a dialog item.
Parameters for pixel acquisition with FPGAPhotonCounter.
Definition: IO.h:246
This is the include file for standard system include files, or project specific include files that ar...
#define DBOUT(s)
A debug output to the debug console.
Definition: helpers.h:153
CFPGAPhotonCounterPage(parameters::InputsFPGAPhotonCounter *const _parameters)
Connect to the FIFOStatus ScopeNumbers.