Qudi
phlib.h
1 /*
2 
3 This file contains the header file of the available function in the dll of the Picoharp300 device.
4 
5 Qudi is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 
10 Qudi is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with Qudi. If not, see <http://www.gnu.org/licenses/>.
17 
18 Copyright (c) the Qudi Developers. See the COPYRIGHT.txt file at the
19 top-level directory of this distribution and at <https://github.com/Ulm-IQO/qudi/>
20 
21 */
22 
23 /*
24 Taken from:
25 http://www.picoquant.com/products/category/tcspc-and-time-tagging-modules/picoharp-300-stand-alone-tcspc-module-with-usb-interface
26 
27 Functions exported by the PicoHarp programming library PHLib
28 */
29 
30 /* Ver. 3.0 December 2013 */
31 
32 #ifndef _WIN32
33 #define _stdcall
34 #endif
35 
36 extern int _stdcall PH_GetLibraryVersion(char* version);
37 extern int _stdcall PH_GetErrorString(char* errstring, int errcode);
38 
39 extern int _stdcall PH_OpenDevice(int devidx, char* serial);
40 extern int _stdcall PH_CloseDevice(int devidx);
41 extern int _stdcall PH_Initialize(int devidx, int mode);
42 
43 //all functions below can only be used after PH_Initialize
44 
45 extern int _stdcall PH_GetHardwareInfo(int devidx, char* model, char* partno, char* version); //new in v 3.0
46 extern int _stdcall PH_GetSerialNumber(int devidx, char* serial);
47 extern int _stdcall PH_GetFeatures(int devidx, int* features); //new in v 3.0
48 extern int _stdcall PH_GetBaseResolution(int devidx, double* resolution, int* binsteps); //changed in v 3.0
49 extern int _stdcall PH_GetHardwareDebugInfo(int devidx, char *debuginfo); //new in v 3.0
50 
51 extern int _stdcall PH_Calibrate(int devidx);
52 extern int _stdcall PH_SetInputCFD(int devidx, int channel, int level, int zc); //changed in v 3.0
53 extern int _stdcall PH_SetSyncDiv(int devidx, int div);
54 extern int _stdcall PH_SetSyncOffset(int devidx, int syncoffset); //new in v 3.0
55 
56 extern int _stdcall PH_SetStopOverflow(int devidx, int stop_ovfl, int stopcount);
57 extern int _stdcall PH_SetBinning(int devidx, int binning);
58 extern int _stdcall PH_SetOffset(int devidx, int offset); //changed in v 3.0
59 extern int _stdcall PH_SetMultistopEnable(int devidx, int enable); //new in v 3.0
60 
61 extern int _stdcall PH_ClearHistMem(int devidx, int block);
62 extern int _stdcall PH_StartMeas(int devidx, int tacq);
63 extern int _stdcall PH_StopMeas(int devidx);
64 extern int _stdcall PH_CTCStatus(int devidx, int* ctcstatus); //changed in v 3.0
65 
66 extern int _stdcall PH_GetHistogram(int devidx, unsigned int* chcount, int block); //changed in v 3.0
67 extern int _stdcall PH_GetResolution(int devidx, double* resolution); //changed in v 3.0
68 extern int _stdcall PH_GetCountRate(int devidx, int channel, int* rate); //changed in v 3.0
69 extern int _stdcall PH_GetFlags(int devidx, int* flags); //changed in v 3.0
70 extern int _stdcall PH_GetElapsedMeasTime(int devidx, double* elapsed); //changed in v 3.0
71 
72 extern int _stdcall PH_GetWarnings(int devidx, int* warnings); //changed in v 3.0
73 extern int _stdcall PH_GetWarningsText(int devidx, char* text, int warnings);
74 
75 //for the Time Tagging modes
76 extern int _stdcall PH_SetMarkerEnable(int devidx, int en0, int en1, int en2, int en3); //new in v 3.0
77 extern int _stdcall PH_SetMarkerEdges(int devidx, int me0, int me1, int me2, int me3); //changed in v 3.0
78 extern int _stdcall PH_SetMarkerHoldoffTime(int devidx, int holdofftime); //new in v 3.0
79 extern int _stdcall PH_ReadFiFo(int devidx, unsigned int* buffer, int count, int* nactual); //changed in v 3.0
80 
81 //for Routing
82 extern int _stdcall PH_GetRouterVersion(int devidx, char* model, char* version);
83 extern int _stdcall PH_GetRoutingChannels(int devidx, int* rtchannels); //changed in v 3.0
84 extern int _stdcall PH_EnableRouting(int devidx, int enable);
85 extern int _stdcall PH_SetRoutingChannelOffset(int devidx, int channel, int offset); //new in v 3.0
86 extern int _stdcall PH_SetPHR800Input(int devidx, int channel, int level, int edge);
87 extern int _stdcall PH_SetPHR800CFD(int devidx, int channel, int level, int zc);
88 
89