9 #if ( defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || ( defined( __GNUC__ ) && defined( __cplusplus ) )
11 #elif defined( _MSC_VER )
29 #if defined( _WIN32 ) || defined( _WIN64 ) || defined( __WIN32__ ) || defined( __TOS_WIN__ ) || defined( __WINDOWS__ )
30 #ifndef HAVE_WINDOWS_H
31 #define HAVE_WINDOWS_H
58 #define CKN_COUPLING_COUNT 5
77 #define CK_UNKNOWN 0x0000000000000000
79 #define CK_DCV ( 1 << CKB_DCV )
80 #define CK_ACV ( 1 << CKB_ACV )
81 #define CK_DCA ( 1 << CKB_DCA )
82 #define CK_ACA ( 1 << CKB_ACA )
83 #define CK_OHM ( 1 << CKB_OHM )
91 #define CKM_V ( CK_DCV | CK_ACV )
92 #define CKM_A ( CK_DCA | CK_ACA )
93 #define CKM_OHM ( CK_OHM )
102 #define FMN_GENERATORMODE_COUNT 2
109 #define FMB_SIGNALFREQUENCY 0
110 #define FMB_SAMPLEFREQUENCY 1
118 #define FM_UNKNOWN 0x00000000
120 #define FM_SIGNALFREQUENCY ( 1 << FMB_SIGNALFREQUENCY )
121 #define FM_SAMPLEFREQUENCY ( 1 << FMB_SAMPLEFREQUENCY )
130 #define MMN_MEASUREMODE_COUNT 2
146 #define MM_UNKNOWN 0x00000000
148 #define MM_STREAM ( 1 << MMB_STREAM )
149 #define MM_BLOCK ( 1 << MMB_BLOCK )
158 #define STN_SIGNALTYPE_COUNT 6
166 #define STB_TRIANGLE 1
170 #define STB_ARBITRARY 5
178 #define ST_UNKNOWN 0x0000000000000000
180 #define ST_SINE ( 1 << STB_SINE )
181 #define ST_TRIANGLE ( 1 << STB_TRIANGLE )
182 #define ST_SQUARE ( 1 << STB_SQUARE )
183 #define ST_DC ( 1 << STB_DC )
184 #define ST_NOISE ( 1 << STB_NOISE )
185 #define ST_ARBITRARY ( 1 << STB_ARBITRARY )
193 #define STM_AMPLITUDE ( ST_SINE | ST_TRIANGLE | ST_SQUARE | ST_NOISE | ST_ARBITRARY )
194 #define STM_OFFSET ( ST_SINE | ST_TRIANGLE | ST_SQUARE | ST_DC | ST_NOISE | ST_ARBITRARY )
195 #define STM_FREQUENCY ( ST_SINE | ST_TRIANGLE | ST_SQUARE | ST_ARBITRARY )
196 #define STM_PHASE ( ST_SINE | ST_TRIANGLE | ST_SQUARE | ST_ARBITRARY )
197 #define STM_SYMMETRY ( ST_SINE | ST_TRIANGLE | ST_SQUARE )
208 #define TH_ALLPRESAMPLES 0xffffffffffffffff
217 #define TKN_KIND_COUNT 7
225 #define TKB_FALLING 1
226 #define TKB_INWINDOW 2
227 #define TKB_OUTWINDOW 3
229 #define TKB_DROPINWINDOW 5
230 #define TKB_DROPOUTWINDOW 6
238 #define TK_UNKNOWN 0x0000000000000000ULL
240 #define TK_RISING ( 1ULL << TKB_RISING )
241 #define TK_FALLING ( 1ULL << TKB_FALLING )
242 #define TK_INWINDOW ( 1ULL << TKB_INWINDOW )
243 #define TK_OUTWINDOW ( 1ULL << TKB_OUTWINDOW )
244 #define TK_EDGE ( 1ULL << TKB_EDGE )
245 #define TK_DROPINWINDOW ( 1ULL << TKB_DROPINWINDOW )
246 #define TK_DROPOUTWINDOW ( 1ULL << TKB_DROPOUTWINDOW )
254 #define TKM_NONE 0x0000000000000000ULL
255 #define TKM_EDGE ( TK_RISING | TK_FALLING | TK_EDGE )
256 #define TKM_WINDOW ( TK_INWINDOW | TK_OUTWINDOW | TK_DROPINWINDOW | TK_DROPOUTWINDOW )
257 #define TKM_ALL ( ( 1ULL << TKN_KIND_COUNT ) - 1 )
268 #define TO_INFINITY -1
279 #define TS_NONE 0x0000000000000000ULL
281 #define TS_CH1 0x0000000000000001ULL
282 #define TS_CH2 0x0000000000000002ULL
283 #define TS_CH3 0x0000000000000004ULL
284 #define TS_CH4 0x0000000000000008ULL
285 #define TS_CH5 0x0000000000000010ULL
286 #define TS_CH6 0x0000000000000020ULL
287 #define TS_CH7 0x0000000000000040ULL
288 #define TS_CH8 0x0000000000000080ULL
289 #define TS_CH9 0x0000000000000100ULL
290 #define TS_CH10 0x0000000000000200ULL
291 #define TS_CH11 0x0000000000000400ULL
292 #define TS_CH12 0x0000000000000800ULL
293 #define TS_CH13 0x0000000000001000ULL
294 #define TS_CH14 0x0000000000002000ULL
295 #define TS_CH15 0x0000000000004000ULL
296 #define TS_CH16 0x0000000000008000ULL
297 #define TS_CH17 0x0000000000010000ULL
298 #define TS_CH18 0x0000000000020000ULL
299 #define TS_CH19 0x0000000000040000ULL
300 #define TS_CH20 0x0000000000080000ULL
301 #define TS_CH21 0x0000000000100000ULL
302 #define TS_CH22 0x0000000000200000ULL
303 #define TS_CH23 0x0000000000400000ULL
304 #define TS_CH24 0x0000000000800000ULL
305 #define TS_CH25 0x0000000001000000ULL
306 #define TS_CH26 0x0000000002000000ULL
307 #define TS_CH27 0x0000000004000000ULL
308 #define TS_CH28 0x0000000008000000ULL
309 #define TS_CH29 0x0000000010000000ULL
310 #define TS_CH30 0x0000000020000000ULL
311 #define TS_CH31 0x0000000040000000ULL
312 #define TS_CH32 0x0000000080000000ULL
314 #define TS_GENSTOP 0x0400000000000000ULL
315 #define TS_GENNEW 0x0800000000000000ULL
316 #define TS_GENSTART 0x1000000000000000ULL
317 #define TS_EXT2 0x2000000000000000ULL
318 #define TS_EXTANALOG 0x4000000000000000ULL
319 #define TS_EXT 0x8000000000000000ULL
325 #define TSN_CHANNEL_COUNT 32
332 #define TSM_NONE 0x0000000000000000ULL
333 #define TSM_ALL 0xFFFFFFFFFFFFFFFFULL
334 #define TSM_CHANNELS ( ( 1ULL << TSN_CHANNEL_COUNT ) - 1 )
335 #define TSM_NONCHANNELS ( TSM_ALL - TSM_CHANNELS )
336 #define TSM_GENALL ( TS_GENSTART | TS_GENNEW | TS_GENSTOP )
363 #define TPDEVICEHANDLE_INVALID 0
371 #define DEVICETYPE_OSCILLOSCOPE 0x00000001
372 #define DEVICETYPE_GENERATOR 0x00000002
373 #define DEVICETYPE_I2CHOST 0x00000004
385 #define LIBTIEPIESTATUS_SUCCESS 0
386 #define LIBTIEPIESTATUS_VALUE_CLIPPED 1
387 #define LIBTIEPIESTATUS_VALUE_MODIFIED 2
388 #define LIBTIEPIESTATUS_UNSUCCESSFUL -1
389 #define LIBTIEPIESTATUS_NOT_SUPPORTED -2
390 #define LIBTIEPIESTATUS_INVALID_HANDLE -3
391 #define LIBTIEPIESTATUS_INVALID_VALUE -4
392 #define LIBTIEPIESTATUS_INVALID_CHANNEL -5
393 #define LIBTIEPIESTATUS_INVALID_TRIGGER_SOURCE -6
394 #define LIBTIEPIESTATUS_INVALID_DEVICE_TYPE -7
395 #define LIBTIEPIESTATUS_INVALID_DEVICE_INDEX -8
396 #define LIBTIEPIESTATUS_INVALID_DEVICE_ID -9
397 #define LIBTIEPIESTATUS_INVALID_DEVICE_SERIALNUMBER -10
398 #define LIBTIEPIESTATUS_DEVICE_GONE -11
399 #define LIBTIEPIESTATUS_INTERNAL_ADDRESS -12
400 #define LIBTIEPIESTATUS_NOT_CONTROLLABLE -13
408 #define CONNECTORTYPE_UNKNOWN 0x00000000
410 #define CONNECTORTYPE_BNC 0x00000001
411 #define CONNECTORTYPE_BANANA 0x00000002
413 #define CONNECTORTYPE_MASK ( CONNECTORTYPE_BNC | CONNECTORTYPE_BANANA )
421 #define DATARAWTYPE_UNKNOWN 0x00000000
423 #define DATARAWTYPE_INT8 0x00000001
424 #define DATARAWTYPE_INT16 0x00000002
425 #define DATARAWTYPE_INT32 0x00000004
426 #define DATARAWTYPE_INT64 0x00000008
428 #define DATARAWTYPE_UINT8 0x00000010
429 #define DATARAWTYPE_UINT16 0x00000020
430 #define DATARAWTYPE_UINT32 0x00000040
431 #define DATARAWTYPE_UINT64 0x00000080
439 #define IDM_DEVICEID 0x80000000
440 #define IDM_ALL 0xffffffff
463 #define ID_HS3 ( IDM_DEVICEID | ( 1 << IDB_HS3 ) )
464 #define ID_HS4 ( IDM_DEVICEID | ( 1 << IDB_HS4 ) )
465 #define ID_HS4D ( IDM_DEVICEID | ( 1 << IDB_HS4D ) )
466 #define ID_HS805 ( IDM_DEVICEID | ( 1 << IDB_HS805 ) )
467 #define ID_HP3 ( IDM_DEVICEID | ( 1 << IDB_HP3 ) )
468 #define ID_HS5 ( IDM_DEVICEID | ( 1 << IDB_HS5 ) )
469 #define ID_HL0516 ( IDM_DEVICEID | ( 1 << IDB_HL0516 ) )
470 #define ID_PA1 ( IDM_DEVICEID | ( 1 << IDB_PA1 ) )
491 #define TPVERSION_MAJOR( x ) ( x >> 48 )
492 #define TPVERSION_MINOR( x ) ( ( x >> 32 ) & 0xffff )
493 #define TPVERSION_RELEASE( x ) ( ( x >> 16 ) & 0xffff )
494 #define TPVERSION_BUILD( x ) ( x & 0xffff )
496 #define TPDATE_YEAR( x ) ( x >> 16 )
497 #define TPDATE_MONTH( x ) ( ( x >> 8 ) & 0xff )
498 #define TPDATE_DAY( x ) ( x & 0xff )
504 #ifdef HAVE_WINDOWS_H
511 #define WM_LIBTIEPIE ( WM_USER + 1337 )
513 #define WM_LIBTIEPIE_LST_DEVICEADDED ( WM_LIBTIEPIE + 2 )
514 #define WM_LIBTIEPIE_LST_DEVICEREMOVED ( WM_LIBTIEPIE + 3 )
516 #define WM_LIBTIEPIE_DEV_REMOVED ( WM_LIBTIEPIE + 4 )
518 #define WM_LIBTIEPIE_SCP_DATAREADY ( WM_LIBTIEPIE + 0 )
519 #define WM_LIBTIEPIE_SCP_DATAOVERFLOW ( WM_LIBTIEPIE + 1 )
521 #define WM_LIBTIEPIE_GEN_BURSTCOMPLETED ( WM_LIBTIEPIE + 5 )
522 #define WM_LIBTIEPIE_GEN_CONTROLLABLECHANGED ( WM_LIBTIEPIE + 6 )
725 #ifdef HAVE_WINDOWS_H
732 void LstSetEventDeviceAdded(
uint32_t dwDeviceType , HANDLE hEvent );
739 void LstSetEventDeviceRemoved(
uint32_t dwDeviceType , HANDLE hEvent );
746 void LstSetMessageDeviceAdded(
uint32_t dwDeviceType , HWND hWnd );
753 void LstSetMessageDeviceRemoved(
uint32_t dwDeviceType , HWND hWnd );
769 void DevClose( TpDeviceHandle_t hDevice );
913 #ifdef HAVE_WINDOWS_H
920 void DevSetEventRemoved( TpDeviceHandle_t hDevice , HANDLE hEvent );
929 void DevSetMessageRemoved( TpDeviceHandle_t hDevice , HWND hWnd , WPARAM wParam , LPARAM lParam );
1191 uint64_t ScpGetData4Ch( TpDeviceHandle_t hDevice ,
float* pBufferCh1 ,
float* pBufferCh2 ,
float* pBufferCh3 ,
float* pBufferCh4 ,
uint64_t qwStartIndex ,
uint64_t qwSampleCount );
1332 #ifdef HAVE_WINDOWS_H
1340 void ScpSetEventDataReady( TpDeviceHandle_t hDevice , HANDLE hEvent );
1348 void ScpSetEventDataOverflow( TpDeviceHandle_t hDevice , HANDLE hEvent );
1356 void ScpSetMessageDataReady( TpDeviceHandle_t hDevice , HWND hWnd , WPARAM wParam , LPARAM lParam );
1364 void ScpSetMessageDataOverflow( TpDeviceHandle_t hDevice , HWND hWnd , WPARAM wParam , LPARAM lParam );
1380 bool8_t
ScpStart( TpDeviceHandle_t hDevice );
1387 void ScpStop( TpDeviceHandle_t hDevice );
2019 bool8_t
GenSetOutputOn( TpDeviceHandle_t hDevice , bool8_t bOutputOn );
2026 void GenStart( TpDeviceHandle_t hDevice );
2033 void GenStop( TpDeviceHandle_t hDevice );
2162 double GenSetAmplitude( TpDeviceHandle_t hDevice ,
double dAmplitude );
2213 double GenSetFrequency( TpDeviceHandle_t hDevice ,
double dFrequency );
2263 double GenSetOffset( TpDeviceHandle_t hDevice ,
double dOffset );
2286 double GenSetPhase( TpDeviceHandle_t hDevice ,
double dPhase );
2294 double GenVerifyPhase( TpDeviceHandle_t hDevice ,
double dPhase );
2311 double GenSetSymmetry( TpDeviceHandle_t hDevice ,
double dSymmetry );
2343 #ifdef HAVE_WINDOWS_H
2350 void GenSetEventBurstCompleted( TpDeviceHandle_t hDevice , HANDLE hEvent );
2357 void GenSetEventControllableChanged( TpDeviceHandle_t hDevice , HANDLE hEvent );
2366 void GenSetMessageBurstCompleted( TpDeviceHandle_t hDevice , HWND hWnd , WPARAM wParam , LPARAM lParam );
2375 void GenSetMessageControllableChanged( TpDeviceHandle_t hDevice , HWND hWnd , WPARAM wParam , LPARAM lParam );
2405 double GenSetRange( TpDeviceHandle_t hDevice ,
double dRange );
2506 void GenSetData( TpDeviceHandle_t hDevice ,
float* pBuffer ,
uint64_t qwSampleCount );
2524 bool8_t
I2CRead( TpDeviceHandle_t hDevice ,
uint16_t wAddress ,
void* pBuffer ,
uint32_t dwSize , bool8_t bStop );
2528 bool8_t
I2CWrite( TpDeviceHandle_t hDevice ,
uint16_t wAddress ,
void* pBuffer ,
uint32_t dwSize , bool8_t bStop );
2536 double I2CSetSpeed( TpDeviceHandle_t hDevice ,
double dSpeed );
2537 double I2CVerifySpeed( TpDeviceHandle_t hDevice ,
double dSpeed );