1+ #
2+ # Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
3+ #
4+ """
5+ This is a Python module defining the structures from the PicoDeviceStructs.h C header
6+ file for use with PicoScope 6000 A Series oscilloscopes using the ps6000a driver API
7+ functions.
8+ """
9+
10+ from ctypes import *
11+
12+ class PicoStructlib (Library ):
13+ def __init__ (self ):
14+ super (PicoStructlib , self ).__init__ ("PicoDeviceStructs" )
15+
16+
17+ picoStruct = PicoStructlib ()
18+
19+ class PICO_TRIGGER_INFO (Structure ):
20+ _pack_ = 1
21+ _fields_ = [("status" , c_uint32 ),
22+ ("segmentIndex" , c_uint64 ),
23+ ("triggerIndex" , c_uint64 ),
24+ ("triggerTime" , c_double ),
25+ ("timeUnits" , c_uint32 ),
26+ ("missedTriggers" , c_uint64 ),
27+ ("timeStampCounter" , c_uint64 )]
28+
29+ picoStruct .PICO_TRIGGER_INFO = PICO_TRIGGER_INFO
30+
31+ class PICO_TRIGGER_CHANNEL_PROPERTIES (Structure ):
32+ _pack_ = 1
33+ _fields_ = [("thresholdUpper" , c_int16 ),
34+ ("thresholdUpperHysteresis" , c_uint16 ),
35+ ("thresholdLower" , c_int16 ),
36+ ("thresholdLowerHysteresis" , c_uint16 ),
37+ ("channel" , c_uint32 )]
0 commit comments