1+ #
2+ # Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
3+ #
4+ """
5+ This is a Python module defining the functions from the ps6000aApi.h C header
6+ file for PicoScope 6000 A Series oscilloscopes using the ps6000a driver API
7+ functions.
8+ """
9+
10+ from ctypes import *
11+ from picosdk .library import Library
12+ from picosdk .ctypes_wrapper import C_CALLBACK_FUNCTION_FACTORY
13+ from picosdk .constants import make_enum
14+
15+
16+ class Ps6000alib (Library ):
17+ def __init__ (self ):
18+ super (Ps6000alib , self ).__init__ ("ps6000a" )
19+
20+ ps6000a = Ps6000alib ()
21+
22+ doc = """ PICO_STATUS ps6000aOpenUnit
23+ (
24+ int16_t *handle,
25+ int8_t *serial
26+ PICO_DEVICE_RESOLUTION resolution
27+ ); """
28+ ps6000a .make_symbol ("_OpenUnit" , "ps6000aOpenUnit" , c_uint32 , [c_void_p , c_char_p , c_int32 ], doc )
29+
30+ doc = """ PICO_STATUS ps6000aOpenUnitAsync
31+ (
32+ int16_t *handle,
33+ int8_t *serial,
34+ PICO_DEVICE_RESOLUTION resolution
35+ ); """
36+ ps6000a .make_symbol ("_OpenUnitAsync" , "ps6000aOpenUnitAsync" , c_uint32 , [c_void_p , c_char_p , c_int32 ], doc )
37+
38+ doc = """ PICO_STATUS ps6000aOpenUnitProgress
39+ (
40+ int16_t *handle,
41+ int16_t *progressPercent,
42+ int16_t *complete
43+ ); """
44+ ps6000a .make_symbol ("_OpenUnitProgress" , "ps6000aOpenUnitProgress" , c_uint32 , [c_void_p , c_void_p , c_void_p ], doc )
45+
46+ doc = """ PICO_STATUS ps6000aGetUnitInfo
47+ (
48+ int16_t handle,
49+ int8_t *string,
50+ int16_t stringLength,
51+ int16_t *requiredSize,
52+ PICO_INFO info
53+ ); """
54+ ps6000a .make_symbol ("_GetUnitInfo" , "ps6000aGetUnitInfo" , c_uint32 , [c_int16 , c_char_p , c_int16 , c_void_p , c_int32 ], doc )
55+
56+ doc = """ PICO_STATUS ps6000aCloseUnit
57+ (
58+ int16_t handle
59+ ); """
60+ ps6000a .make_symbol ("_CloseUnit" , "ps6000aCloseUnit" , c_uint32 , [c_int16 ], doc )
0 commit comments