pico_sys_dynamic/
ps5000.rs

1pub const PS5000_MAX_OVERSAMPLE_8BIT: u32 = 256;
2pub const PS5000_MAX_VALUE: u32 = 32512;
3pub const PS5000_MIN_VALUE: i32 = -32512;
4pub const PS5000_LOST_DATA: i32 = -32768;
5pub const PS5000_EXT_MAX_VALUE: u32 = 32767;
6pub const PS5000_EXT_MIN_VALUE: i32 = -32767;
7pub const MAX_PULSE_WIDTH_QUALIFIER_COUNT: u32 = 16777215;
8pub const MAX_DELAY_COUNT: u32 = 8388607;
9pub const MAX_SIG_GEN_BUFFER_SIZE: u32 = 8192;
10pub const MIN_SIG_GEN_BUFFER_SIZE: u32 = 10;
11pub const MIN_DWELL_COUNT: u32 = 10;
12pub const MAX_SWEEPS_SHOTS: u32 = 1073741823;
13pub const PS5000_SINE_MAX_FREQUENCY: f64 = 20000000.0;
14pub const PS5000_SQUARE_MAX_FREQUENCY: f64 = 20000000.0;
15pub const PS5000_TRIANGLE_MAX_FREQUENCY: f64 = 20000000.0;
16pub const PS5000_SINC_MAX_FREQUENCY: f64 = 20000000.0;
17pub const PS5000_RAMP_MAX_FREQUENCY: f64 = 20000000.0;
18pub const PS5000_HALF_SINE_MAX_FREQUENCY: f64 = 20000000.0;
19pub const PS5000_GAUSSIAN_MAX_FREQUENCY: f64 = 20000000.0;
20pub const PS5000_MIN_FREQUENCY: f64 = 0.03;
21
22pub type PICO_INFO = u32;
23pub type PICO_STATUS = u32;
24pub const enPicoStringValue_PICO_SV_MEMORY: enPicoStringValue = 0;
25pub const enPicoStringValue_PICO_SV_MEMORY_NO_OF_SEGMENTS: enPicoStringValue = 1;
26pub const enPicoStringValue_PICO_SV_MEMORY_MAX_SAMPLES: enPicoStringValue = 2;
27pub const enPicoStringValue_PICO_SV_NO_OF_CHANNELS: enPicoStringValue = 3;
28pub const enPicoStringValue_PICO_SV_ARRAY_OF_CHANNELS: enPicoStringValue = 4;
29pub const enPicoStringValue_PICO_SV_CHANNEL: enPicoStringValue = 5;
30pub const enPicoStringValue_PICO_SV_CHANNEL_NAME: enPicoStringValue = 6;
31pub const enPicoStringValue_PICO_SV_CHANNEL_RANGE: enPicoStringValue = 7;
32pub const enPicoStringValue_PICO_SV_CHANNEL_COUPLING: enPicoStringValue = 8;
33pub const enPicoStringValue_PICO_SV_CHANNEL_ENABLED: enPicoStringValue = 9;
34pub const enPicoStringValue_PICO_SV_CHANNEL_ANALOGUE_OFFSET: enPicoStringValue = 10;
35pub const enPicoStringValue_PICO_SV_CHANNEL_FILTER: enPicoStringValue = 11;
36pub const enPicoStringValue_PICO_SV_TRIGGER: enPicoStringValue = 12;
37pub const enPicoStringValue_PICO_SV_TRIGGER_AUXIO_OUTPUT_ENABLED: enPicoStringValue = 13;
38pub const enPicoStringValue_PICO_SV_TRIGGER_AUTO_TRIGGER_MICROSECONDS: enPicoStringValue = 14;
39pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES: enPicoStringValue = 15;
40pub const enPicoStringValue_PICO_SV_NO_OF_TRIGGER_PROPERTIES: enPicoStringValue = 16;
41pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_CHANNEL: enPicoStringValue = 17;
42pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_UPPER: enPicoStringValue = 18;
43pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_UPPER_HYSTERESIS:
44    enPicoStringValue = 19;
45pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_LOWER: enPicoStringValue = 20;
46pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_LOWER_HYSTERESIS:
47    enPicoStringValue = 21;
48pub const enPicoStringValue_PICO_SV_TRIGGER_PROPERTIES_THRESHOLD_MODE: enPicoStringValue = 22;
49pub const enPicoStringValue_PICO_SV_TRIGGER_ARRAY_OF_BLOCK_CONDITIONS: enPicoStringValue = 23;
50pub const enPicoStringValue_PICO_SV_TRIGGER_NO_OF_BLOCK_CONDITIONS: enPicoStringValue = 24;
51pub const enPicoStringValue_PICO_SV_TRIGGER_CONDITIONS: enPicoStringValue = 25;
52pub const enPicoStringValue_PICO_SV_TRIGGER_NO_OF_CONDITIONS: enPicoStringValue = 26;
53pub const enPicoStringValue_PICO_SV_TRIGGER_CONDITION_SOURCE: enPicoStringValue = 27;
54pub const enPicoStringValue_PICO_SV_TRIGGER_CONDITION_STATE: enPicoStringValue = 28;
55pub const enPicoStringValue_PICO_SV_TRIGGER_DIRECTION: enPicoStringValue = 29;
56pub const enPicoStringValue_PICO_SV_TRIGGER_NO_OF_DIRECTIONS: enPicoStringValue = 30;
57pub const enPicoStringValue_PICO_SV_TRIGGER_DIRECTION_CHANNEL: enPicoStringValue = 31;
58pub const enPicoStringValue_PICO_SV_TRIGGER_DIRECTION_DIRECTION: enPicoStringValue = 32;
59pub const enPicoStringValue_PICO_SV_TRIGGER_DELAY: enPicoStringValue = 33;
60pub const enPicoStringValue_PICO_SV_TRIGGER_DELAY_MS: enPicoStringValue = 34;
61pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER: enPicoStringValue = 35;
62pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_ENABLED: enPicoStringValue = 36;
63pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_CHANNEL: enPicoStringValue = 37;
64pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_RANGE: enPicoStringValue = 38;
65pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_TRESHOLDMAJOR: enPicoStringValue = 39;
66pub const enPicoStringValue_PICO_SV_FREQUENCY_COUNTER_TRESHOLDMINOR: enPicoStringValue = 40;
67pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES: enPicoStringValue = 41;
68pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_DIRECTION: enPicoStringValue = 42;
69pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_LOWER: enPicoStringValue = 43;
70pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_UPPER: enPicoStringValue = 44;
71pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_PROPERTIES_TYPE: enPicoStringValue = 45;
72pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_ARRAY_OF_BLOCK_CONDITIONS: enPicoStringValue = 46;
73pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_NO_OF_BLOCK_CONDITIONS: enPicoStringValue = 47;
74pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_CONDITIONS: enPicoStringValue = 48;
75pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_NO_OF_CONDITIONS: enPicoStringValue = 49;
76pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_CONDITIONS_SOURCE: enPicoStringValue = 50;
77pub const enPicoStringValue_PICO_SV_PULSE_WIDTH_CONDITIONS_STATE: enPicoStringValue = 51;
78pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES: enPicoStringValue = 52;
79pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_PRE_TRIGGER_SAMPLES: enPicoStringValue = 53;
80pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_POST_TRIGGER_SAMPLES: enPicoStringValue = 54;
81pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_TIMEBASE: enPicoStringValue = 55;
82pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_NO_OF_CAPTURES: enPicoStringValue = 56;
83pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_RESOLUTION: enPicoStringValue = 57;
84pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED: enPicoStringValue = 58;
85pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_DOWN_SAMPLE_RATIO:
86    enPicoStringValue = 59;
87pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_DOWN_SAMPLE_RATIO_MODE:
88    enPicoStringValue = 60;
89pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_REQUERSTED_NO_OF_SAMPLES:
90    enPicoStringValue = 61;
91pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_SEGMENT_INDEX_FROM:
92    enPicoStringValue = 62;
93pub const enPicoStringValue_PICO_SV_SAMPLE_PROPERTIES_OVERLAPPED_SEGMENT_INDEX_TO:
94    enPicoStringValue = 63;
95pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR: enPicoStringValue = 64;
96pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN: enPicoStringValue = 65;
97pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_WAVE_TYPE: enPicoStringValue = 66;
98pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_START_FREQUENCY: enPicoStringValue =
99    67;
100pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_STOP_FREQUENCY: enPicoStringValue =
101    68;
102pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_INCREMENT: enPicoStringValue = 69;
103pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_BUILT_IN_DWELL_TIME: enPicoStringValue = 70;
104pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG: enPicoStringValue = 71;
105pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_START_DELTA_PHASE: enPicoStringValue = 72;
106pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_STOP_DELTA_PHASE: enPicoStringValue = 73;
107pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_DELTA_PHASE_INCREMENT: enPicoStringValue =
108    74;
109pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_DWELL_COUNT: enPicoStringValue = 75;
110pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_INDEX_MODE: enPicoStringValue = 76;
111pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_AWG_WAVEFORM_SIZE: enPicoStringValue = 77;
112pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_ARRAY_OF_AWG_WAVEFORM_VALUES:
113    enPicoStringValue = 78;
114pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_OFFSET_VOLTAGE: enPicoStringValue = 79;
115pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_PK_TO_PK: enPicoStringValue = 80;
116pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_OPERATION: enPicoStringValue = 81;
117pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_SHOTS: enPicoStringValue = 82;
118pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_SWEEPS: enPicoStringValue = 83;
119pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_SWEEP_TYPE: enPicoStringValue = 84;
120pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_TRIGGER_TYPE: enPicoStringValue = 85;
121pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_TRIGGER_SOURCE: enPicoStringValue = 86;
122pub const enPicoStringValue_PICO_SV_SIGNAL_GENERATOR_EXT_IN_THRESHOLD: enPicoStringValue = 87;
123pub const enPicoStringValue_PICO_SV_ETS: enPicoStringValue = 88;
124pub const enPicoStringValue_PICO_SV_ETS_STATE: enPicoStringValue = 89;
125pub const enPicoStringValue_PICO_SV_ETS_CYCLE: enPicoStringValue = 90;
126pub const enPicoStringValue_PICO_SV_ETS_INTERLEAVE: enPicoStringValue = 91;
127pub const enPicoStringValue_PICO_SV_ETS_SAMPLE_TIME_PICOSECONDS: enPicoStringValue = 92;
128pub type enPicoStringValue = ::std::os::raw::c_uint;
129pub use self::enPicoStringValue as PICO_STRING_VALUE;
130pub const enPS5000Channel_PS5000_CHANNEL_A: enPS5000Channel = 0;
131pub const enPS5000Channel_PS5000_CHANNEL_B: enPS5000Channel = 1;
132pub const enPS5000Channel_PS5000_CHANNEL_C: enPS5000Channel = 2;
133pub const enPS5000Channel_PS5000_CHANNEL_D: enPS5000Channel = 3;
134pub const enPS5000Channel_PS5000_EXTERNAL: enPS5000Channel = 4;
135pub const enPS5000Channel_PS5000_MAX_CHANNELS: enPS5000Channel = 4;
136pub const enPS5000Channel_PS5000_TRIGGER_AUX: enPS5000Channel = 5;
137pub const enPS5000Channel_PS5000_MAX_TRIGGER_SOURCES: enPS5000Channel = 6;
138pub type enPS5000Channel = ::std::os::raw::c_uint;
139pub use self::enPS5000Channel as PS5000_CHANNEL;
140pub const enChannelBufferIndex_PS5000_CHANNEL_A_MAX: enChannelBufferIndex = 0;
141pub const enChannelBufferIndex_PS5000_CHANNEL_A_MIN: enChannelBufferIndex = 1;
142pub const enChannelBufferIndex_PS5000_CHANNEL_B_MAX: enChannelBufferIndex = 2;
143pub const enChannelBufferIndex_PS5000_CHANNEL_B_MIN: enChannelBufferIndex = 3;
144pub const enChannelBufferIndex_PS5000_CHANNEL_C_MAX: enChannelBufferIndex = 4;
145pub const enChannelBufferIndex_PS5000_CHANNEL_C_MIN: enChannelBufferIndex = 5;
146pub const enChannelBufferIndex_PS5000_CHANNEL_D_MAX: enChannelBufferIndex = 6;
147pub const enChannelBufferIndex_PS5000_CHANNEL_D_MIN: enChannelBufferIndex = 7;
148pub const enChannelBufferIndex_PS5000_MAX_CHANNEL_BUFFERS: enChannelBufferIndex = 8;
149pub type enChannelBufferIndex = ::std::os::raw::c_uint;
150pub use self::enChannelBufferIndex as PS5000_CHANNEL_BUFFER_INDEX;
151pub const enPS5000Range_PS5000_10MV: enPS5000Range = 0;
152pub const enPS5000Range_PS5000_20MV: enPS5000Range = 1;
153pub const enPS5000Range_PS5000_50MV: enPS5000Range = 2;
154pub const enPS5000Range_PS5000_100MV: enPS5000Range = 3;
155pub const enPS5000Range_PS5000_200MV: enPS5000Range = 4;
156pub const enPS5000Range_PS5000_500MV: enPS5000Range = 5;
157pub const enPS5000Range_PS5000_1V: enPS5000Range = 6;
158pub const enPS5000Range_PS5000_2V: enPS5000Range = 7;
159pub const enPS5000Range_PS5000_5V: enPS5000Range = 8;
160pub const enPS5000Range_PS5000_10V: enPS5000Range = 9;
161pub const enPS5000Range_PS5000_20V: enPS5000Range = 10;
162pub const enPS5000Range_PS5000_50V: enPS5000Range = 11;
163pub const enPS5000Range_PS5000_MAX_RANGES: enPS5000Range = 12;
164pub type enPS5000Range = ::std::os::raw::c_uint;
165pub use self::enPS5000Range as PS5000_RANGE;
166pub const enPS5000EtsMode_PS5000_ETS_OFF: enPS5000EtsMode = 0;
167pub const enPS5000EtsMode_PS5000_ETS_FAST: enPS5000EtsMode = 1;
168pub const enPS5000EtsMode_PS5000_ETS_SLOW: enPS5000EtsMode = 2;
169pub const enPS5000EtsMode_PS5000_ETS_MODES_MAX: enPS5000EtsMode = 3;
170pub type enPS5000EtsMode = ::std::os::raw::c_uint;
171pub use self::enPS5000EtsMode as PS5000_ETS_MODE;
172pub const enPS5000TimeUnits_PS5000_FS: enPS5000TimeUnits = 0;
173pub const enPS5000TimeUnits_PS5000_PS: enPS5000TimeUnits = 1;
174pub const enPS5000TimeUnits_PS5000_NS: enPS5000TimeUnits = 2;
175pub const enPS5000TimeUnits_PS5000_US: enPS5000TimeUnits = 3;
176pub const enPS5000TimeUnits_PS5000_MS: enPS5000TimeUnits = 4;
177pub const enPS5000TimeUnits_PS5000_S: enPS5000TimeUnits = 5;
178pub const enPS5000TimeUnits_PS5000_MAX_TIME_UNITS: enPS5000TimeUnits = 6;
179pub type enPS5000TimeUnits = ::std::os::raw::c_uint;
180pub use self::enPS5000TimeUnits as PS5000_TIME_UNITS;
181pub const enSweepType_UP: enSweepType = 0;
182pub const enSweepType_DOWN: enSweepType = 1;
183pub const enSweepType_UPDOWN: enSweepType = 2;
184pub const enSweepType_DOWNUP: enSweepType = 3;
185pub const enSweepType_MAX_SWEEP_TYPES: enSweepType = 4;
186pub type enSweepType = ::std::os::raw::c_uint;
187pub use self::enSweepType as SWEEP_TYPE;
188pub const enWaveType_PS5000_SINE: enWaveType = 0;
189pub const enWaveType_PS5000_SQUARE: enWaveType = 1;
190pub const enWaveType_PS5000_TRIANGLE: enWaveType = 2;
191pub const enWaveType_PS5000_RAMP_UP: enWaveType = 3;
192pub const enWaveType_PS5000_RAMP_DOWN: enWaveType = 4;
193pub const enWaveType_PS5000_SINC: enWaveType = 5;
194pub const enWaveType_PS5000_GAUSSIAN: enWaveType = 6;
195pub const enWaveType_PS5000_HALF_SINE: enWaveType = 7;
196pub const enWaveType_PS5000_DC_VOLTAGE: enWaveType = 8;
197pub const enWaveType_PS5000_WHITE_NOISE: enWaveType = 9;
198pub const enWaveType_MAX_WAVE_TYPES: enWaveType = 10;
199pub type enWaveType = ::std::os::raw::c_uint;
200pub use self::enWaveType as WAVE_TYPE;
201pub const enSigGenTrigType_SIGGEN_RISING: enSigGenTrigType = 0;
202pub const enSigGenTrigType_SIGGEN_FALLING: enSigGenTrigType = 1;
203pub const enSigGenTrigType_SIGGEN_GATE_HIGH: enSigGenTrigType = 2;
204pub const enSigGenTrigType_SIGGEN_GATE_LOW: enSigGenTrigType = 3;
205pub type enSigGenTrigType = ::std::os::raw::c_uint;
206pub use self::enSigGenTrigType as SIGGEN_TRIG_TYPE;
207pub const enSigGenTrigSource_SIGGEN_NONE: enSigGenTrigSource = 0;
208pub const enSigGenTrigSource_SIGGEN_SCOPE_TRIG: enSigGenTrigSource = 1;
209pub const enSigGenTrigSource_SIGGEN_AUX_IN: enSigGenTrigSource = 2;
210pub const enSigGenTrigSource_SIGGEN_EXT_IN: enSigGenTrigSource = 3;
211pub const enSigGenTrigSource_SIGGEN_SOFT_TRIG: enSigGenTrigSource = 4;
212pub type enSigGenTrigSource = ::std::os::raw::c_uint;
213pub use self::enSigGenTrigSource as SIGGEN_TRIG_SOURCE;
214pub const enIndexMode_SINGLE: enIndexMode = 0;
215pub const enIndexMode_DUAL: enIndexMode = 1;
216pub const enIndexMode_QUAD: enIndexMode = 2;
217pub const enIndexMode_MAX_INDEX_MODES: enIndexMode = 3;
218pub type enIndexMode = ::std::os::raw::c_uint;
219pub use self::enIndexMode as INDEX_MODE;
220pub const enThresholdMode_LEVEL: enThresholdMode = 0;
221pub const enThresholdMode_WINDOW: enThresholdMode = 1;
222pub type enThresholdMode = ::std::os::raw::c_uint;
223pub use self::enThresholdMode as THRESHOLD_MODE;
224pub const enThresholdDirection_ABOVE: enThresholdDirection = 0;
225pub const enThresholdDirection_BELOW: enThresholdDirection = 1;
226pub const enThresholdDirection_RISING: enThresholdDirection = 2;
227pub const enThresholdDirection_FALLING: enThresholdDirection = 3;
228pub const enThresholdDirection_RISING_OR_FALLING: enThresholdDirection = 4;
229pub const enThresholdDirection_INSIDE: enThresholdDirection = 0;
230pub const enThresholdDirection_OUTSIDE: enThresholdDirection = 1;
231pub const enThresholdDirection_ENTER: enThresholdDirection = 2;
232pub const enThresholdDirection_EXIT: enThresholdDirection = 3;
233pub const enThresholdDirection_ENTER_OR_EXIT: enThresholdDirection = 4;
234pub const enThresholdDirection_NONE: enThresholdDirection = 2;
235pub type enThresholdDirection = ::std::os::raw::c_uint;
236pub use self::enThresholdDirection as THRESHOLD_DIRECTION;
237pub const enTriggerState_CONDITION_DONT_CARE: enTriggerState = 0;
238pub const enTriggerState_CONDITION_TRUE: enTriggerState = 1;
239pub const enTriggerState_CONDITION_FALSE: enTriggerState = 2;
240pub const enTriggerState_CONDITION_MAX: enTriggerState = 3;
241pub type enTriggerState = ::std::os::raw::c_uint;
242pub use self::enTriggerState as TRIGGER_STATE;
243#[repr(C, packed)]
244#[derive(Debug, Copy, Clone)]
245pub struct tTriggerConditions {
246    pub channelA: TRIGGER_STATE,
247    pub channelB: TRIGGER_STATE,
248    pub channelC: TRIGGER_STATE,
249    pub channelD: TRIGGER_STATE,
250    pub external: TRIGGER_STATE,
251    pub aux: TRIGGER_STATE,
252    pub pulseWidthQualifier: TRIGGER_STATE,
253}
254
255pub type TRIGGER_CONDITIONS = tTriggerConditions;
256#[repr(C, packed)]
257#[derive(Debug, Copy, Clone)]
258pub struct tPwqConditions {
259    pub channelA: TRIGGER_STATE,
260    pub channelB: TRIGGER_STATE,
261    pub channelC: TRIGGER_STATE,
262    pub channelD: TRIGGER_STATE,
263    pub external: TRIGGER_STATE,
264    pub aux: TRIGGER_STATE,
265}
266
267pub type PWQ_CONDITIONS = tPwqConditions;
268#[repr(C, packed)]
269#[derive(Debug, Copy, Clone)]
270pub struct tTriggerChannelProperties {
271    pub thresholdMajor: i16,
272    pub thresholdMinor: i16,
273    pub hysteresis: u16,
274    pub channel: PS5000_CHANNEL,
275    pub thresholdMode: THRESHOLD_MODE,
276}
277
278pub type TRIGGER_CHANNEL_PROPERTIES = tTriggerChannelProperties;
279pub const enRatioMode_RATIO_MODE_NONE: enRatioMode = 0;
280pub const enRatioMode_RATIO_MODE_AGGREGATE: enRatioMode = 1;
281pub const enRatioMode_RATIO_MODE_DECIMATE: enRatioMode = 2;
282pub const enRatioMode_RATIO_MODE_AVERAGE: enRatioMode = 4;
283pub const enRatioMode_RATIO_MODE_DISTRIBUTION: enRatioMode = 8;
284pub type enRatioMode = ::std::os::raw::c_uint;
285pub use self::enRatioMode as RATIO_MODE;
286pub const enPulseWidthType_PW_TYPE_NONE: enPulseWidthType = 0;
287pub const enPulseWidthType_PW_TYPE_LESS_THAN: enPulseWidthType = 1;
288pub const enPulseWidthType_PW_TYPE_GREATER_THAN: enPulseWidthType = 2;
289pub const enPulseWidthType_PW_TYPE_IN_RANGE: enPulseWidthType = 3;
290pub const enPulseWidthType_PW_TYPE_OUT_OF_RANGE: enPulseWidthType = 4;
291pub type enPulseWidthType = ::std::os::raw::c_uint;
292pub use self::enPulseWidthType as PULSE_WIDTH_TYPE;
293pub const enPS5000ChannelInfo_CI_RANGES: enPS5000ChannelInfo = 0;
294pub type enPS5000ChannelInfo = ::std::os::raw::c_uint;
295pub use self::enPS5000ChannelInfo as PS5000_CHANNEL_INFO;
296pub type ps5000BlockReady = ::std::option::Option<
297    extern "C" fn(handle: i16, status: PICO_STATUS, pParameter: *mut ::std::os::raw::c_void),
298>;
299pub type ps5000StreamingReady = ::std::option::Option<
300    extern "C" fn(
301        handle: i16,
302        noOfSamples: i32,
303        startIndex: u32,
304        overflow: i16,
305        triggerAt: u32,
306        triggered: i16,
307        autoStop: i16,
308        pParameter: *mut ::std::os::raw::c_void,
309    ),
310>;
311pub type ps5000DataReady = ::std::option::Option<
312    extern "C" fn(
313        handle: i16,
314        noOfSamples: i32,
315        overflow: i16,
316        triggerAt: u32,
317        triggered: i16,
318        pParameter: *mut ::std::os::raw::c_void,
319    ),
320>;
321
322extern crate libloading;
323pub struct PS5000Loader {
324    __library: ::libloading::Library,
325    pub ps5000ApplyFix: Result<unsafe extern "C" fn(u32, u16), ::libloading::Error>,
326    pub ps5000OpenUnit:
327        Result<unsafe extern "C" fn(handle: *mut i16) -> PICO_STATUS, ::libloading::Error>,
328    pub ps5000OpenUnitAsync:
329        Result<unsafe extern "C" fn(status: *mut i16) -> PICO_STATUS, ::libloading::Error>,
330    pub ps5000OpenUnitProgress: Result<
331        unsafe extern "C" fn(
332            handle: *mut i16,
333            progressPercent: *mut i16,
334            complete: *mut i16,
335        ) -> PICO_STATUS,
336        ::libloading::Error,
337    >,
338    pub ps5000GetUnitInfo: Result<
339        unsafe extern "C" fn(
340            handle: i16,
341            string: *mut i8,
342            stringLength: i16,
343            requiredSize: *mut i16,
344            info: PICO_INFO,
345        ) -> PICO_STATUS,
346        ::libloading::Error,
347    >,
348    pub ps5000FlashLed:
349        Result<unsafe extern "C" fn(handle: i16, start: i16) -> PICO_STATUS, ::libloading::Error>,
350    pub ps5000IsLedFlashing: Result<
351        unsafe extern "C" fn(handle: i16, status: *mut i16) -> PICO_STATUS,
352        ::libloading::Error,
353    >,
354    pub ps5000CloseUnit:
355        Result<unsafe extern "C" fn(handle: i16) -> PICO_STATUS, ::libloading::Error>,
356    pub ps5000MemorySegments: Result<
357        unsafe extern "C" fn(handle: i16, nSegments: u16, nMaxSamples: *mut i32) -> PICO_STATUS,
358        ::libloading::Error,
359    >,
360    pub ps5000SetChannel: Result<
361        unsafe extern "C" fn(
362            handle: i16,
363            channel: PS5000_CHANNEL,
364            enabled: i16,
365            dc: i16,
366            range: PS5000_RANGE,
367        ) -> PICO_STATUS,
368        ::libloading::Error,
369    >,
370    pub ps5000GetTimebase: Result<
371        unsafe extern "C" fn(
372            handle: i16,
373            timebase: u32,
374            noSamples: i32,
375            timeIntervalNanoseconds: *mut i32,
376            oversample: i16,
377            maxSamples: *mut i32,
378            segmentIndex: u16,
379        ) -> PICO_STATUS,
380        ::libloading::Error,
381    >,
382    pub ps5000GetTimebase2: Result<
383        unsafe extern "C" fn(
384            handle: i16,
385            timebase: u32,
386            noSamples: i32,
387            timeIntervalNanoseconds: *mut f32,
388            oversample: i16,
389            maxSamples: *mut i32,
390            segmentIndex: u16,
391        ) -> PICO_STATUS,
392        ::libloading::Error,
393    >,
394    pub ps5000SetSigGenArbitrary: Result<
395        unsafe extern "C" fn(
396            handle: i16,
397            offsetVoltage: i32,
398            pkToPk: u32,
399            startDeltaPhase: u32,
400            stopDeltaPhase: u32,
401            deltaPhaseIncrement: u32,
402            dwellCount: u32,
403            arbitraryWaveform: *mut i16,
404            arbitraryWaveformSize: i32,
405            sweepType: SWEEP_TYPE,
406            whiteNoise: i16,
407            indexMode: INDEX_MODE,
408            shots: u32,
409            sweeps: u32,
410            triggerType: SIGGEN_TRIG_TYPE,
411            triggerSource: SIGGEN_TRIG_SOURCE,
412            extInThreshold: i16,
413        ) -> PICO_STATUS,
414        ::libloading::Error,
415    >,
416    pub ps5000SetSigGenBuiltIn: Result<
417        unsafe extern "C" fn(
418            handle: i16,
419            offsetVoltage: i32,
420            pkToPk: u32,
421            waveType: i16,
422            startFrequency: f32,
423            stopFrequency: f32,
424            increment: f32,
425            dwellTime: f32,
426            sweepType: SWEEP_TYPE,
427            whiteNoise: i16,
428            shots: u32,
429            sweeps: u32,
430            triggerType: SIGGEN_TRIG_TYPE,
431            triggerSource: SIGGEN_TRIG_SOURCE,
432            extInThreshold: i16,
433        ) -> PICO_STATUS,
434        ::libloading::Error,
435    >,
436    pub ps5000SetSigGenBuiltInV2: Result<
437        unsafe extern "C" fn(
438            handle: i16,
439            offsetVoltage: i32,
440            pkToPk: u32,
441            waveType: i16,
442            startFrequency: f64,
443            stopFrequency: f64,
444            increment: f64,
445            dwellTime: f64,
446            sweepType: SWEEP_TYPE,
447            whiteNoise: i16,
448            shots: u32,
449            sweeps: u32,
450            triggerType: SIGGEN_TRIG_TYPE,
451            triggerSource: SIGGEN_TRIG_SOURCE,
452            extInThreshold: i16,
453        ) -> PICO_STATUS,
454        ::libloading::Error,
455    >,
456    pub ps5000SigGenFrequencyToPhase: Result<
457        unsafe extern "C" fn(
458            handle: i16,
459            frequency: f64,
460            indexMode: INDEX_MODE,
461            bufferLength: u32,
462            phase: *mut u32,
463        ) -> PICO_STATUS,
464        ::libloading::Error,
465    >,
466    pub ps5000SigGenArbitraryMinMaxValues: Result<
467        unsafe extern "C" fn(
468            handle: i16,
469            minArbitraryWaveformValue: *mut i16,
470            maxArbitraryWaveformValue: *mut i16,
471            minArbitraryWaveformSize: *mut u32,
472            maxArbitraryWaveformSize: *mut u32,
473        ) -> PICO_STATUS,
474        ::libloading::Error,
475    >,
476    pub ps5000SigGenSoftwareControl:
477        Result<unsafe extern "C" fn(handle: i16, state: i16) -> PICO_STATUS, ::libloading::Error>,
478    pub ps5000SetEts: Result<
479        unsafe extern "C" fn(
480            handle: i16,
481            mode: PS5000_ETS_MODE,
482            etsCycles: i16,
483            etsInterleave: i16,
484            sampleTimePicoseconds: *mut i32,
485        ) -> PICO_STATUS,
486        ::libloading::Error,
487    >,
488    pub ps5000SetTriggerChannelProperties: Result<
489        unsafe extern "C" fn(
490            handle: i16,
491            channelProperties: *mut TRIGGER_CHANNEL_PROPERTIES,
492            nChannelProperties: i16,
493            auxOutputEnable: i16,
494            autoTriggerMilliseconds: i32,
495        ) -> PICO_STATUS,
496        ::libloading::Error,
497    >,
498    pub ps5000SetTriggerChannelConditions: Result<
499        unsafe extern "C" fn(
500            handle: i16,
501            conditions: *mut TRIGGER_CONDITIONS,
502            nConditions: i16,
503        ) -> PICO_STATUS,
504        ::libloading::Error,
505    >,
506    pub ps5000SetTriggerChannelDirections: Result<
507        unsafe extern "C" fn(
508            handle: i16,
509            channelA: THRESHOLD_DIRECTION,
510            channelB: THRESHOLD_DIRECTION,
511            channelC: THRESHOLD_DIRECTION,
512            channelD: THRESHOLD_DIRECTION,
513            ext: THRESHOLD_DIRECTION,
514            aux: THRESHOLD_DIRECTION,
515        ) -> PICO_STATUS,
516        ::libloading::Error,
517    >,
518    pub ps5000SetSimpleTrigger: Result<
519        unsafe extern "C" fn(
520            handle: i16,
521            enable: i16,
522            source: PS5000_CHANNEL,
523            threshold: i16,
524            direction: THRESHOLD_DIRECTION,
525            delay: u32,
526            autoTrigger_ms: i16,
527        ) -> PICO_STATUS,
528        ::libloading::Error,
529    >,
530    pub ps5000SetTriggerDelay:
531        Result<unsafe extern "C" fn(handle: i16, delay: u32) -> PICO_STATUS, ::libloading::Error>,
532    pub ps5000SetPulseWidthQualifier: Result<
533        unsafe extern "C" fn(
534            handle: i16,
535            conditions: *mut PWQ_CONDITIONS,
536            nConditions: i16,
537            direction: THRESHOLD_DIRECTION,
538            lower: u32,
539            upper: u32,
540            type_: PULSE_WIDTH_TYPE,
541        ) -> PICO_STATUS,
542        ::libloading::Error,
543    >,
544    pub ps5000IsTriggerOrPulseWidthQualifierEnabled: Result<
545        unsafe extern "C" fn(
546            handle: i16,
547            triggerEnabled: *mut i16,
548            pulseWidthQualifierEnabled: *mut i16,
549        ) -> PICO_STATUS,
550        ::libloading::Error,
551    >,
552    pub ps5000GetTriggerTimeOffset: Result<
553        unsafe extern "C" fn(
554            handle: i16,
555            timeUpper: *mut u32,
556            timeLower: *mut u32,
557            timeUnits: *mut PS5000_TIME_UNITS,
558            segmentIndex: u16,
559        ) -> PICO_STATUS,
560        ::libloading::Error,
561    >,
562    pub ps5000GetTriggerTimeOffset64: Result<
563        unsafe extern "C" fn(
564            handle: i16,
565            time: *mut i64,
566            timeUnits: *mut PS5000_TIME_UNITS,
567            segmentIndex: u16,
568        ) -> PICO_STATUS,
569        ::libloading::Error,
570    >,
571    pub ps5000GetValuesTriggerTimeOffsetBulk: Result<
572        unsafe extern "C" fn(
573            handle: i16,
574            timesUpper: *mut u32,
575            timesLower: *mut u32,
576            timeUnits: *mut PS5000_TIME_UNITS,
577            fromSegmentIndex: u16,
578            toSegmentIndex: u16,
579        ) -> PICO_STATUS,
580        ::libloading::Error,
581    >,
582    pub ps5000GetValuesTriggerTimeOffsetBulk64: Result<
583        unsafe extern "C" fn(
584            handle: i16,
585            times: *mut i64,
586            timeUnits: *mut PS5000_TIME_UNITS,
587            fromSegmentIndex: u16,
588            toSegmentIndex: u16,
589        ) -> PICO_STATUS,
590        ::libloading::Error,
591    >,
592    pub ps5000SetDataBuffers: Result<
593        unsafe extern "C" fn(
594            handle: i16,
595            channel: PS5000_CHANNEL,
596            bufferMax: *mut i16,
597            bufferMin: *mut i16,
598            bufferLth: i32,
599        ) -> PICO_STATUS,
600        ::libloading::Error,
601    >,
602    pub ps5000SetDataBuffer: Result<
603        unsafe extern "C" fn(
604            handle: i16,
605            channel: PS5000_CHANNEL,
606            buffer: *mut i16,
607            bufferLth: i32,
608        ) -> PICO_STATUS,
609        ::libloading::Error,
610    >,
611    pub ps5000SetDataBufferBulk: Result<
612        unsafe extern "C" fn(
613            handle: i16,
614            channel: PS5000_CHANNEL,
615            buffer: *mut i16,
616            bufferLth: i32,
617            waveform: u16,
618        ) -> PICO_STATUS,
619        ::libloading::Error,
620    >,
621    pub ps5000SetEtsTimeBuffer: Result<
622        unsafe extern "C" fn(handle: i16, buffer: *mut i64, bufferLth: i32) -> PICO_STATUS,
623        ::libloading::Error,
624    >,
625    pub ps5000SetEtsTimeBuffers: Result<
626        unsafe extern "C" fn(
627            handle: i16,
628            timeUpper: *mut u32,
629            timeLower: *mut u32,
630            bufferLth: i32,
631        ) -> PICO_STATUS,
632        ::libloading::Error,
633    >,
634    pub ps5000IsReady: Result<
635        unsafe extern "C" fn(handle: i16, ready: *mut i16) -> PICO_STATUS,
636        ::libloading::Error,
637    >,
638    pub ps5000RunBlock: Result<
639        unsafe extern "C" fn(
640            handle: i16,
641            noOfPreTriggerSamples: i32,
642            noOfPostTriggerSamples: i32,
643            timebase: u32,
644            oversample: i16,
645            timeIndisposedMs: *mut i32,
646            segmentIndex: u16,
647            lpReady: ps5000BlockReady,
648            pParameter: *mut ::std::os::raw::c_void,
649        ) -> PICO_STATUS,
650        ::libloading::Error,
651    >,
652    pub ps5000RunStreaming: Result<
653        unsafe extern "C" fn(
654            handle: i16,
655            sampleInterval: *mut u32,
656            sampleIntervalTimeUnits: PS5000_TIME_UNITS,
657            maxPreTriggerSamples: u32,
658            maxPostPreTriggerSamples: u32,
659            autoStop: i16,
660            downSampleRatio: u32,
661            overviewBufferSize: u32,
662        ) -> PICO_STATUS,
663        ::libloading::Error,
664    >,
665    pub ps5000GetStreamingLatestValues: Result<
666        unsafe extern "C" fn(
667            handle: i16,
668            lpPs5000Ready: ps5000StreamingReady,
669            pParameter: *mut ::std::os::raw::c_void,
670        ) -> PICO_STATUS,
671        ::libloading::Error,
672    >,
673    pub ps5000NoOfStreamingValues: Result<
674        unsafe extern "C" fn(handle: i16, noOfValues: *mut u32) -> PICO_STATUS,
675        ::libloading::Error,
676    >,
677    pub ps5000GetMaxDownSampleRatio: Result<
678        unsafe extern "C" fn(
679            handle: i16,
680            noOfUnaggreatedSamples: u32,
681            maxDownSampleRatio: *mut u32,
682            downSampleRatioMode: i16,
683            segmentIndex: u16,
684        ) -> PICO_STATUS,
685        ::libloading::Error,
686    >,
687    pub ps5000GetValues: Result<
688        unsafe extern "C" fn(
689            handle: i16,
690            startIndex: u32,
691            noOfSamples: *mut u32,
692            downSampleRatio: u32,
693            downSampleRatioMode: i16,
694            segmentIndex: u16,
695            overflow: *mut i16,
696        ) -> PICO_STATUS,
697        ::libloading::Error,
698    >,
699    pub ps5000GetValuesBulk: Result<
700        unsafe extern "C" fn(
701            handle: i16,
702            noOfSamples: *mut u32,
703            fromSegmentIndex: u16,
704            toSegmentIndex: u16,
705            overflow: *mut i16,
706        ) -> PICO_STATUS,
707        ::libloading::Error,
708    >,
709    pub ps5000GetValuesAsync: Result<
710        unsafe extern "C" fn(
711            handle: i16,
712            startIndex: u32,
713            noOfSamples: u32,
714            downSampleRatio: u32,
715            downSampleRatioMode: i16,
716            segmentIndex: u16,
717            lpDataReady: *mut ::std::os::raw::c_void,
718            pParameter: *mut ::std::os::raw::c_void,
719        ) -> PICO_STATUS,
720        ::libloading::Error,
721    >,
722    pub ps5000Stop: Result<unsafe extern "C" fn(handle: i16) -> PICO_STATUS, ::libloading::Error>,
723    pub ps5000PingUnit:
724        Result<unsafe extern "C" fn(handle: i16) -> PICO_STATUS, ::libloading::Error>,
725    pub ps5000SetNoOfCaptures: Result<
726        unsafe extern "C" fn(handle: i16, nCaptures: u16) -> PICO_STATUS,
727        ::libloading::Error,
728    >,
729}
730impl PS5000Loader {
731    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
732    where
733        P: AsRef<::std::ffi::OsStr>,
734    {
735        let __library = ::libloading::Library::new(path)?;
736        let ps5000ApplyFix = __library.get(b"ps5000ApplyFix\0").map(|sym| *sym);
737        let ps5000OpenUnit = __library.get(b"ps5000OpenUnit\0").map(|sym| *sym);
738        let ps5000OpenUnitAsync = __library.get(b"ps5000OpenUnitAsync\0").map(|sym| *sym);
739        let ps5000OpenUnitProgress = __library.get(b"ps5000OpenUnitProgress\0").map(|sym| *sym);
740        let ps5000GetUnitInfo = __library.get(b"ps5000GetUnitInfo\0").map(|sym| *sym);
741        let ps5000FlashLed = __library.get(b"ps5000FlashLed\0").map(|sym| *sym);
742        let ps5000IsLedFlashing = __library.get(b"ps5000IsLedFlashing\0").map(|sym| *sym);
743        let ps5000CloseUnit = __library.get(b"ps5000CloseUnit\0").map(|sym| *sym);
744        let ps5000MemorySegments = __library.get(b"ps5000MemorySegments\0").map(|sym| *sym);
745        let ps5000SetChannel = __library.get(b"ps5000SetChannel\0").map(|sym| *sym);
746        let ps5000GetTimebase = __library.get(b"ps5000GetTimebase\0").map(|sym| *sym);
747        let ps5000GetTimebase2 = __library.get(b"ps5000GetTimebase2\0").map(|sym| *sym);
748        let ps5000SetSigGenArbitrary = __library.get(b"ps5000SetSigGenArbitrary\0").map(|sym| *sym);
749        let ps5000SetSigGenBuiltIn = __library.get(b"ps5000SetSigGenBuiltIn\0").map(|sym| *sym);
750        let ps5000SetSigGenBuiltInV2 = __library.get(b"ps5000SetSigGenBuiltInV2\0").map(|sym| *sym);
751        let ps5000SigGenFrequencyToPhase = __library
752            .get(b"ps5000SigGenFrequencyToPhase\0")
753            .map(|sym| *sym);
754        let ps5000SigGenArbitraryMinMaxValues = __library
755            .get(b"ps5000SigGenArbitraryMinMaxValues\0")
756            .map(|sym| *sym);
757        let ps5000SigGenSoftwareControl = __library
758            .get(b"ps5000SigGenSoftwareControl\0")
759            .map(|sym| *sym);
760        let ps5000SetEts = __library.get(b"ps5000SetEts\0").map(|sym| *sym);
761        let ps5000SetTriggerChannelProperties = __library
762            .get(b"ps5000SetTriggerChannelProperties\0")
763            .map(|sym| *sym);
764        let ps5000SetTriggerChannelConditions = __library
765            .get(b"ps5000SetTriggerChannelConditions\0")
766            .map(|sym| *sym);
767        let ps5000SetTriggerChannelDirections = __library
768            .get(b"ps5000SetTriggerChannelDirections\0")
769            .map(|sym| *sym);
770        let ps5000SetSimpleTrigger = __library.get(b"ps5000SetSimpleTrigger\0").map(|sym| *sym);
771        let ps5000SetTriggerDelay = __library.get(b"ps5000SetTriggerDelay\0").map(|sym| *sym);
772        let ps5000SetPulseWidthQualifier = __library
773            .get(b"ps5000SetPulseWidthQualifier\0")
774            .map(|sym| *sym);
775        let ps5000IsTriggerOrPulseWidthQualifierEnabled = __library
776            .get(b"ps5000IsTriggerOrPulseWidthQualifierEnabled\0")
777            .map(|sym| *sym);
778        let ps5000GetTriggerTimeOffset = __library
779            .get(b"ps5000GetTriggerTimeOffset\0")
780            .map(|sym| *sym);
781        let ps5000GetTriggerTimeOffset64 = __library
782            .get(b"ps5000GetTriggerTimeOffset64\0")
783            .map(|sym| *sym);
784        let ps5000GetValuesTriggerTimeOffsetBulk = __library
785            .get(b"ps5000GetValuesTriggerTimeOffsetBulk\0")
786            .map(|sym| *sym);
787        let ps5000GetValuesTriggerTimeOffsetBulk64 = __library
788            .get(b"ps5000GetValuesTriggerTimeOffsetBulk64\0")
789            .map(|sym| *sym);
790        let ps5000SetDataBuffers = __library.get(b"ps5000SetDataBuffers\0").map(|sym| *sym);
791        let ps5000SetDataBuffer = __library.get(b"ps5000SetDataBuffer\0").map(|sym| *sym);
792        let ps5000SetDataBufferBulk = __library.get(b"ps5000SetDataBufferBulk\0").map(|sym| *sym);
793        let ps5000SetEtsTimeBuffer = __library.get(b"ps5000SetEtsTimeBuffer\0").map(|sym| *sym);
794        let ps5000SetEtsTimeBuffers = __library.get(b"ps5000SetEtsTimeBuffers\0").map(|sym| *sym);
795        let ps5000IsReady = __library.get(b"ps5000IsReady\0").map(|sym| *sym);
796        let ps5000RunBlock = __library.get(b"ps5000RunBlock\0").map(|sym| *sym);
797        let ps5000RunStreaming = __library.get(b"ps5000RunStreaming\0").map(|sym| *sym);
798        let ps5000GetStreamingLatestValues = __library
799            .get(b"ps5000GetStreamingLatestValues\0")
800            .map(|sym| *sym);
801        let ps5000NoOfStreamingValues = __library
802            .get(b"ps5000NoOfStreamingValues\0")
803            .map(|sym| *sym);
804        let ps5000GetMaxDownSampleRatio = __library
805            .get(b"ps5000GetMaxDownSampleRatio\0")
806            .map(|sym| *sym);
807        let ps5000GetValues = __library.get(b"ps5000GetValues\0").map(|sym| *sym);
808        let ps5000GetValuesBulk = __library.get(b"ps5000GetValuesBulk\0").map(|sym| *sym);
809        let ps5000GetValuesAsync = __library.get(b"ps5000GetValuesAsync\0").map(|sym| *sym);
810        let ps5000Stop = __library.get(b"ps5000Stop\0").map(|sym| *sym);
811        let ps5000PingUnit = __library.get(b"ps5000PingUnit\0").map(|sym| *sym);
812        let ps5000SetNoOfCaptures = __library.get(b"ps5000SetNoOfCaptures\0").map(|sym| *sym);
813        Ok(PS5000Loader {
814            __library,
815            ps5000ApplyFix,
816            ps5000OpenUnit,
817            ps5000OpenUnitAsync,
818            ps5000OpenUnitProgress,
819            ps5000GetUnitInfo,
820            ps5000FlashLed,
821            ps5000IsLedFlashing,
822            ps5000CloseUnit,
823            ps5000MemorySegments,
824            ps5000SetChannel,
825            ps5000GetTimebase,
826            ps5000GetTimebase2,
827            ps5000SetSigGenArbitrary,
828            ps5000SetSigGenBuiltIn,
829            ps5000SetSigGenBuiltInV2,
830            ps5000SigGenFrequencyToPhase,
831            ps5000SigGenArbitraryMinMaxValues,
832            ps5000SigGenSoftwareControl,
833            ps5000SetEts,
834            ps5000SetTriggerChannelProperties,
835            ps5000SetTriggerChannelConditions,
836            ps5000SetTriggerChannelDirections,
837            ps5000SetSimpleTrigger,
838            ps5000SetTriggerDelay,
839            ps5000SetPulseWidthQualifier,
840            ps5000IsTriggerOrPulseWidthQualifierEnabled,
841            ps5000GetTriggerTimeOffset,
842            ps5000GetTriggerTimeOffset64,
843            ps5000GetValuesTriggerTimeOffsetBulk,
844            ps5000GetValuesTriggerTimeOffsetBulk64,
845            ps5000SetDataBuffers,
846            ps5000SetDataBuffer,
847            ps5000SetDataBufferBulk,
848            ps5000SetEtsTimeBuffer,
849            ps5000SetEtsTimeBuffers,
850            ps5000IsReady,
851            ps5000RunBlock,
852            ps5000RunStreaming,
853            ps5000GetStreamingLatestValues,
854            ps5000NoOfStreamingValues,
855            ps5000GetMaxDownSampleRatio,
856            ps5000GetValues,
857            ps5000GetValuesBulk,
858            ps5000GetValuesAsync,
859            ps5000Stop,
860            ps5000PingUnit,
861            ps5000SetNoOfCaptures,
862        })
863    }
864    pub unsafe fn ps5000ApplyFix(&self, a: u32, b: u16) {
865        let sym = self
866            .ps5000ApplyFix
867            .as_ref()
868            .expect("Expected function, got error.");
869        (sym)(a, b)
870    }
871    pub unsafe fn ps5000OpenUnit(&self, handle: *mut i16) -> PICO_STATUS {
872        let sym = self
873            .ps5000OpenUnit
874            .as_ref()
875            .expect("Expected function, got error.");
876        (sym)(handle)
877    }
878    pub unsafe fn ps5000OpenUnitAsync(&self, status: *mut i16) -> PICO_STATUS {
879        let sym = self
880            .ps5000OpenUnitAsync
881            .as_ref()
882            .expect("Expected function, got error.");
883        (sym)(status)
884    }
885    pub unsafe fn ps5000OpenUnitProgress(
886        &self,
887        handle: *mut i16,
888        progressPercent: *mut i16,
889        complete: *mut i16,
890    ) -> PICO_STATUS {
891        let sym = self
892            .ps5000OpenUnitProgress
893            .as_ref()
894            .expect("Expected function, got error.");
895        (sym)(handle, progressPercent, complete)
896    }
897    pub unsafe fn ps5000GetUnitInfo(
898        &self,
899        handle: i16,
900        string: *mut i8,
901        stringLength: i16,
902        requiredSize: *mut i16,
903        info: PICO_INFO,
904    ) -> PICO_STATUS {
905        let sym = self
906            .ps5000GetUnitInfo
907            .as_ref()
908            .expect("Expected function, got error.");
909        (sym)(handle, string, stringLength, requiredSize, info)
910    }
911    pub unsafe fn ps5000FlashLed(&self, handle: i16, start: i16) -> PICO_STATUS {
912        let sym = self
913            .ps5000FlashLed
914            .as_ref()
915            .expect("Expected function, got error.");
916        (sym)(handle, start)
917    }
918    pub unsafe fn ps5000IsLedFlashing(&self, handle: i16, status: *mut i16) -> PICO_STATUS {
919        let sym = self
920            .ps5000IsLedFlashing
921            .as_ref()
922            .expect("Expected function, got error.");
923        (sym)(handle, status)
924    }
925    pub unsafe fn ps5000CloseUnit(&self, handle: i16) -> PICO_STATUS {
926        let sym = self
927            .ps5000CloseUnit
928            .as_ref()
929            .expect("Expected function, got error.");
930        (sym)(handle)
931    }
932    pub unsafe fn ps5000MemorySegments(
933        &self,
934        handle: i16,
935        nSegments: u16,
936        nMaxSamples: *mut i32,
937    ) -> PICO_STATUS {
938        let sym = self
939            .ps5000MemorySegments
940            .as_ref()
941            .expect("Expected function, got error.");
942        (sym)(handle, nSegments, nMaxSamples)
943    }
944    pub unsafe fn ps5000SetChannel(
945        &self,
946        handle: i16,
947        channel: PS5000_CHANNEL,
948        enabled: i16,
949        dc: i16,
950        range: PS5000_RANGE,
951    ) -> PICO_STATUS {
952        let sym = self
953            .ps5000SetChannel
954            .as_ref()
955            .expect("Expected function, got error.");
956        (sym)(handle, channel, enabled, dc, range)
957    }
958    pub unsafe fn ps5000GetTimebase(
959        &self,
960        handle: i16,
961        timebase: u32,
962        noSamples: i32,
963        timeIntervalNanoseconds: *mut i32,
964        oversample: i16,
965        maxSamples: *mut i32,
966        segmentIndex: u16,
967    ) -> PICO_STATUS {
968        let sym = self
969            .ps5000GetTimebase
970            .as_ref()
971            .expect("Expected function, got error.");
972        (sym)(
973            handle,
974            timebase,
975            noSamples,
976            timeIntervalNanoseconds,
977            oversample,
978            maxSamples,
979            segmentIndex,
980        )
981    }
982    pub unsafe fn ps5000GetTimebase2(
983        &self,
984        handle: i16,
985        timebase: u32,
986        noSamples: i32,
987        timeIntervalNanoseconds: *mut f32,
988        oversample: i16,
989        maxSamples: *mut i32,
990        segmentIndex: u16,
991    ) -> PICO_STATUS {
992        let sym = self
993            .ps5000GetTimebase2
994            .as_ref()
995            .expect("Expected function, got error.");
996        (sym)(
997            handle,
998            timebase,
999            noSamples,
1000            timeIntervalNanoseconds,
1001            oversample,
1002            maxSamples,
1003            segmentIndex,
1004        )
1005    }
1006    pub unsafe fn ps5000SetSigGenArbitrary(
1007        &self,
1008        handle: i16,
1009        offsetVoltage: i32,
1010        pkToPk: u32,
1011        startDeltaPhase: u32,
1012        stopDeltaPhase: u32,
1013        deltaPhaseIncrement: u32,
1014        dwellCount: u32,
1015        arbitraryWaveform: *mut i16,
1016        arbitraryWaveformSize: i32,
1017        sweepType: SWEEP_TYPE,
1018        whiteNoise: i16,
1019        indexMode: INDEX_MODE,
1020        shots: u32,
1021        sweeps: u32,
1022        triggerType: SIGGEN_TRIG_TYPE,
1023        triggerSource: SIGGEN_TRIG_SOURCE,
1024        extInThreshold: i16,
1025    ) -> PICO_STATUS {
1026        let sym = self
1027            .ps5000SetSigGenArbitrary
1028            .as_ref()
1029            .expect("Expected function, got error.");
1030        (sym)(
1031            handle,
1032            offsetVoltage,
1033            pkToPk,
1034            startDeltaPhase,
1035            stopDeltaPhase,
1036            deltaPhaseIncrement,
1037            dwellCount,
1038            arbitraryWaveform,
1039            arbitraryWaveformSize,
1040            sweepType,
1041            whiteNoise,
1042            indexMode,
1043            shots,
1044            sweeps,
1045            triggerType,
1046            triggerSource,
1047            extInThreshold,
1048        )
1049    }
1050    pub unsafe fn ps5000SetSigGenBuiltIn(
1051        &self,
1052        handle: i16,
1053        offsetVoltage: i32,
1054        pkToPk: u32,
1055        waveType: i16,
1056        startFrequency: f32,
1057        stopFrequency: f32,
1058        increment: f32,
1059        dwellTime: f32,
1060        sweepType: SWEEP_TYPE,
1061        whiteNoise: i16,
1062        shots: u32,
1063        sweeps: u32,
1064        triggerType: SIGGEN_TRIG_TYPE,
1065        triggerSource: SIGGEN_TRIG_SOURCE,
1066        extInThreshold: i16,
1067    ) -> PICO_STATUS {
1068        let sym = self
1069            .ps5000SetSigGenBuiltIn
1070            .as_ref()
1071            .expect("Expected function, got error.");
1072        (sym)(
1073            handle,
1074            offsetVoltage,
1075            pkToPk,
1076            waveType,
1077            startFrequency,
1078            stopFrequency,
1079            increment,
1080            dwellTime,
1081            sweepType,
1082            whiteNoise,
1083            shots,
1084            sweeps,
1085            triggerType,
1086            triggerSource,
1087            extInThreshold,
1088        )
1089    }
1090    pub unsafe fn ps5000SetSigGenBuiltInV2(
1091        &self,
1092        handle: i16,
1093        offsetVoltage: i32,
1094        pkToPk: u32,
1095        waveType: i16,
1096        startFrequency: f64,
1097        stopFrequency: f64,
1098        increment: f64,
1099        dwellTime: f64,
1100        sweepType: SWEEP_TYPE,
1101        whiteNoise: i16,
1102        shots: u32,
1103        sweeps: u32,
1104        triggerType: SIGGEN_TRIG_TYPE,
1105        triggerSource: SIGGEN_TRIG_SOURCE,
1106        extInThreshold: i16,
1107    ) -> PICO_STATUS {
1108        let sym = self
1109            .ps5000SetSigGenBuiltInV2
1110            .as_ref()
1111            .expect("Expected function, got error.");
1112        (sym)(
1113            handle,
1114            offsetVoltage,
1115            pkToPk,
1116            waveType,
1117            startFrequency,
1118            stopFrequency,
1119            increment,
1120            dwellTime,
1121            sweepType,
1122            whiteNoise,
1123            shots,
1124            sweeps,
1125            triggerType,
1126            triggerSource,
1127            extInThreshold,
1128        )
1129    }
1130    pub unsafe fn ps5000SigGenFrequencyToPhase(
1131        &self,
1132        handle: i16,
1133        frequency: f64,
1134        indexMode: INDEX_MODE,
1135        bufferLength: u32,
1136        phase: *mut u32,
1137    ) -> PICO_STATUS {
1138        let sym = self
1139            .ps5000SigGenFrequencyToPhase
1140            .as_ref()
1141            .expect("Expected function, got error.");
1142        (sym)(handle, frequency, indexMode, bufferLength, phase)
1143    }
1144    pub unsafe fn ps5000SigGenArbitraryMinMaxValues(
1145        &self,
1146        handle: i16,
1147        minArbitraryWaveformValue: *mut i16,
1148        maxArbitraryWaveformValue: *mut i16,
1149        minArbitraryWaveformSize: *mut u32,
1150        maxArbitraryWaveformSize: *mut u32,
1151    ) -> PICO_STATUS {
1152        let sym = self
1153            .ps5000SigGenArbitraryMinMaxValues
1154            .as_ref()
1155            .expect("Expected function, got error.");
1156        (sym)(
1157            handle,
1158            minArbitraryWaveformValue,
1159            maxArbitraryWaveformValue,
1160            minArbitraryWaveformSize,
1161            maxArbitraryWaveformSize,
1162        )
1163    }
1164    pub unsafe fn ps5000SigGenSoftwareControl(&self, handle: i16, state: i16) -> PICO_STATUS {
1165        let sym = self
1166            .ps5000SigGenSoftwareControl
1167            .as_ref()
1168            .expect("Expected function, got error.");
1169        (sym)(handle, state)
1170    }
1171    pub unsafe fn ps5000SetEts(
1172        &self,
1173        handle: i16,
1174        mode: PS5000_ETS_MODE,
1175        etsCycles: i16,
1176        etsInterleave: i16,
1177        sampleTimePicoseconds: *mut i32,
1178    ) -> PICO_STATUS {
1179        let sym = self
1180            .ps5000SetEts
1181            .as_ref()
1182            .expect("Expected function, got error.");
1183        (sym)(
1184            handle,
1185            mode,
1186            etsCycles,
1187            etsInterleave,
1188            sampleTimePicoseconds,
1189        )
1190    }
1191    pub unsafe fn ps5000SetTriggerChannelProperties(
1192        &self,
1193        handle: i16,
1194        channelProperties: *mut TRIGGER_CHANNEL_PROPERTIES,
1195        nChannelProperties: i16,
1196        auxOutputEnable: i16,
1197        autoTriggerMilliseconds: i32,
1198    ) -> PICO_STATUS {
1199        let sym = self
1200            .ps5000SetTriggerChannelProperties
1201            .as_ref()
1202            .expect("Expected function, got error.");
1203        (sym)(
1204            handle,
1205            channelProperties,
1206            nChannelProperties,
1207            auxOutputEnable,
1208            autoTriggerMilliseconds,
1209        )
1210    }
1211    pub unsafe fn ps5000SetTriggerChannelConditions(
1212        &self,
1213        handle: i16,
1214        conditions: *mut TRIGGER_CONDITIONS,
1215        nConditions: i16,
1216    ) -> PICO_STATUS {
1217        let sym = self
1218            .ps5000SetTriggerChannelConditions
1219            .as_ref()
1220            .expect("Expected function, got error.");
1221        (sym)(handle, conditions, nConditions)
1222    }
1223    pub unsafe fn ps5000SetTriggerChannelDirections(
1224        &self,
1225        handle: i16,
1226        channelA: THRESHOLD_DIRECTION,
1227        channelB: THRESHOLD_DIRECTION,
1228        channelC: THRESHOLD_DIRECTION,
1229        channelD: THRESHOLD_DIRECTION,
1230        ext: THRESHOLD_DIRECTION,
1231        aux: THRESHOLD_DIRECTION,
1232    ) -> PICO_STATUS {
1233        let sym = self
1234            .ps5000SetTriggerChannelDirections
1235            .as_ref()
1236            .expect("Expected function, got error.");
1237        (sym)(handle, channelA, channelB, channelC, channelD, ext, aux)
1238    }
1239    pub unsafe fn ps5000SetSimpleTrigger(
1240        &self,
1241        handle: i16,
1242        enable: i16,
1243        source: PS5000_CHANNEL,
1244        threshold: i16,
1245        direction: THRESHOLD_DIRECTION,
1246        delay: u32,
1247        autoTrigger_ms: i16,
1248    ) -> PICO_STATUS {
1249        let sym = self
1250            .ps5000SetSimpleTrigger
1251            .as_ref()
1252            .expect("Expected function, got error.");
1253        (sym)(
1254            handle,
1255            enable,
1256            source,
1257            threshold,
1258            direction,
1259            delay,
1260            autoTrigger_ms,
1261        )
1262    }
1263    pub unsafe fn ps5000SetTriggerDelay(&self, handle: i16, delay: u32) -> PICO_STATUS {
1264        let sym = self
1265            .ps5000SetTriggerDelay
1266            .as_ref()
1267            .expect("Expected function, got error.");
1268        (sym)(handle, delay)
1269    }
1270    pub unsafe fn ps5000SetPulseWidthQualifier(
1271        &self,
1272        handle: i16,
1273        conditions: *mut PWQ_CONDITIONS,
1274        nConditions: i16,
1275        direction: THRESHOLD_DIRECTION,
1276        lower: u32,
1277        upper: u32,
1278        type_: PULSE_WIDTH_TYPE,
1279    ) -> PICO_STATUS {
1280        let sym = self
1281            .ps5000SetPulseWidthQualifier
1282            .as_ref()
1283            .expect("Expected function, got error.");
1284        (sym)(
1285            handle,
1286            conditions,
1287            nConditions,
1288            direction,
1289            lower,
1290            upper,
1291            type_,
1292        )
1293    }
1294    pub unsafe fn ps5000IsTriggerOrPulseWidthQualifierEnabled(
1295        &self,
1296        handle: i16,
1297        triggerEnabled: *mut i16,
1298        pulseWidthQualifierEnabled: *mut i16,
1299    ) -> PICO_STATUS {
1300        let sym = self
1301            .ps5000IsTriggerOrPulseWidthQualifierEnabled
1302            .as_ref()
1303            .expect("Expected function, got error.");
1304        (sym)(handle, triggerEnabled, pulseWidthQualifierEnabled)
1305    }
1306    pub unsafe fn ps5000GetTriggerTimeOffset(
1307        &self,
1308        handle: i16,
1309        timeUpper: *mut u32,
1310        timeLower: *mut u32,
1311        timeUnits: *mut PS5000_TIME_UNITS,
1312        segmentIndex: u16,
1313    ) -> PICO_STATUS {
1314        let sym = self
1315            .ps5000GetTriggerTimeOffset
1316            .as_ref()
1317            .expect("Expected function, got error.");
1318        (sym)(handle, timeUpper, timeLower, timeUnits, segmentIndex)
1319    }
1320    pub unsafe fn ps5000GetTriggerTimeOffset64(
1321        &self,
1322        handle: i16,
1323        time: *mut i64,
1324        timeUnits: *mut PS5000_TIME_UNITS,
1325        segmentIndex: u16,
1326    ) -> PICO_STATUS {
1327        let sym = self
1328            .ps5000GetTriggerTimeOffset64
1329            .as_ref()
1330            .expect("Expected function, got error.");
1331        (sym)(handle, time, timeUnits, segmentIndex)
1332    }
1333    pub unsafe fn ps5000GetValuesTriggerTimeOffsetBulk(
1334        &self,
1335        handle: i16,
1336        timesUpper: *mut u32,
1337        timesLower: *mut u32,
1338        timeUnits: *mut PS5000_TIME_UNITS,
1339        fromSegmentIndex: u16,
1340        toSegmentIndex: u16,
1341    ) -> PICO_STATUS {
1342        let sym = self
1343            .ps5000GetValuesTriggerTimeOffsetBulk
1344            .as_ref()
1345            .expect("Expected function, got error.");
1346        (sym)(
1347            handle,
1348            timesUpper,
1349            timesLower,
1350            timeUnits,
1351            fromSegmentIndex,
1352            toSegmentIndex,
1353        )
1354    }
1355    pub unsafe fn ps5000GetValuesTriggerTimeOffsetBulk64(
1356        &self,
1357        handle: i16,
1358        times: *mut i64,
1359        timeUnits: *mut PS5000_TIME_UNITS,
1360        fromSegmentIndex: u16,
1361        toSegmentIndex: u16,
1362    ) -> PICO_STATUS {
1363        let sym = self
1364            .ps5000GetValuesTriggerTimeOffsetBulk64
1365            .as_ref()
1366            .expect("Expected function, got error.");
1367        (sym)(handle, times, timeUnits, fromSegmentIndex, toSegmentIndex)
1368    }
1369    pub unsafe fn ps5000SetDataBuffers(
1370        &self,
1371        handle: i16,
1372        channel: PS5000_CHANNEL,
1373        bufferMax: *mut i16,
1374        bufferMin: *mut i16,
1375        bufferLth: i32,
1376    ) -> PICO_STATUS {
1377        let sym = self
1378            .ps5000SetDataBuffers
1379            .as_ref()
1380            .expect("Expected function, got error.");
1381        (sym)(handle, channel, bufferMax, bufferMin, bufferLth)
1382    }
1383    pub unsafe fn ps5000SetDataBuffer(
1384        &self,
1385        handle: i16,
1386        channel: PS5000_CHANNEL,
1387        buffer: *mut i16,
1388        bufferLth: i32,
1389    ) -> PICO_STATUS {
1390        let sym = self
1391            .ps5000SetDataBuffer
1392            .as_ref()
1393            .expect("Expected function, got error.");
1394        (sym)(handle, channel, buffer, bufferLth)
1395    }
1396    pub unsafe fn ps5000SetDataBufferBulk(
1397        &self,
1398        handle: i16,
1399        channel: PS5000_CHANNEL,
1400        buffer: *mut i16,
1401        bufferLth: i32,
1402        waveform: u16,
1403    ) -> PICO_STATUS {
1404        let sym = self
1405            .ps5000SetDataBufferBulk
1406            .as_ref()
1407            .expect("Expected function, got error.");
1408        (sym)(handle, channel, buffer, bufferLth, waveform)
1409    }
1410    pub unsafe fn ps5000SetEtsTimeBuffer(
1411        &self,
1412        handle: i16,
1413        buffer: *mut i64,
1414        bufferLth: i32,
1415    ) -> PICO_STATUS {
1416        let sym = self
1417            .ps5000SetEtsTimeBuffer
1418            .as_ref()
1419            .expect("Expected function, got error.");
1420        (sym)(handle, buffer, bufferLth)
1421    }
1422    pub unsafe fn ps5000SetEtsTimeBuffers(
1423        &self,
1424        handle: i16,
1425        timeUpper: *mut u32,
1426        timeLower: *mut u32,
1427        bufferLth: i32,
1428    ) -> PICO_STATUS {
1429        let sym = self
1430            .ps5000SetEtsTimeBuffers
1431            .as_ref()
1432            .expect("Expected function, got error.");
1433        (sym)(handle, timeUpper, timeLower, bufferLth)
1434    }
1435    pub unsafe fn ps5000IsReady(&self, handle: i16, ready: *mut i16) -> PICO_STATUS {
1436        let sym = self
1437            .ps5000IsReady
1438            .as_ref()
1439            .expect("Expected function, got error.");
1440        (sym)(handle, ready)
1441    }
1442    pub unsafe fn ps5000RunBlock(
1443        &self,
1444        handle: i16,
1445        noOfPreTriggerSamples: i32,
1446        noOfPostTriggerSamples: i32,
1447        timebase: u32,
1448        oversample: i16,
1449        timeIndisposedMs: *mut i32,
1450        segmentIndex: u16,
1451        lpReady: ps5000BlockReady,
1452        pParameter: *mut ::std::os::raw::c_void,
1453    ) -> PICO_STATUS {
1454        let sym = self
1455            .ps5000RunBlock
1456            .as_ref()
1457            .expect("Expected function, got error.");
1458        (sym)(
1459            handle,
1460            noOfPreTriggerSamples,
1461            noOfPostTriggerSamples,
1462            timebase,
1463            oversample,
1464            timeIndisposedMs,
1465            segmentIndex,
1466            lpReady,
1467            pParameter,
1468        )
1469    }
1470    pub unsafe fn ps5000RunStreaming(
1471        &self,
1472        handle: i16,
1473        sampleInterval: *mut u32,
1474        sampleIntervalTimeUnits: PS5000_TIME_UNITS,
1475        maxPreTriggerSamples: u32,
1476        maxPostPreTriggerSamples: u32,
1477        autoStop: i16,
1478        downSampleRatio: u32,
1479        overviewBufferSize: u32,
1480    ) -> PICO_STATUS {
1481        let sym = self
1482            .ps5000RunStreaming
1483            .as_ref()
1484            .expect("Expected function, got error.");
1485        (sym)(
1486            handle,
1487            sampleInterval,
1488            sampleIntervalTimeUnits,
1489            maxPreTriggerSamples,
1490            maxPostPreTriggerSamples,
1491            autoStop,
1492            downSampleRatio,
1493            overviewBufferSize,
1494        )
1495    }
1496    pub unsafe fn ps5000GetStreamingLatestValues(
1497        &self,
1498        handle: i16,
1499        lpPs5000Ready: ps5000StreamingReady,
1500        pParameter: *mut ::std::os::raw::c_void,
1501    ) -> PICO_STATUS {
1502        let sym = self
1503            .ps5000GetStreamingLatestValues
1504            .as_ref()
1505            .expect("Expected function, got error.");
1506        (sym)(handle, lpPs5000Ready, pParameter)
1507    }
1508    pub unsafe fn ps5000NoOfStreamingValues(
1509        &self,
1510        handle: i16,
1511        noOfValues: *mut u32,
1512    ) -> PICO_STATUS {
1513        let sym = self
1514            .ps5000NoOfStreamingValues
1515            .as_ref()
1516            .expect("Expected function, got error.");
1517        (sym)(handle, noOfValues)
1518    }
1519    pub unsafe fn ps5000GetMaxDownSampleRatio(
1520        &self,
1521        handle: i16,
1522        noOfUnaggreatedSamples: u32,
1523        maxDownSampleRatio: *mut u32,
1524        downSampleRatioMode: i16,
1525        segmentIndex: u16,
1526    ) -> PICO_STATUS {
1527        let sym = self
1528            .ps5000GetMaxDownSampleRatio
1529            .as_ref()
1530            .expect("Expected function, got error.");
1531        (sym)(
1532            handle,
1533            noOfUnaggreatedSamples,
1534            maxDownSampleRatio,
1535            downSampleRatioMode,
1536            segmentIndex,
1537        )
1538    }
1539    pub unsafe fn ps5000GetValues(
1540        &self,
1541        handle: i16,
1542        startIndex: u32,
1543        noOfSamples: *mut u32,
1544        downSampleRatio: u32,
1545        downSampleRatioMode: i16,
1546        segmentIndex: u16,
1547        overflow: *mut i16,
1548    ) -> PICO_STATUS {
1549        let sym = self
1550            .ps5000GetValues
1551            .as_ref()
1552            .expect("Expected function, got error.");
1553        (sym)(
1554            handle,
1555            startIndex,
1556            noOfSamples,
1557            downSampleRatio,
1558            downSampleRatioMode,
1559            segmentIndex,
1560            overflow,
1561        )
1562    }
1563    pub unsafe fn ps5000GetValuesBulk(
1564        &self,
1565        handle: i16,
1566        noOfSamples: *mut u32,
1567        fromSegmentIndex: u16,
1568        toSegmentIndex: u16,
1569        overflow: *mut i16,
1570    ) -> PICO_STATUS {
1571        let sym = self
1572            .ps5000GetValuesBulk
1573            .as_ref()
1574            .expect("Expected function, got error.");
1575        (sym)(
1576            handle,
1577            noOfSamples,
1578            fromSegmentIndex,
1579            toSegmentIndex,
1580            overflow,
1581        )
1582    }
1583    pub unsafe fn ps5000GetValuesAsync(
1584        &self,
1585        handle: i16,
1586        startIndex: u32,
1587        noOfSamples: u32,
1588        downSampleRatio: u32,
1589        downSampleRatioMode: i16,
1590        segmentIndex: u16,
1591        lpDataReady: *mut ::std::os::raw::c_void,
1592        pParameter: *mut ::std::os::raw::c_void,
1593    ) -> PICO_STATUS {
1594        let sym = self
1595            .ps5000GetValuesAsync
1596            .as_ref()
1597            .expect("Expected function, got error.");
1598        (sym)(
1599            handle,
1600            startIndex,
1601            noOfSamples,
1602            downSampleRatio,
1603            downSampleRatioMode,
1604            segmentIndex,
1605            lpDataReady,
1606            pParameter,
1607        )
1608    }
1609    pub unsafe fn ps5000Stop(&self, handle: i16) -> PICO_STATUS {
1610        let sym = self
1611            .ps5000Stop
1612            .as_ref()
1613            .expect("Expected function, got error.");
1614        (sym)(handle)
1615    }
1616    pub unsafe fn ps5000PingUnit(&self, handle: i16) -> PICO_STATUS {
1617        let sym = self
1618            .ps5000PingUnit
1619            .as_ref()
1620            .expect("Expected function, got error.");
1621        (sym)(handle)
1622    }
1623    pub unsafe fn ps5000SetNoOfCaptures(&self, handle: i16, nCaptures: u16) -> PICO_STATUS {
1624        let sym = self
1625            .ps5000SetNoOfCaptures
1626            .as_ref()
1627            .expect("Expected function, got error.");
1628        (sym)(handle, nCaptures)
1629    }
1630}