@@ -19,7 +19,41 @@ def __init__(self):
1919
2020ps5000 = Ps5000lib ()
2121
22-
22+ ps5000 .PS5000_CHANNEL = make_enum ([
23+ "PS5000_CHANNEL_A" ,
24+ "PS5000_CHANNEL_B" ,
25+ "PS5000_CHANNEL_C" ,
26+ "PS5000_CHANNEL_D" ,
27+ ("PS5000_MAX_CHANNELS" , "PS5000_EXTERNAL" )
28+ "PS5000_TRIGGER_AUX" ,
29+ "PS5000_MAX_TRIGGER_SOURCES" ,
30+ ])
31+
32+ ps5000 .PS5000_RANGE = make_enum ([
33+ "PS5000_10MV" ,
34+ "PS5000_20MV" ,
35+ "PS5000_50MV" ,
36+ "PS5000_100MV" ,
37+ "PS5000_200MV" ,
38+ "PS5000_1V" ,
39+ "PS5000_2V" ,
40+ "PS5000_5V" ,
41+ "PS5000_10V" ,
42+ "PS5000_20V" ,
43+ "PS5000_50V" ,
44+ "PS5000_MAX_RANGES" ,
45+ ])
46+
47+ ps5000 .PS5000_TIME_UNITS = make_enum ([
48+ "PS5000_FS" ,
49+ "PS5000_PS" ,
50+ "PS5000_NS" ,
51+ "PS5000_US" ,
52+ "PS5000_MS" ,
53+ "PS5000_S" ,
54+ "PS5000_MAX_TIME_UNITS" ,
55+ ])
56+
2357
2458class PWQ_CONDITIONS (Structure ):
2559 _pack = 1
@@ -371,7 +405,9 @@ class TRIGGER_CHANNEL_PROPERTIES (Structure):
371405 SIGGEN_TRIG_SOURCE triggerSource,
372406 short extInThreshold
373407 ); """
374- ps5000 .make_symbol ("_SetSigGenArbitary" , "ps5000SetSigGenArbitary" , c_uint32 , [c_int16 , c_int32 , c_uint32 , c_uint32 , c_uint32 , c_uint32 , c_uint32 , c_void_p , c_int32 , c_int32 , c_int16 , c_int32 , c_uint32 , c_uint32 , c_int32 , c_int32 , c_int16 ], doc )
408+ ps5000 .make_symbol ("_SetSigGenArbitary" , "ps5000SetSigGenArbitary" , c_uint32 ,
409+ [c_int16 , c_int32 , c_uint32 , c_uint32 , c_uint32 , c_uint32 , c_uint32 , c_void_p ,
410+ c_int32 , c_int32 , c_int16 , c_int32 , c_uint32 , c_uint32 , c_int32 , c_int32 , c_int16 ], doc )
375411
376412doc = """ PICO_STATUS ps5000SetSigGenBuiltIn
377413 (
@@ -391,7 +427,8 @@ class TRIGGER_CHANNEL_PROPERTIES (Structure):
391427 SIGGEN_TRIG_SOURCE triggerSource,
392428 short extInThreshold
393429 ); """
394- ps5000 .make_symbol ("_SetSigGenBuiltIn" , "ps5000SetSigGenBuiltIn" , c_uint32 , [c_int16 , c_int32 , c_uint32 , c_int16 , c_int64 , c_int64 , c_int64 , c_int64 , c_int64 , c_int32 , c_int16 , c_uint32 , c_uint32 , c_int32 , c_int32 , c_int16 ], doc )
430+ ps5000 .make_symbol ("_SetSigGenBuiltIn" , "ps5000SetSigGenBuiltIn" , c_uint32 ,
431+ [c_int16 , c_int32 , c_uint32 , c_int16 , c_int64 , c_int64 , c_int64 , c_int64 , c_int64 , c_int32 , c_int16 , c_uint32 , c_uint32 , c_int32 , c_int32 , c_int16 ], doc )
395432
396433doc = """ PICO_STATUS ps5000SetSimpleTrigger
397434 (
@@ -453,4 +490,62 @@ class TRIGGER_CHANNEL_PROPERTIES (Structure):
453490 (
454491 short handle
455492 ); """
456- ps5000 .make_symbol ("_Stop" , "ps5000Stop" , c_uint32 , [c_int16 ], doc )
493+ ps5000 .make_symbol ("_Stop" , "ps5000Stop" , c_uint32 , [c_int16 ], doc )
494+
495+ doc = """ void ps5000BlockReady
496+ (
497+ short handle,
498+ PICO_STATUS status,
499+ void *pParameter
500+ ); """
501+
502+ ps5000 .BlockReadyType = C_CALLBACK_FUNCTION_FACTORY (None ,
503+ c_int16 ,
504+ c_uint32 ,
505+ c_void_p )
506+
507+ ps5000 .BlockReadyType .__doc__ = doc
508+
509+ doc = """ void (CALLBACK *ps5000DataReady)
510+ (
511+ short handle,
512+ long noOfSamples,
513+ short overflow,
514+ unsigned long triggerAt,
515+ short triggered,
516+ void *pParameter
517+ ); """
518+
519+ ps5000 .DataReadyType = C_CALLBACK_FUNCTION_FACTORY (None ,
520+ c_int16 ,
521+ c_int32 ,
522+ c_int16 ,
523+ c_uint32 ,
524+ c_int16 ,
525+ c_void_p )
526+
527+ ps5000 .DataReadyType .__doc__ = doc
528+
529+ doc = """ void (CALLBACK *ps5000StreamingReady)
530+ (
531+ short handle,
532+ long noOfSamples,
533+ unsigned long startIndex,
534+ short overflow,
535+ unsigned long triggerAt,
536+ short triggered,
537+ short autoStop,
538+ void *pParameter
539+ ); """
540+
541+ ps5000 .StreamingReadyType = C_CALLBACK_FUNCTION_FACTORY (None ,
542+ c_int16 ,
543+ c_int32 ,
544+ c_uint32 ,
545+ c_int16 ,
546+ c_uint32 ,
547+ c_int16 ,
548+ c_int16 ,
549+ c_void_p )
550+
551+ ps5000 .StreamingReadyType .__doc__ = doc
0 commit comments