nisync 0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
nisync/_library.py ADDED
@@ -0,0 +1,1302 @@
1
+ # This file was generated
2
+
3
+ import ctypes
4
+ import threading
5
+ from nisync._visatype import * # noqa: F403
6
+
7
+
8
+ def ascii_encode(value):
9
+ if isinstance(value, str):
10
+ return value.encode("ascii")
11
+ return value
12
+
13
+
14
+ class Library(object):
15
+ def __init__(self, ctypes_library):
16
+ self._func_lock = threading.Lock()
17
+ self._library = ctypes_library
18
+ # We cache the cfunc object from the ctypes.CDLL object
19
+ self.niSync_init_cfunc = None
20
+ self.niSync_close_cfunc = None
21
+ self.niSync_GetTimeReferenceNames_cfunc = None
22
+ self.niSync_error_message_cfunc = None
23
+ self.niSync_reset_cfunc = None
24
+ self.niSync_PersistConfig_cfunc = None
25
+ self.niSync_self_test_cfunc = None
26
+ self.niSync_revision_query_cfunc = None
27
+ self.niSync_ConfigureFPGA_cfunc = None
28
+ self.niSync_ConnectTrigTerminals_cfunc = None
29
+ self.niSync_DisconnectTrigTerminals_cfunc = None
30
+ self.niSync_GetTrigTerminalConnectionInfo_cfunc = None
31
+ self.niSync_ConnectSWTrigToTerminal_cfunc = None
32
+ self.niSync_DisconnectSWTrigFromTerminal_cfunc = None
33
+ self.niSync_GetSWTrigConnectionInfo_cfunc = None
34
+ self.niSync_SendSoftwareTrigger_cfunc = None
35
+ self.niSync_ConnectClkTerminals_cfunc = None
36
+ self.niSync_DisconnectClkTerminals_cfunc = None
37
+ self.niSync_GetClkTerminalConnectionInfo_cfunc = None
38
+ self.niSync_MeasureFrequency_cfunc = None
39
+ self.niSync_MeasureFrequencyEx_cfunc = None
40
+ self.niSync_Start1588_cfunc = None
41
+ self.niSync_Stop1588_cfunc = None
42
+ self.niSync_SetTime_cfunc = None
43
+ self.niSync_GetTime_cfunc = None
44
+ self.niSync_ResetFrequency_cfunc = None
45
+ self.niSync_CreateFutureTimeEvent_cfunc = None
46
+ self.niSync_ClearFutureTimeEvents_cfunc = None
47
+ self.niSync_EnableTimeStampTrigger_cfunc = None
48
+ self.niSync_EnableTimeStampTriggerWithDecimation_cfunc = None
49
+ self.niSync_ReadTriggerTimeStamp_cfunc = None
50
+ self.niSync_ReadMultipleTriggerTimeStamp_cfunc = None
51
+ self.niSync_DisableTimeStampTrigger_cfunc = None
52
+ self.niSync_CreateClock_cfunc = None
53
+ self.niSync_ClearClock_cfunc = None
54
+ self.niSync_Start8021AS_cfunc = None
55
+ self.niSync_Stop8021AS_cfunc = None
56
+ self.niSync_SetTimeReferenceFreeRunning_cfunc = None
57
+ self.niSync_SetTimeReferenceGPS_cfunc = None
58
+ self.niSync_SetTimeReferenceIRIG_cfunc = None
59
+ self.niSync_SetTimeReferencePPS_cfunc = None
60
+ self.niSync_SetTimeReference1588OrdinaryClock_cfunc = None
61
+ self.niSync_SetTimeReference8021AS_cfunc = None
62
+ self.niSync_EnableGPSTimestamping_cfunc = None
63
+ self.niSync_EnableIRIGTimestamping_cfunc = None
64
+ self.niSync_ReadLastGPSTimestamp_cfunc = None
65
+ self.niSync_ReadLastIRIGTimestamp_cfunc = None
66
+ self.niSync_DisableGPSTimestamping_cfunc = None
67
+ self.niSync_DisableIRIGTimestamping_cfunc = None
68
+ self.niSync_GetVelocity_cfunc = None
69
+ self.niSync_GetLocation_cfunc = None
70
+ self.niSync_GetAttributeViInt32_cfunc = None
71
+ self.niSync_GetAttributeViReal64_cfunc = None
72
+ self.niSync_GetAttributeViBoolean_cfunc = None
73
+ self.niSync_GetAttributeViString_cfunc = None
74
+ self.niSync_SetAttributeViInt32_cfunc = None
75
+ self.niSync_SetAttributeViReal64_cfunc = None
76
+ self.niSync_SetAttributeViBoolean_cfunc = None
77
+ self.niSync_SetAttributeViString_cfunc = None
78
+ self.niSync_GetExtCalLastDateAndTime_cfunc = None
79
+ self.niSync_GetExtCalLastTemp_cfunc = None
80
+ self.niSync_GetExtCalRecommendedInterval_cfunc = None
81
+ self.niSync_ChangeExtCalPassword_cfunc = None
82
+ self.niSync_ReadCurrentTemperature_cfunc = None
83
+ self.niSync_CalGetOscillatorVoltage_cfunc = None
84
+ self.niSync_CalGetClk10PhaseVoltage_cfunc = None
85
+ self.niSync_CalGetDDSStartPulsePhaseVoltage_cfunc = None
86
+ self.niSync_CalGetDDSInitialPhase_cfunc = None
87
+ self.niSync_InitExtCal_cfunc = None
88
+ self.niSync_CloseExtCal_cfunc = None
89
+ self.niSync_CalAdjustOscillatorVoltage_cfunc = None
90
+ self.niSync_CalAdjustClk10PhaseVoltage_cfunc = None
91
+ self.niSync_CalAdjustDDSStartPulsePhaseVoltage_cfunc = None
92
+ self.niSync_CalAdjustDDSInitialPhase_cfunc = None
93
+ self.niSync_StartPTP_cfunc = None
94
+ self.niSync_StopPTP_cfunc = None
95
+ self.niSync_Get1588Time_cfunc = None
96
+
97
+ def niSync_init(self, resourceName, IDQuery, resetDevice, vi): # noqa: N802,N803
98
+ with self._func_lock:
99
+ if self.niSync_init_cfunc is None:
100
+ self.niSync_init_cfunc = self._library.niSync_init
101
+ self.niSync_init_cfunc.argtypes = [
102
+ ViRsrc,
103
+ ViBoolean,
104
+ ViBoolean,
105
+ ctypes.POINTER(ViSession),
106
+ ] # noqa: F405
107
+ self.niSync_init_cfunc.restype = ViStatus # noqa: F405
108
+ return self.niSync_init_cfunc(ascii_encode(resourceName), IDQuery, resetDevice, vi)
109
+
110
+ def niSync_close(self, vi): # noqa: N802,N803
111
+ with self._func_lock:
112
+ if self.niSync_close_cfunc is None:
113
+ self.niSync_close_cfunc = self._library.niSync_close
114
+ self.niSync_close_cfunc.argtypes = [ViSession] # noqa: F405
115
+ self.niSync_close_cfunc.restype = ViStatus # noqa: F405
116
+ return self.niSync_close_cfunc(vi)
117
+
118
+ def niSync_GetTimeReferenceNames(self, vi, bufferSize, timeReferenceNames): # noqa: N802,N803
119
+ with self._func_lock:
120
+ if self.niSync_GetTimeReferenceNames_cfunc is None:
121
+ self.niSync_GetTimeReferenceNames_cfunc = self._library.niSync_GetTimeReferenceNames
122
+ self.niSync_GetTimeReferenceNames_cfunc.argtypes = [
123
+ ViSession,
124
+ ViUInt32,
125
+ ctypes.POINTER(ViChar),
126
+ ] # noqa: F405
127
+ self.niSync_GetTimeReferenceNames_cfunc.restype = ViStatus # noqa: F405
128
+ return self.niSync_GetTimeReferenceNames_cfunc(vi, bufferSize, timeReferenceNames)
129
+
130
+ def niSync_error_message(self, vi, errorCode, errorMessage): # noqa: N802,N803
131
+ with self._func_lock:
132
+ if self.niSync_error_message_cfunc is None:
133
+ self.niSync_error_message_cfunc = self._library.niSync_error_message
134
+ self.niSync_error_message_cfunc.argtypes = [
135
+ ViSession,
136
+ ViStatus,
137
+ ctypes.POINTER(ViChar),
138
+ ] # noqa: F405
139
+ self.niSync_error_message_cfunc.restype = ViStatus # noqa: F405
140
+ return self.niSync_error_message_cfunc(vi, errorCode, errorMessage)
141
+
142
+ def niSync_reset(self, vi): # noqa: N802,N803
143
+ with self._func_lock:
144
+ if self.niSync_reset_cfunc is None:
145
+ self.niSync_reset_cfunc = self._library.niSync_reset
146
+ self.niSync_reset_cfunc.argtypes = [ViSession] # noqa: F405
147
+ self.niSync_reset_cfunc.restype = ViStatus # noqa: F405
148
+ return self.niSync_reset_cfunc(vi)
149
+
150
+ def niSync_PersistConfig(self, vi): # noqa: N802,N803
151
+ with self._func_lock:
152
+ if self.niSync_PersistConfig_cfunc is None:
153
+ self.niSync_PersistConfig_cfunc = self._library.niSync_PersistConfig
154
+ self.niSync_PersistConfig_cfunc.argtypes = [ViSession] # noqa: F405
155
+ self.niSync_PersistConfig_cfunc.restype = ViStatus # noqa: F405
156
+ return self.niSync_PersistConfig_cfunc(vi)
157
+
158
+ def niSync_self_test(self, vi, selfTestResult, selfTestMessage): # noqa: N802,N803
159
+ with self._func_lock:
160
+ if self.niSync_self_test_cfunc is None:
161
+ self.niSync_self_test_cfunc = self._library.niSync_self_test
162
+ self.niSync_self_test_cfunc.argtypes = [
163
+ ViSession,
164
+ ctypes.POINTER(ViInt16),
165
+ ctypes.POINTER(ViChar),
166
+ ] # noqa: F405
167
+ self.niSync_self_test_cfunc.restype = ViStatus # noqa: F405
168
+ return self.niSync_self_test_cfunc(vi, selfTestResult, selfTestMessage)
169
+
170
+ def niSync_revision_query(
171
+ self, vi, instrumentDriverRevision, firmwareRevision
172
+ ): # noqa: N802,N803
173
+ with self._func_lock:
174
+ if self.niSync_revision_query_cfunc is None:
175
+ self.niSync_revision_query_cfunc = self._library.niSync_revision_query
176
+ self.niSync_revision_query_cfunc.argtypes = [
177
+ ViSession,
178
+ ctypes.POINTER(ViChar),
179
+ ctypes.POINTER(ViChar),
180
+ ] # noqa: F405
181
+ self.niSync_revision_query_cfunc.restype = ViStatus # noqa: F405
182
+ return self.niSync_revision_query_cfunc(vi, instrumentDriverRevision, firmwareRevision)
183
+
184
+ def niSync_ConfigureFPGA(self, vi, fpgaProgramPath): # noqa: N802,N803
185
+ with self._func_lock:
186
+ if self.niSync_ConfigureFPGA_cfunc is None:
187
+ self.niSync_ConfigureFPGA_cfunc = self._library.niSync_ConfigureFPGA
188
+ self.niSync_ConfigureFPGA_cfunc.argtypes = [ViSession, ViConstString] # noqa: F405
189
+ self.niSync_ConfigureFPGA_cfunc.restype = ViStatus # noqa: F405
190
+ return self.niSync_ConfigureFPGA_cfunc(vi, ascii_encode(fpgaProgramPath))
191
+
192
+ def niSync_ConnectTrigTerminals(
193
+ self, vi, srcTerminal, destTerminal, syncClock, invert, updateEdge
194
+ ): # noqa: N802,N803
195
+ with self._func_lock:
196
+ if self.niSync_ConnectTrigTerminals_cfunc is None:
197
+ self.niSync_ConnectTrigTerminals_cfunc = self._library.niSync_ConnectTrigTerminals
198
+ self.niSync_ConnectTrigTerminals_cfunc.argtypes = [
199
+ ViSession,
200
+ ViConstString,
201
+ ViConstString,
202
+ ViConstString,
203
+ ViInt32,
204
+ ViInt32,
205
+ ] # noqa: F405
206
+ self.niSync_ConnectTrigTerminals_cfunc.restype = ViStatus # noqa: F405
207
+ return self.niSync_ConnectTrigTerminals_cfunc(
208
+ vi,
209
+ ascii_encode(srcTerminal),
210
+ ascii_encode(destTerminal),
211
+ ascii_encode(syncClock),
212
+ invert,
213
+ updateEdge,
214
+ )
215
+
216
+ def niSync_DisconnectTrigTerminals(self, vi, srcTerminal, destTerminal): # noqa: N802,N803
217
+ with self._func_lock:
218
+ if self.niSync_DisconnectTrigTerminals_cfunc is None:
219
+ self.niSync_DisconnectTrigTerminals_cfunc = (
220
+ self._library.niSync_DisconnectTrigTerminals
221
+ )
222
+ self.niSync_DisconnectTrigTerminals_cfunc.argtypes = [
223
+ ViSession,
224
+ ViConstString,
225
+ ViConstString,
226
+ ] # noqa: F405
227
+ self.niSync_DisconnectTrigTerminals_cfunc.restype = ViStatus # noqa: F405
228
+ return self.niSync_DisconnectTrigTerminals_cfunc(
229
+ vi, ascii_encode(srcTerminal), ascii_encode(destTerminal)
230
+ )
231
+
232
+ def niSync_GetTrigTerminalConnectionInfo(
233
+ self, vi, destTerminal, srcTerminal, syncClock, invert, updateEdge
234
+ ): # noqa: N802,N803
235
+ with self._func_lock:
236
+ if self.niSync_GetTrigTerminalConnectionInfo_cfunc is None:
237
+ self.niSync_GetTrigTerminalConnectionInfo_cfunc = (
238
+ self._library.niSync_GetTrigTerminalConnectionInfo
239
+ )
240
+ self.niSync_GetTrigTerminalConnectionInfo_cfunc.argtypes = [
241
+ ViSession,
242
+ ViConstString,
243
+ ctypes.POINTER(ViChar),
244
+ ctypes.POINTER(ViChar),
245
+ ctypes.POINTER(ViInt32),
246
+ ctypes.POINTER(ViInt32),
247
+ ] # noqa: F405
248
+ self.niSync_GetTrigTerminalConnectionInfo_cfunc.restype = ViStatus # noqa: F405
249
+ return self.niSync_GetTrigTerminalConnectionInfo_cfunc(
250
+ vi, ascii_encode(destTerminal), srcTerminal, syncClock, invert, updateEdge
251
+ )
252
+
253
+ def niSync_ConnectSWTrigToTerminal(
254
+ self, vi, srcTerminal, destTerminal, syncClock, invert, updateEdge, delay
255
+ ): # noqa: N802,N803
256
+ with self._func_lock:
257
+ if self.niSync_ConnectSWTrigToTerminal_cfunc is None:
258
+ self.niSync_ConnectSWTrigToTerminal_cfunc = (
259
+ self._library.niSync_ConnectSWTrigToTerminal
260
+ )
261
+ self.niSync_ConnectSWTrigToTerminal_cfunc.argtypes = [
262
+ ViSession,
263
+ ViConstString,
264
+ ViConstString,
265
+ ViConstString,
266
+ ViInt32,
267
+ ViInt32,
268
+ ViReal64,
269
+ ] # noqa: F405
270
+ self.niSync_ConnectSWTrigToTerminal_cfunc.restype = ViStatus # noqa: F405
271
+ return self.niSync_ConnectSWTrigToTerminal_cfunc(
272
+ vi,
273
+ ascii_encode(srcTerminal),
274
+ ascii_encode(destTerminal),
275
+ ascii_encode(syncClock),
276
+ invert,
277
+ updateEdge,
278
+ delay,
279
+ )
280
+
281
+ def niSync_DisconnectSWTrigFromTerminal(self, vi, srcTerminal, destTerminal): # noqa: N802,N803
282
+ with self._func_lock:
283
+ if self.niSync_DisconnectSWTrigFromTerminal_cfunc is None:
284
+ self.niSync_DisconnectSWTrigFromTerminal_cfunc = (
285
+ self._library.niSync_DisconnectSWTrigFromTerminal
286
+ )
287
+ self.niSync_DisconnectSWTrigFromTerminal_cfunc.argtypes = [
288
+ ViSession,
289
+ ViConstString,
290
+ ViConstString,
291
+ ] # noqa: F405
292
+ self.niSync_DisconnectSWTrigFromTerminal_cfunc.restype = ViStatus # noqa: F405
293
+ return self.niSync_DisconnectSWTrigFromTerminal_cfunc(
294
+ vi, ascii_encode(srcTerminal), ascii_encode(destTerminal)
295
+ )
296
+
297
+ def niSync_GetSWTrigConnectionInfo(
298
+ self, vi, destTerminal, srcTerminal, syncClk, invert, updateEdge, delay
299
+ ): # noqa: N802,N803
300
+ with self._func_lock:
301
+ if self.niSync_GetSWTrigConnectionInfo_cfunc is None:
302
+ self.niSync_GetSWTrigConnectionInfo_cfunc = (
303
+ self._library.niSync_GetSWTrigConnectionInfo
304
+ )
305
+ self.niSync_GetSWTrigConnectionInfo_cfunc.argtypes = [
306
+ ViSession,
307
+ ViConstString,
308
+ ctypes.POINTER(ViChar),
309
+ ctypes.POINTER(ViChar),
310
+ ctypes.POINTER(ViInt32),
311
+ ctypes.POINTER(ViInt32),
312
+ ctypes.POINTER(ViReal64),
313
+ ] # noqa: F405
314
+ self.niSync_GetSWTrigConnectionInfo_cfunc.restype = ViStatus # noqa: F405
315
+ return self.niSync_GetSWTrigConnectionInfo_cfunc(
316
+ vi, ascii_encode(destTerminal), srcTerminal, syncClk, invert, updateEdge, delay
317
+ )
318
+
319
+ def niSync_SendSoftwareTrigger(self, vi, srcTerminal): # noqa: N802,N803
320
+ with self._func_lock:
321
+ if self.niSync_SendSoftwareTrigger_cfunc is None:
322
+ self.niSync_SendSoftwareTrigger_cfunc = self._library.niSync_SendSoftwareTrigger
323
+ self.niSync_SendSoftwareTrigger_cfunc.argtypes = [
324
+ ViSession,
325
+ ViConstString,
326
+ ] # noqa: F405
327
+ self.niSync_SendSoftwareTrigger_cfunc.restype = ViStatus # noqa: F405
328
+ return self.niSync_SendSoftwareTrigger_cfunc(vi, ascii_encode(srcTerminal))
329
+
330
+ def niSync_ConnectClkTerminals(self, vi, srcTerminal, destTerminal): # noqa: N802,N803
331
+ with self._func_lock:
332
+ if self.niSync_ConnectClkTerminals_cfunc is None:
333
+ self.niSync_ConnectClkTerminals_cfunc = self._library.niSync_ConnectClkTerminals
334
+ self.niSync_ConnectClkTerminals_cfunc.argtypes = [
335
+ ViSession,
336
+ ViConstString,
337
+ ViConstString,
338
+ ] # noqa: F405
339
+ self.niSync_ConnectClkTerminals_cfunc.restype = ViStatus # noqa: F405
340
+ return self.niSync_ConnectClkTerminals_cfunc(
341
+ vi, ascii_encode(srcTerminal), ascii_encode(destTerminal)
342
+ )
343
+
344
+ def niSync_DisconnectClkTerminals(self, vi, srcTerminal, destTerminal): # noqa: N802,N803
345
+ with self._func_lock:
346
+ if self.niSync_DisconnectClkTerminals_cfunc is None:
347
+ self.niSync_DisconnectClkTerminals_cfunc = (
348
+ self._library.niSync_DisconnectClkTerminals
349
+ )
350
+ self.niSync_DisconnectClkTerminals_cfunc.argtypes = [
351
+ ViSession,
352
+ ViConstString,
353
+ ViConstString,
354
+ ] # noqa: F405
355
+ self.niSync_DisconnectClkTerminals_cfunc.restype = ViStatus # noqa: F405
356
+ return self.niSync_DisconnectClkTerminals_cfunc(
357
+ vi, ascii_encode(srcTerminal), ascii_encode(destTerminal)
358
+ )
359
+
360
+ def niSync_GetClkTerminalConnectionInfo(self, vi, destTerminal, srcTerminal): # noqa: N802,N803
361
+ with self._func_lock:
362
+ if self.niSync_GetClkTerminalConnectionInfo_cfunc is None:
363
+ self.niSync_GetClkTerminalConnectionInfo_cfunc = (
364
+ self._library.niSync_GetClkTerminalConnectionInfo
365
+ )
366
+ self.niSync_GetClkTerminalConnectionInfo_cfunc.argtypes = [
367
+ ViSession,
368
+ ViConstString,
369
+ ctypes.POINTER(ViChar),
370
+ ] # noqa: F405
371
+ self.niSync_GetClkTerminalConnectionInfo_cfunc.restype = ViStatus # noqa: F405
372
+ return self.niSync_GetClkTerminalConnectionInfo_cfunc(
373
+ vi, ascii_encode(destTerminal), srcTerminal
374
+ )
375
+
376
+ def niSync_MeasureFrequency(
377
+ self, vi, srcTerminal, duration, actualDuration, frequency, frequencyError
378
+ ): # noqa: N802,N803
379
+ with self._func_lock:
380
+ if self.niSync_MeasureFrequency_cfunc is None:
381
+ self.niSync_MeasureFrequency_cfunc = self._library.niSync_MeasureFrequency
382
+ self.niSync_MeasureFrequency_cfunc.argtypes = [
383
+ ViSession,
384
+ ViConstString,
385
+ ViReal64,
386
+ ctypes.POINTER(ViReal64),
387
+ ctypes.POINTER(ViReal64),
388
+ ctypes.POINTER(ViReal64),
389
+ ] # noqa: F405
390
+ self.niSync_MeasureFrequency_cfunc.restype = ViStatus # noqa: F405
391
+ return self.niSync_MeasureFrequency_cfunc(
392
+ vi, ascii_encode(srcTerminal), duration, actualDuration, frequency, frequencyError
393
+ )
394
+
395
+ def niSync_MeasureFrequencyEx(
396
+ self, vi, srcTerminal, duration, decimationCount, actualDuration, frequency, frequencyError
397
+ ): # noqa: N802,N803
398
+ with self._func_lock:
399
+ if self.niSync_MeasureFrequencyEx_cfunc is None:
400
+ self.niSync_MeasureFrequencyEx_cfunc = self._library.niSync_MeasureFrequencyEx
401
+ self.niSync_MeasureFrequencyEx_cfunc.argtypes = [
402
+ ViSession,
403
+ ViConstString,
404
+ ViReal64,
405
+ ViUInt32,
406
+ ctypes.POINTER(ViReal64),
407
+ ctypes.POINTER(ViReal64),
408
+ ctypes.POINTER(ViReal64),
409
+ ] # noqa: F405
410
+ self.niSync_MeasureFrequencyEx_cfunc.restype = ViStatus # noqa: F405
411
+ return self.niSync_MeasureFrequencyEx_cfunc(
412
+ vi,
413
+ ascii_encode(srcTerminal),
414
+ duration,
415
+ decimationCount,
416
+ actualDuration,
417
+ frequency,
418
+ frequencyError,
419
+ )
420
+
421
+ def niSync_Start1588(self, vi): # noqa: N802,N803
422
+ with self._func_lock:
423
+ if self.niSync_Start1588_cfunc is None:
424
+ self.niSync_Start1588_cfunc = self._library.niSync_Start1588
425
+ self.niSync_Start1588_cfunc.argtypes = [ViSession] # noqa: F405
426
+ self.niSync_Start1588_cfunc.restype = ViStatus # noqa: F405
427
+ return self.niSync_Start1588_cfunc(vi)
428
+
429
+ def niSync_Stop1588(self, vi): # noqa: N802,N803
430
+ with self._func_lock:
431
+ if self.niSync_Stop1588_cfunc is None:
432
+ self.niSync_Stop1588_cfunc = self._library.niSync_Stop1588
433
+ self.niSync_Stop1588_cfunc.argtypes = [ViSession] # noqa: F405
434
+ self.niSync_Stop1588_cfunc.restype = ViStatus # noqa: F405
435
+ return self.niSync_Stop1588_cfunc(vi)
436
+
437
+ def niSync_SetTime(
438
+ self, vi, timeSource, timeSeconds, timeNanoseconds, timeFractionalNanoseconds
439
+ ): # noqa: N802,N803
440
+ with self._func_lock:
441
+ if self.niSync_SetTime_cfunc is None:
442
+ self.niSync_SetTime_cfunc = self._library.niSync_SetTime
443
+ self.niSync_SetTime_cfunc.argtypes = [
444
+ ViSession,
445
+ ViInt32,
446
+ ViUInt32,
447
+ ViUInt32,
448
+ ViUInt16,
449
+ ] # noqa: F405
450
+ self.niSync_SetTime_cfunc.restype = ViStatus # noqa: F405
451
+ return self.niSync_SetTime_cfunc(
452
+ vi, timeSource, timeSeconds, timeNanoseconds, timeFractionalNanoseconds
453
+ )
454
+
455
+ def niSync_GetTime(
456
+ self, vi, timeSeconds, timeNanoseconds, timeFractionalNanoseconds
457
+ ): # noqa: N802,N803
458
+ with self._func_lock:
459
+ if self.niSync_GetTime_cfunc is None:
460
+ self.niSync_GetTime_cfunc = self._library.niSync_GetTime
461
+ self.niSync_GetTime_cfunc.argtypes = [
462
+ ViSession,
463
+ ctypes.POINTER(ViUInt32),
464
+ ctypes.POINTER(ViUInt32),
465
+ ctypes.POINTER(ViUInt16),
466
+ ] # noqa: F405
467
+ self.niSync_GetTime_cfunc.restype = ViStatus # noqa: F405
468
+ return self.niSync_GetTime_cfunc(
469
+ vi, timeSeconds, timeNanoseconds, timeFractionalNanoseconds
470
+ )
471
+
472
+ def niSync_ResetFrequency(self, vi): # noqa: N802,N803
473
+ with self._func_lock:
474
+ if self.niSync_ResetFrequency_cfunc is None:
475
+ self.niSync_ResetFrequency_cfunc = self._library.niSync_ResetFrequency
476
+ self.niSync_ResetFrequency_cfunc.argtypes = [ViSession] # noqa: F405
477
+ self.niSync_ResetFrequency_cfunc.restype = ViStatus # noqa: F405
478
+ return self.niSync_ResetFrequency_cfunc(vi)
479
+
480
+ def niSync_CreateFutureTimeEvent(
481
+ self, vi, terminal, outputLevel, timeSeconds, timeNanoseconds, timeFractionalNanoseconds
482
+ ): # noqa: N802,N803
483
+ with self._func_lock:
484
+ if self.niSync_CreateFutureTimeEvent_cfunc is None:
485
+ self.niSync_CreateFutureTimeEvent_cfunc = self._library.niSync_CreateFutureTimeEvent
486
+ self.niSync_CreateFutureTimeEvent_cfunc.argtypes = [
487
+ ViSession,
488
+ ViConstString,
489
+ ViInt32,
490
+ ViUInt32,
491
+ ViUInt32,
492
+ ViUInt16,
493
+ ] # noqa: F405
494
+ self.niSync_CreateFutureTimeEvent_cfunc.restype = ViStatus # noqa: F405
495
+ return self.niSync_CreateFutureTimeEvent_cfunc(
496
+ vi,
497
+ ascii_encode(terminal),
498
+ outputLevel,
499
+ timeSeconds,
500
+ timeNanoseconds,
501
+ timeFractionalNanoseconds,
502
+ )
503
+
504
+ def niSync_ClearFutureTimeEvents(self, vi, terminal): # noqa: N802,N803
505
+ with self._func_lock:
506
+ if self.niSync_ClearFutureTimeEvents_cfunc is None:
507
+ self.niSync_ClearFutureTimeEvents_cfunc = self._library.niSync_ClearFutureTimeEvents
508
+ self.niSync_ClearFutureTimeEvents_cfunc.argtypes = [
509
+ ViSession,
510
+ ViConstString,
511
+ ] # noqa: F405
512
+ self.niSync_ClearFutureTimeEvents_cfunc.restype = ViStatus # noqa: F405
513
+ return self.niSync_ClearFutureTimeEvents_cfunc(vi, ascii_encode(terminal))
514
+
515
+ def niSync_EnableTimeStampTrigger(self, vi, terminal, activeEdge): # noqa: N802,N803
516
+ with self._func_lock:
517
+ if self.niSync_EnableTimeStampTrigger_cfunc is None:
518
+ self.niSync_EnableTimeStampTrigger_cfunc = (
519
+ self._library.niSync_EnableTimeStampTrigger
520
+ )
521
+ self.niSync_EnableTimeStampTrigger_cfunc.argtypes = [
522
+ ViSession,
523
+ ViConstString,
524
+ ViInt32,
525
+ ] # noqa: F405
526
+ self.niSync_EnableTimeStampTrigger_cfunc.restype = ViStatus # noqa: F405
527
+ return self.niSync_EnableTimeStampTrigger_cfunc(vi, ascii_encode(terminal), activeEdge)
528
+
529
+ def niSync_EnableTimeStampTriggerWithDecimation(
530
+ self, vi, terminal, activeEdge, decimationCount
531
+ ): # noqa: N802,N803
532
+ with self._func_lock:
533
+ if self.niSync_EnableTimeStampTriggerWithDecimation_cfunc is None:
534
+ self.niSync_EnableTimeStampTriggerWithDecimation_cfunc = (
535
+ self._library.niSync_EnableTimeStampTriggerWithDecimation
536
+ )
537
+ self.niSync_EnableTimeStampTriggerWithDecimation_cfunc.argtypes = [
538
+ ViSession,
539
+ ViConstString,
540
+ ViInt32,
541
+ ViUInt32,
542
+ ] # noqa: F405
543
+ self.niSync_EnableTimeStampTriggerWithDecimation_cfunc.restype = (
544
+ ViStatus # noqa: F405
545
+ )
546
+ return self.niSync_EnableTimeStampTriggerWithDecimation_cfunc(
547
+ vi, ascii_encode(terminal), activeEdge, decimationCount
548
+ )
549
+
550
+ def niSync_ReadTriggerTimeStamp(
551
+ self,
552
+ vi,
553
+ terminal,
554
+ timeout,
555
+ timeSeconds,
556
+ timeNanoseconds,
557
+ timeFractionalNanoseconds,
558
+ detectedEdge,
559
+ ): # noqa: N802,N803
560
+ with self._func_lock:
561
+ if self.niSync_ReadTriggerTimeStamp_cfunc is None:
562
+ self.niSync_ReadTriggerTimeStamp_cfunc = self._library.niSync_ReadTriggerTimeStamp
563
+ self.niSync_ReadTriggerTimeStamp_cfunc.argtypes = [
564
+ ViSession,
565
+ ViConstString,
566
+ ViReal64,
567
+ ctypes.POINTER(ViUInt32),
568
+ ctypes.POINTER(ViUInt32),
569
+ ctypes.POINTER(ViUInt16),
570
+ ctypes.POINTER(ViInt32),
571
+ ] # noqa: F405
572
+ self.niSync_ReadTriggerTimeStamp_cfunc.restype = ViStatus # noqa: F405
573
+ return self.niSync_ReadTriggerTimeStamp_cfunc(
574
+ vi,
575
+ ascii_encode(terminal),
576
+ timeout,
577
+ timeSeconds,
578
+ timeNanoseconds,
579
+ timeFractionalNanoseconds,
580
+ detectedEdge,
581
+ )
582
+
583
+ def niSync_ReadMultipleTriggerTimeStamp(
584
+ self,
585
+ vi,
586
+ terminal,
587
+ timestampsToRead,
588
+ timeout,
589
+ timeSecondsBuffer,
590
+ timeNanosecondsBuffer,
591
+ timeFractionalNanosecondsBuffer,
592
+ detectedEdgeBuffer,
593
+ timestampsRead,
594
+ ): # noqa: N802,N803
595
+ with self._func_lock:
596
+ if self.niSync_ReadMultipleTriggerTimeStamp_cfunc is None:
597
+ self.niSync_ReadMultipleTriggerTimeStamp_cfunc = (
598
+ self._library.niSync_ReadMultipleTriggerTimeStamp
599
+ )
600
+ self.niSync_ReadMultipleTriggerTimeStamp_cfunc.argtypes = [
601
+ ViSession,
602
+ ViConstString,
603
+ ViUInt32,
604
+ ViReal64,
605
+ ctypes.POINTER(ViUInt32),
606
+ ctypes.POINTER(ViUInt32),
607
+ ctypes.POINTER(ViUInt16),
608
+ ctypes.POINTER(ViInt32),
609
+ ctypes.POINTER(ViUInt32),
610
+ ] # noqa: F405
611
+ self.niSync_ReadMultipleTriggerTimeStamp_cfunc.restype = ViStatus # noqa: F405
612
+ return self.niSync_ReadMultipleTriggerTimeStamp_cfunc(
613
+ vi,
614
+ ascii_encode(terminal),
615
+ timestampsToRead,
616
+ timeout,
617
+ timeSecondsBuffer,
618
+ timeNanosecondsBuffer,
619
+ timeFractionalNanosecondsBuffer,
620
+ detectedEdgeBuffer,
621
+ timestampsRead,
622
+ )
623
+
624
+ def niSync_DisableTimeStampTrigger(self, vi, terminal): # noqa: N802,N803
625
+ with self._func_lock:
626
+ if self.niSync_DisableTimeStampTrigger_cfunc is None:
627
+ self.niSync_DisableTimeStampTrigger_cfunc = (
628
+ self._library.niSync_DisableTimeStampTrigger
629
+ )
630
+ self.niSync_DisableTimeStampTrigger_cfunc.argtypes = [
631
+ ViSession,
632
+ ViConstString,
633
+ ] # noqa: F405
634
+ self.niSync_DisableTimeStampTrigger_cfunc.restype = ViStatus # noqa: F405
635
+ return self.niSync_DisableTimeStampTrigger_cfunc(vi, ascii_encode(terminal))
636
+
637
+ def niSync_CreateClock(
638
+ self,
639
+ vi,
640
+ terminal,
641
+ highTicks,
642
+ lowTicks,
643
+ startTimeSeconds,
644
+ startTimeNanoseconds,
645
+ startTimeFractionalNanoseconds,
646
+ stopTimeSeconds,
647
+ stopTimeNanoseconds,
648
+ stopTimeFractionalNanoseconds,
649
+ ): # noqa: N802,N803
650
+ with self._func_lock:
651
+ if self.niSync_CreateClock_cfunc is None:
652
+ self.niSync_CreateClock_cfunc = self._library.niSync_CreateClock
653
+ self.niSync_CreateClock_cfunc.argtypes = [
654
+ ViSession,
655
+ ViConstString,
656
+ ViUInt32,
657
+ ViUInt32,
658
+ ViUInt32,
659
+ ViUInt32,
660
+ ViUInt16,
661
+ ViUInt32,
662
+ ViUInt32,
663
+ ViUInt16,
664
+ ] # noqa: F405
665
+ self.niSync_CreateClock_cfunc.restype = ViStatus # noqa: F405
666
+ return self.niSync_CreateClock_cfunc(
667
+ vi,
668
+ ascii_encode(terminal),
669
+ highTicks,
670
+ lowTicks,
671
+ startTimeSeconds,
672
+ startTimeNanoseconds,
673
+ startTimeFractionalNanoseconds,
674
+ stopTimeSeconds,
675
+ stopTimeNanoseconds,
676
+ stopTimeFractionalNanoseconds,
677
+ )
678
+
679
+ def niSync_ClearClock(self, vi, terminal): # noqa: N802,N803
680
+ with self._func_lock:
681
+ if self.niSync_ClearClock_cfunc is None:
682
+ self.niSync_ClearClock_cfunc = self._library.niSync_ClearClock
683
+ self.niSync_ClearClock_cfunc.argtypes = [ViSession, ViConstString] # noqa: F405
684
+ self.niSync_ClearClock_cfunc.restype = ViStatus # noqa: F405
685
+ return self.niSync_ClearClock_cfunc(vi, ascii_encode(terminal))
686
+
687
+ def niSync_Start8021AS(self, vi): # noqa: N802,N803
688
+ with self._func_lock:
689
+ if self.niSync_Start8021AS_cfunc is None:
690
+ self.niSync_Start8021AS_cfunc = self._library.niSync_Start8021AS
691
+ self.niSync_Start8021AS_cfunc.argtypes = [ViSession] # noqa: F405
692
+ self.niSync_Start8021AS_cfunc.restype = ViStatus # noqa: F405
693
+ return self.niSync_Start8021AS_cfunc(vi)
694
+
695
+ def niSync_Stop8021AS(self, vi): # noqa: N802,N803
696
+ with self._func_lock:
697
+ if self.niSync_Stop8021AS_cfunc is None:
698
+ self.niSync_Stop8021AS_cfunc = self._library.niSync_Stop8021AS
699
+ self.niSync_Stop8021AS_cfunc.argtypes = [ViSession] # noqa: F405
700
+ self.niSync_Stop8021AS_cfunc.restype = ViStatus # noqa: F405
701
+ return self.niSync_Stop8021AS_cfunc(vi)
702
+
703
+ def niSync_SetTimeReferenceFreeRunning(self, vi): # noqa: N802,N803
704
+ with self._func_lock:
705
+ if self.niSync_SetTimeReferenceFreeRunning_cfunc is None:
706
+ self.niSync_SetTimeReferenceFreeRunning_cfunc = (
707
+ self._library.niSync_SetTimeReferenceFreeRunning
708
+ )
709
+ self.niSync_SetTimeReferenceFreeRunning_cfunc.argtypes = [ViSession] # noqa: F405
710
+ self.niSync_SetTimeReferenceFreeRunning_cfunc.restype = ViStatus # noqa: F405
711
+ return self.niSync_SetTimeReferenceFreeRunning_cfunc(vi)
712
+
713
+ def niSync_SetTimeReferenceGPS(self, vi): # noqa: N802,N803
714
+ with self._func_lock:
715
+ if self.niSync_SetTimeReferenceGPS_cfunc is None:
716
+ self.niSync_SetTimeReferenceGPS_cfunc = self._library.niSync_SetTimeReferenceGPS
717
+ self.niSync_SetTimeReferenceGPS_cfunc.argtypes = [ViSession] # noqa: F405
718
+ self.niSync_SetTimeReferenceGPS_cfunc.restype = ViStatus # noqa: F405
719
+ return self.niSync_SetTimeReferenceGPS_cfunc(vi)
720
+
721
+ def niSync_SetTimeReferenceIRIG(self, vi, irigType, terminalName): # noqa: N802,N803
722
+ with self._func_lock:
723
+ if self.niSync_SetTimeReferenceIRIG_cfunc is None:
724
+ self.niSync_SetTimeReferenceIRIG_cfunc = self._library.niSync_SetTimeReferenceIRIG
725
+ self.niSync_SetTimeReferenceIRIG_cfunc.argtypes = [
726
+ ViSession,
727
+ ViInt32,
728
+ ViConstString,
729
+ ] # noqa: F405
730
+ self.niSync_SetTimeReferenceIRIG_cfunc.restype = ViStatus # noqa: F405
731
+ return self.niSync_SetTimeReferenceIRIG_cfunc(vi, irigType, ascii_encode(terminalName))
732
+
733
+ def niSync_SetTimeReferencePPS(
734
+ self,
735
+ vi,
736
+ terminalName,
737
+ useManualTime,
738
+ initialTimeSeconds,
739
+ initialTimeNanoseconds,
740
+ initialTimeFractionalNanoseconds,
741
+ ): # noqa: N802,N803
742
+ with self._func_lock:
743
+ if self.niSync_SetTimeReferencePPS_cfunc is None:
744
+ self.niSync_SetTimeReferencePPS_cfunc = self._library.niSync_SetTimeReferencePPS
745
+ self.niSync_SetTimeReferencePPS_cfunc.argtypes = [
746
+ ViSession,
747
+ ViConstString,
748
+ ViBoolean,
749
+ ViUInt32,
750
+ ViUInt32,
751
+ ViUInt16,
752
+ ] # noqa: F405
753
+ self.niSync_SetTimeReferencePPS_cfunc.restype = ViStatus # noqa: F405
754
+ return self.niSync_SetTimeReferencePPS_cfunc(
755
+ vi,
756
+ ascii_encode(terminalName),
757
+ useManualTime,
758
+ initialTimeSeconds,
759
+ initialTimeNanoseconds,
760
+ initialTimeFractionalNanoseconds,
761
+ )
762
+
763
+ def niSync_SetTimeReference1588OrdinaryClock(self, vi): # noqa: N802,N803
764
+ with self._func_lock:
765
+ if self.niSync_SetTimeReference1588OrdinaryClock_cfunc is None:
766
+ self.niSync_SetTimeReference1588OrdinaryClock_cfunc = (
767
+ self._library.niSync_SetTimeReference1588OrdinaryClock
768
+ )
769
+ self.niSync_SetTimeReference1588OrdinaryClock_cfunc.argtypes = [
770
+ ViSession
771
+ ] # noqa: F405
772
+ self.niSync_SetTimeReference1588OrdinaryClock_cfunc.restype = ViStatus # noqa: F405
773
+ return self.niSync_SetTimeReference1588OrdinaryClock_cfunc(vi)
774
+
775
+ def niSync_SetTimeReference8021AS(self, vi): # noqa: N802,N803
776
+ with self._func_lock:
777
+ if self.niSync_SetTimeReference8021AS_cfunc is None:
778
+ self.niSync_SetTimeReference8021AS_cfunc = (
779
+ self._library.niSync_SetTimeReference8021AS
780
+ )
781
+ self.niSync_SetTimeReference8021AS_cfunc.argtypes = [ViSession] # noqa: F405
782
+ self.niSync_SetTimeReference8021AS_cfunc.restype = ViStatus # noqa: F405
783
+ return self.niSync_SetTimeReference8021AS_cfunc(vi)
784
+
785
+ def niSync_EnableGPSTimestamping(self, vi): # noqa: N802,N803
786
+ with self._func_lock:
787
+ if self.niSync_EnableGPSTimestamping_cfunc is None:
788
+ self.niSync_EnableGPSTimestamping_cfunc = self._library.niSync_EnableGPSTimestamping
789
+ self.niSync_EnableGPSTimestamping_cfunc.argtypes = [ViSession] # noqa: F405
790
+ self.niSync_EnableGPSTimestamping_cfunc.restype = ViStatus # noqa: F405
791
+ return self.niSync_EnableGPSTimestamping_cfunc(vi)
792
+
793
+ def niSync_EnableIRIGTimestamping(self, vi, irigType, terminalName): # noqa: N802,N803
794
+ with self._func_lock:
795
+ if self.niSync_EnableIRIGTimestamping_cfunc is None:
796
+ self.niSync_EnableIRIGTimestamping_cfunc = (
797
+ self._library.niSync_EnableIRIGTimestamping
798
+ )
799
+ self.niSync_EnableIRIGTimestamping_cfunc.argtypes = [
800
+ ViSession,
801
+ ViInt32,
802
+ ViConstString,
803
+ ] # noqa: F405
804
+ self.niSync_EnableIRIGTimestamping_cfunc.restype = ViStatus # noqa: F405
805
+ return self.niSync_EnableIRIGTimestamping_cfunc(vi, irigType, ascii_encode(terminalName))
806
+
807
+ def niSync_ReadLastGPSTimestamp(
808
+ self,
809
+ vi,
810
+ timestampSeconds,
811
+ timestampNanoseconds,
812
+ timestampFractionalNanoseconds,
813
+ gpsSeconds,
814
+ gpsNanoseconds,
815
+ gpsFractionalNanoseconds,
816
+ ): # noqa: N802,N803
817
+ with self._func_lock:
818
+ if self.niSync_ReadLastGPSTimestamp_cfunc is None:
819
+ self.niSync_ReadLastGPSTimestamp_cfunc = self._library.niSync_ReadLastGPSTimestamp
820
+ self.niSync_ReadLastGPSTimestamp_cfunc.argtypes = [
821
+ ViSession,
822
+ ctypes.POINTER(ViUInt32),
823
+ ctypes.POINTER(ViUInt32),
824
+ ctypes.POINTER(ViUInt16),
825
+ ctypes.POINTER(ViUInt32),
826
+ ctypes.POINTER(ViUInt32),
827
+ ctypes.POINTER(ViUInt16),
828
+ ] # noqa: F405
829
+ self.niSync_ReadLastGPSTimestamp_cfunc.restype = ViStatus # noqa: F405
830
+ return self.niSync_ReadLastGPSTimestamp_cfunc(
831
+ vi,
832
+ timestampSeconds,
833
+ timestampNanoseconds,
834
+ timestampFractionalNanoseconds,
835
+ gpsSeconds,
836
+ gpsNanoseconds,
837
+ gpsFractionalNanoseconds,
838
+ )
839
+
840
+ def niSync_ReadLastIRIGTimestamp(
841
+ self,
842
+ vi,
843
+ terminal,
844
+ timestampSeconds,
845
+ timestampNanoseconds,
846
+ timestampFractionalNanoseconds,
847
+ irigbSeconds,
848
+ irigbNanoseconds,
849
+ irigbFractionalNanoseconds,
850
+ ): # noqa: N802,N803
851
+ with self._func_lock:
852
+ if self.niSync_ReadLastIRIGTimestamp_cfunc is None:
853
+ self.niSync_ReadLastIRIGTimestamp_cfunc = self._library.niSync_ReadLastIRIGTimestamp
854
+ self.niSync_ReadLastIRIGTimestamp_cfunc.argtypes = [
855
+ ViSession,
856
+ ViConstString,
857
+ ctypes.POINTER(ViUInt32),
858
+ ctypes.POINTER(ViUInt32),
859
+ ctypes.POINTER(ViUInt16),
860
+ ctypes.POINTER(ViUInt32),
861
+ ctypes.POINTER(ViUInt32),
862
+ ctypes.POINTER(ViUInt16),
863
+ ] # noqa: F405
864
+ self.niSync_ReadLastIRIGTimestamp_cfunc.restype = ViStatus # noqa: F405
865
+ return self.niSync_ReadLastIRIGTimestamp_cfunc(
866
+ vi,
867
+ ascii_encode(terminal),
868
+ timestampSeconds,
869
+ timestampNanoseconds,
870
+ timestampFractionalNanoseconds,
871
+ irigbSeconds,
872
+ irigbNanoseconds,
873
+ irigbFractionalNanoseconds,
874
+ )
875
+
876
+ def niSync_DisableGPSTimestamping(self, vi): # noqa: N802,N803
877
+ with self._func_lock:
878
+ if self.niSync_DisableGPSTimestamping_cfunc is None:
879
+ self.niSync_DisableGPSTimestamping_cfunc = (
880
+ self._library.niSync_DisableGPSTimestamping
881
+ )
882
+ self.niSync_DisableGPSTimestamping_cfunc.argtypes = [ViSession] # noqa: F405
883
+ self.niSync_DisableGPSTimestamping_cfunc.restype = ViStatus # noqa: F405
884
+ return self.niSync_DisableGPSTimestamping_cfunc(vi)
885
+
886
+ def niSync_DisableIRIGTimestamping(self, vi, terminalName): # noqa: N802,N803
887
+ with self._func_lock:
888
+ if self.niSync_DisableIRIGTimestamping_cfunc is None:
889
+ self.niSync_DisableIRIGTimestamping_cfunc = (
890
+ self._library.niSync_DisableIRIGTimestamping
891
+ )
892
+ self.niSync_DisableIRIGTimestamping_cfunc.argtypes = [
893
+ ViSession,
894
+ ViConstString,
895
+ ] # noqa: F405
896
+ self.niSync_DisableIRIGTimestamping_cfunc.restype = ViStatus # noqa: F405
897
+ return self.niSync_DisableIRIGTimestamping_cfunc(vi, ascii_encode(terminalName))
898
+
899
+ def niSync_GetVelocity(self, vi, eastVelocity, northVelocity, upVelocity): # noqa: N802,N803
900
+ with self._func_lock:
901
+ if self.niSync_GetVelocity_cfunc is None:
902
+ self.niSync_GetVelocity_cfunc = self._library.niSync_GetVelocity
903
+ self.niSync_GetVelocity_cfunc.argtypes = [
904
+ ViSession,
905
+ ctypes.POINTER(ViReal64),
906
+ ctypes.POINTER(ViReal64),
907
+ ctypes.POINTER(ViReal64),
908
+ ] # noqa: F405
909
+ self.niSync_GetVelocity_cfunc.restype = ViStatus # noqa: F405
910
+ return self.niSync_GetVelocity_cfunc(vi, eastVelocity, northVelocity, upVelocity)
911
+
912
+ def niSync_GetLocation(self, vi, latitude, longitude, altitude): # noqa: N802,N803
913
+ with self._func_lock:
914
+ if self.niSync_GetLocation_cfunc is None:
915
+ self.niSync_GetLocation_cfunc = self._library.niSync_GetLocation
916
+ self.niSync_GetLocation_cfunc.argtypes = [
917
+ ViSession,
918
+ ctypes.POINTER(ViReal64),
919
+ ctypes.POINTER(ViReal64),
920
+ ctypes.POINTER(ViReal64),
921
+ ] # noqa: F405
922
+ self.niSync_GetLocation_cfunc.restype = ViStatus # noqa: F405
923
+ return self.niSync_GetLocation_cfunc(vi, latitude, longitude, altitude)
924
+
925
+ def niSync_GetAttributeViInt32(self, vi, activeItem, attribute, value): # noqa: N802,N803
926
+ with self._func_lock:
927
+ if self.niSync_GetAttributeViInt32_cfunc is None:
928
+ self.niSync_GetAttributeViInt32_cfunc = self._library.niSync_GetAttributeViInt32
929
+ self.niSync_GetAttributeViInt32_cfunc.argtypes = [
930
+ ViSession,
931
+ ViConstString,
932
+ ViAttr,
933
+ ctypes.POINTER(ViInt32),
934
+ ] # noqa: F405
935
+ self.niSync_GetAttributeViInt32_cfunc.restype = ViStatus # noqa: F405
936
+ return self.niSync_GetAttributeViInt32_cfunc(vi, ascii_encode(activeItem), attribute, value)
937
+
938
+ def niSync_GetAttributeViReal64(self, vi, activeItem, attribute, value): # noqa: N802,N803
939
+ with self._func_lock:
940
+ if self.niSync_GetAttributeViReal64_cfunc is None:
941
+ self.niSync_GetAttributeViReal64_cfunc = self._library.niSync_GetAttributeViReal64
942
+ self.niSync_GetAttributeViReal64_cfunc.argtypes = [
943
+ ViSession,
944
+ ViConstString,
945
+ ViAttr,
946
+ ctypes.POINTER(ViReal64),
947
+ ] # noqa: F405
948
+ self.niSync_GetAttributeViReal64_cfunc.restype = ViStatus # noqa: F405
949
+ return self.niSync_GetAttributeViReal64_cfunc(
950
+ vi, ascii_encode(activeItem), attribute, value
951
+ )
952
+
953
+ def niSync_GetAttributeViBoolean(self, vi, activeItem, attribute, value): # noqa: N802,N803
954
+ with self._func_lock:
955
+ if self.niSync_GetAttributeViBoolean_cfunc is None:
956
+ self.niSync_GetAttributeViBoolean_cfunc = self._library.niSync_GetAttributeViBoolean
957
+ self.niSync_GetAttributeViBoolean_cfunc.argtypes = [
958
+ ViSession,
959
+ ViConstString,
960
+ ViAttr,
961
+ ctypes.POINTER(ViBoolean),
962
+ ] # noqa: F405
963
+ self.niSync_GetAttributeViBoolean_cfunc.restype = ViStatus # noqa: F405
964
+ return self.niSync_GetAttributeViBoolean_cfunc(
965
+ vi, ascii_encode(activeItem), attribute, value
966
+ )
967
+
968
+ def niSync_GetAttributeViString(
969
+ self, vi, activeItem, attribute, bufferSize, value
970
+ ): # noqa: N802,N803
971
+ with self._func_lock:
972
+ if self.niSync_GetAttributeViString_cfunc is None:
973
+ self.niSync_GetAttributeViString_cfunc = self._library.niSync_GetAttributeViString
974
+ self.niSync_GetAttributeViString_cfunc.argtypes = [
975
+ ViSession,
976
+ ViConstString,
977
+ ViAttr,
978
+ ViInt32,
979
+ ctypes.POINTER(ViChar),
980
+ ] # noqa: F405
981
+ self.niSync_GetAttributeViString_cfunc.restype = ViStatus # noqa: F405
982
+ return self.niSync_GetAttributeViString_cfunc(
983
+ vi, ascii_encode(activeItem), attribute, bufferSize, value
984
+ )
985
+
986
+ def niSync_SetAttributeViInt32(self, vi, activeItem, attribute, value): # noqa: N802,N803
987
+ with self._func_lock:
988
+ if self.niSync_SetAttributeViInt32_cfunc is None:
989
+ self.niSync_SetAttributeViInt32_cfunc = self._library.niSync_SetAttributeViInt32
990
+ self.niSync_SetAttributeViInt32_cfunc.argtypes = [
991
+ ViSession,
992
+ ViConstString,
993
+ ViAttr,
994
+ ViInt32,
995
+ ] # noqa: F405
996
+ self.niSync_SetAttributeViInt32_cfunc.restype = ViStatus # noqa: F405
997
+ return self.niSync_SetAttributeViInt32_cfunc(vi, ascii_encode(activeItem), attribute, value)
998
+
999
+ def niSync_SetAttributeViReal64(self, vi, activeItem, attribute, value): # noqa: N802,N803
1000
+ with self._func_lock:
1001
+ if self.niSync_SetAttributeViReal64_cfunc is None:
1002
+ self.niSync_SetAttributeViReal64_cfunc = self._library.niSync_SetAttributeViReal64
1003
+ self.niSync_SetAttributeViReal64_cfunc.argtypes = [
1004
+ ViSession,
1005
+ ViConstString,
1006
+ ViAttr,
1007
+ ViReal64,
1008
+ ] # noqa: F405
1009
+ self.niSync_SetAttributeViReal64_cfunc.restype = ViStatus # noqa: F405
1010
+ return self.niSync_SetAttributeViReal64_cfunc(
1011
+ vi, ascii_encode(activeItem), attribute, value
1012
+ )
1013
+
1014
+ def niSync_SetAttributeViBoolean(self, vi, activeItem, attribute, value): # noqa: N802,N803
1015
+ with self._func_lock:
1016
+ if self.niSync_SetAttributeViBoolean_cfunc is None:
1017
+ self.niSync_SetAttributeViBoolean_cfunc = self._library.niSync_SetAttributeViBoolean
1018
+ self.niSync_SetAttributeViBoolean_cfunc.argtypes = [
1019
+ ViSession,
1020
+ ViConstString,
1021
+ ViAttr,
1022
+ ViBoolean,
1023
+ ] # noqa: F405
1024
+ self.niSync_SetAttributeViBoolean_cfunc.restype = ViStatus # noqa: F405
1025
+ return self.niSync_SetAttributeViBoolean_cfunc(
1026
+ vi, ascii_encode(activeItem), attribute, value
1027
+ )
1028
+
1029
+ def niSync_SetAttributeViString(self, vi, activeItem, attribute, value): # noqa: N802,N803
1030
+ with self._func_lock:
1031
+ if self.niSync_SetAttributeViString_cfunc is None:
1032
+ self.niSync_SetAttributeViString_cfunc = self._library.niSync_SetAttributeViString
1033
+ self.niSync_SetAttributeViString_cfunc.argtypes = [
1034
+ ViSession,
1035
+ ViConstString,
1036
+ ViAttr,
1037
+ ViConstString,
1038
+ ] # noqa: F405
1039
+ self.niSync_SetAttributeViString_cfunc.restype = ViStatus # noqa: F405
1040
+ return self.niSync_SetAttributeViString_cfunc(
1041
+ vi, ascii_encode(activeItem), attribute, ascii_encode(value)
1042
+ )
1043
+
1044
+ def niSync_GetExtCalLastDateAndTime(
1045
+ self, vi, year, month, day, hour, minute
1046
+ ): # noqa: N802,N803
1047
+ with self._func_lock:
1048
+ if self.niSync_GetExtCalLastDateAndTime_cfunc is None:
1049
+ self.niSync_GetExtCalLastDateAndTime_cfunc = (
1050
+ self._library.niSync_GetExtCalLastDateAndTime
1051
+ )
1052
+ self.niSync_GetExtCalLastDateAndTime_cfunc.argtypes = [
1053
+ ViSession,
1054
+ ctypes.POINTER(ViInt32),
1055
+ ctypes.POINTER(ViInt32),
1056
+ ctypes.POINTER(ViInt32),
1057
+ ctypes.POINTER(ViInt32),
1058
+ ctypes.POINTER(ViInt32),
1059
+ ] # noqa: F405
1060
+ self.niSync_GetExtCalLastDateAndTime_cfunc.restype = ViStatus # noqa: F405
1061
+ return self.niSync_GetExtCalLastDateAndTime_cfunc(vi, year, month, day, hour, minute)
1062
+
1063
+ def niSync_GetExtCalLastTemp(self, vi, temp): # noqa: N802,N803
1064
+ with self._func_lock:
1065
+ if self.niSync_GetExtCalLastTemp_cfunc is None:
1066
+ self.niSync_GetExtCalLastTemp_cfunc = self._library.niSync_GetExtCalLastTemp
1067
+ self.niSync_GetExtCalLastTemp_cfunc.argtypes = [
1068
+ ViSession,
1069
+ ctypes.POINTER(ViReal64),
1070
+ ] # noqa: F405
1071
+ self.niSync_GetExtCalLastTemp_cfunc.restype = ViStatus # noqa: F405
1072
+ return self.niSync_GetExtCalLastTemp_cfunc(vi, temp)
1073
+
1074
+ def niSync_GetExtCalRecommendedInterval(self, vi, months): # noqa: N802,N803
1075
+ with self._func_lock:
1076
+ if self.niSync_GetExtCalRecommendedInterval_cfunc is None:
1077
+ self.niSync_GetExtCalRecommendedInterval_cfunc = (
1078
+ self._library.niSync_GetExtCalRecommendedInterval
1079
+ )
1080
+ self.niSync_GetExtCalRecommendedInterval_cfunc.argtypes = [
1081
+ ViSession,
1082
+ ctypes.POINTER(ViInt32),
1083
+ ] # noqa: F405
1084
+ self.niSync_GetExtCalRecommendedInterval_cfunc.restype = ViStatus # noqa: F405
1085
+ return self.niSync_GetExtCalRecommendedInterval_cfunc(vi, months)
1086
+
1087
+ def niSync_ChangeExtCalPassword(self, vi, oldPassword, newPassword): # noqa: N802,N803
1088
+ with self._func_lock:
1089
+ if self.niSync_ChangeExtCalPassword_cfunc is None:
1090
+ self.niSync_ChangeExtCalPassword_cfunc = self._library.niSync_ChangeExtCalPassword
1091
+ self.niSync_ChangeExtCalPassword_cfunc.argtypes = [
1092
+ ViSession,
1093
+ ViConstString,
1094
+ ViConstString,
1095
+ ] # noqa: F405
1096
+ self.niSync_ChangeExtCalPassword_cfunc.restype = ViStatus # noqa: F405
1097
+ return self.niSync_ChangeExtCalPassword_cfunc(
1098
+ vi, ascii_encode(oldPassword), ascii_encode(newPassword)
1099
+ )
1100
+
1101
+ def niSync_ReadCurrentTemperature(self, vi, temperature): # noqa: N802,N803
1102
+ with self._func_lock:
1103
+ if self.niSync_ReadCurrentTemperature_cfunc is None:
1104
+ self.niSync_ReadCurrentTemperature_cfunc = (
1105
+ self._library.niSync_ReadCurrentTemperature
1106
+ )
1107
+ self.niSync_ReadCurrentTemperature_cfunc.argtypes = [
1108
+ ViSession,
1109
+ ctypes.POINTER(ViReal64),
1110
+ ] # noqa: F405
1111
+ self.niSync_ReadCurrentTemperature_cfunc.restype = ViStatus # noqa: F405
1112
+ return self.niSync_ReadCurrentTemperature_cfunc(vi, temperature)
1113
+
1114
+ def niSync_CalGetOscillatorVoltage(self, vi, voltage): # noqa: N802,N803
1115
+ with self._func_lock:
1116
+ if self.niSync_CalGetOscillatorVoltage_cfunc is None:
1117
+ self.niSync_CalGetOscillatorVoltage_cfunc = (
1118
+ self._library.niSync_CalGetOscillatorVoltage
1119
+ )
1120
+ self.niSync_CalGetOscillatorVoltage_cfunc.argtypes = [
1121
+ ViSession,
1122
+ ctypes.POINTER(ViReal64),
1123
+ ] # noqa: F405
1124
+ self.niSync_CalGetOscillatorVoltage_cfunc.restype = ViStatus # noqa: F405
1125
+ return self.niSync_CalGetOscillatorVoltage_cfunc(vi, voltage)
1126
+
1127
+ def niSync_CalGetClk10PhaseVoltage(self, vi, voltage): # noqa: N802,N803
1128
+ with self._func_lock:
1129
+ if self.niSync_CalGetClk10PhaseVoltage_cfunc is None:
1130
+ self.niSync_CalGetClk10PhaseVoltage_cfunc = (
1131
+ self._library.niSync_CalGetClk10PhaseVoltage
1132
+ )
1133
+ self.niSync_CalGetClk10PhaseVoltage_cfunc.argtypes = [
1134
+ ViSession,
1135
+ ctypes.POINTER(ViReal64),
1136
+ ] # noqa: F405
1137
+ self.niSync_CalGetClk10PhaseVoltage_cfunc.restype = ViStatus # noqa: F405
1138
+ return self.niSync_CalGetClk10PhaseVoltage_cfunc(vi, voltage)
1139
+
1140
+ def niSync_CalGetDDSStartPulsePhaseVoltage(self, vi, voltage): # noqa: N802,N803
1141
+ with self._func_lock:
1142
+ if self.niSync_CalGetDDSStartPulsePhaseVoltage_cfunc is None:
1143
+ self.niSync_CalGetDDSStartPulsePhaseVoltage_cfunc = (
1144
+ self._library.niSync_CalGetDDSStartPulsePhaseVoltage
1145
+ )
1146
+ self.niSync_CalGetDDSStartPulsePhaseVoltage_cfunc.argtypes = [
1147
+ ViSession,
1148
+ ctypes.POINTER(ViReal64),
1149
+ ] # noqa: F405
1150
+ self.niSync_CalGetDDSStartPulsePhaseVoltage_cfunc.restype = ViStatus # noqa: F405
1151
+ return self.niSync_CalGetDDSStartPulsePhaseVoltage_cfunc(vi, voltage)
1152
+
1153
+ def niSync_CalGetDDSInitialPhase(self, vi, phase): # noqa: N802,N803
1154
+ with self._func_lock:
1155
+ if self.niSync_CalGetDDSInitialPhase_cfunc is None:
1156
+ self.niSync_CalGetDDSInitialPhase_cfunc = self._library.niSync_CalGetDDSInitialPhase
1157
+ self.niSync_CalGetDDSInitialPhase_cfunc.argtypes = [
1158
+ ViSession,
1159
+ ctypes.POINTER(ViReal64),
1160
+ ] # noqa: F405
1161
+ self.niSync_CalGetDDSInitialPhase_cfunc.restype = ViStatus # noqa: F405
1162
+ return self.niSync_CalGetDDSInitialPhase_cfunc(vi, phase)
1163
+
1164
+ def niSync_InitExtCal(self, resourceName, password, extCalVi): # noqa: N802,N803
1165
+ with self._func_lock:
1166
+ if self.niSync_InitExtCal_cfunc is None:
1167
+ self.niSync_InitExtCal_cfunc = self._library.niSync_InitExtCal
1168
+ self.niSync_InitExtCal_cfunc.argtypes = [
1169
+ ViRsrc,
1170
+ ViConstString,
1171
+ ctypes.POINTER(ViSession),
1172
+ ] # noqa: F405
1173
+ self.niSync_InitExtCal_cfunc.restype = ViStatus # noqa: F405
1174
+ return self.niSync_InitExtCal_cfunc(
1175
+ ascii_encode(resourceName), ascii_encode(password), extCalVi
1176
+ )
1177
+
1178
+ def niSync_CloseExtCal(self, extCalVi, action): # noqa: N802,N803
1179
+ with self._func_lock:
1180
+ if self.niSync_CloseExtCal_cfunc is None:
1181
+ self.niSync_CloseExtCal_cfunc = self._library.niSync_CloseExtCal
1182
+ self.niSync_CloseExtCal_cfunc.argtypes = [ViSession, ViInt32] # noqa: F405
1183
+ self.niSync_CloseExtCal_cfunc.restype = ViStatus # noqa: F405
1184
+ return self.niSync_CloseExtCal_cfunc(extCalVi, action)
1185
+
1186
+ def niSync_CalAdjustOscillatorVoltage(
1187
+ self, extCalVi, measuredVoltage, oldVoltage
1188
+ ): # noqa: N802,N803
1189
+ with self._func_lock:
1190
+ if self.niSync_CalAdjustOscillatorVoltage_cfunc is None:
1191
+ self.niSync_CalAdjustOscillatorVoltage_cfunc = (
1192
+ self._library.niSync_CalAdjustOscillatorVoltage
1193
+ )
1194
+ self.niSync_CalAdjustOscillatorVoltage_cfunc.argtypes = [
1195
+ ViSession,
1196
+ ViReal64,
1197
+ ctypes.POINTER(ViReal64),
1198
+ ] # noqa: F405
1199
+ self.niSync_CalAdjustOscillatorVoltage_cfunc.restype = ViStatus # noqa: F405
1200
+ return self.niSync_CalAdjustOscillatorVoltage_cfunc(extCalVi, measuredVoltage, oldVoltage)
1201
+
1202
+ def niSync_CalAdjustClk10PhaseVoltage(
1203
+ self, extCalVi, measuredVoltage, oldVoltage
1204
+ ): # noqa: N802,N803
1205
+ with self._func_lock:
1206
+ if self.niSync_CalAdjustClk10PhaseVoltage_cfunc is None:
1207
+ self.niSync_CalAdjustClk10PhaseVoltage_cfunc = (
1208
+ self._library.niSync_CalAdjustClk10PhaseVoltage
1209
+ )
1210
+ self.niSync_CalAdjustClk10PhaseVoltage_cfunc.argtypes = [
1211
+ ViSession,
1212
+ ViReal64,
1213
+ ctypes.POINTER(ViReal64),
1214
+ ] # noqa: F405
1215
+ self.niSync_CalAdjustClk10PhaseVoltage_cfunc.restype = ViStatus # noqa: F405
1216
+ return self.niSync_CalAdjustClk10PhaseVoltage_cfunc(extCalVi, measuredVoltage, oldVoltage)
1217
+
1218
+ def niSync_CalAdjustDDSStartPulsePhaseVoltage(
1219
+ self, extCalVi, measuredVoltage, oldVoltage
1220
+ ): # noqa: N802,N803
1221
+ with self._func_lock:
1222
+ if self.niSync_CalAdjustDDSStartPulsePhaseVoltage_cfunc is None:
1223
+ self.niSync_CalAdjustDDSStartPulsePhaseVoltage_cfunc = (
1224
+ self._library.niSync_CalAdjustDDSStartPulsePhaseVoltage
1225
+ )
1226
+ self.niSync_CalAdjustDDSStartPulsePhaseVoltage_cfunc.argtypes = [
1227
+ ViSession,
1228
+ ViReal64,
1229
+ ctypes.POINTER(ViReal64),
1230
+ ] # noqa: F405
1231
+ self.niSync_CalAdjustDDSStartPulsePhaseVoltage_cfunc.restype = (
1232
+ ViStatus # noqa: F405
1233
+ )
1234
+ return self.niSync_CalAdjustDDSStartPulsePhaseVoltage_cfunc(
1235
+ extCalVi, measuredVoltage, oldVoltage
1236
+ )
1237
+
1238
+ def niSync_CalAdjustDDSInitialPhase(self, extCalVi, measuredPhase, oldPhase): # noqa: N802,N803
1239
+ with self._func_lock:
1240
+ if self.niSync_CalAdjustDDSInitialPhase_cfunc is None:
1241
+ self.niSync_CalAdjustDDSInitialPhase_cfunc = (
1242
+ self._library.niSync_CalAdjustDDSInitialPhase
1243
+ )
1244
+ self.niSync_CalAdjustDDSInitialPhase_cfunc.argtypes = [
1245
+ ViSession,
1246
+ ViReal64,
1247
+ ctypes.POINTER(ViReal64),
1248
+ ] # noqa: F405
1249
+ self.niSync_CalAdjustDDSInitialPhase_cfunc.restype = ViStatus # noqa: F405
1250
+ return self.niSync_CalAdjustDDSInitialPhase_cfunc(extCalVi, measuredPhase, oldPhase)
1251
+
1252
+ def niSync_StartPTP(
1253
+ self,
1254
+ vi,
1255
+ initialTimeSource,
1256
+ initialTimeSeconds,
1257
+ initialTimeNanoseconds,
1258
+ initialTimeFractionalNanoseconds,
1259
+ ): # noqa: N802,N803
1260
+ with self._func_lock:
1261
+ if self.niSync_StartPTP_cfunc is None:
1262
+ self.niSync_StartPTP_cfunc = self._library.niSync_StartPTP
1263
+ self.niSync_StartPTP_cfunc.argtypes = [
1264
+ ViSession,
1265
+ ViInt32,
1266
+ ViUInt32,
1267
+ ViUInt32,
1268
+ ViUInt16,
1269
+ ] # noqa: F405
1270
+ self.niSync_StartPTP_cfunc.restype = ViStatus # noqa: F405
1271
+ return self.niSync_StartPTP_cfunc(
1272
+ vi,
1273
+ initialTimeSource,
1274
+ initialTimeSeconds,
1275
+ initialTimeNanoseconds,
1276
+ initialTimeFractionalNanoseconds,
1277
+ )
1278
+
1279
+ def niSync_StopPTP(self, vi): # noqa: N802,N803
1280
+ with self._func_lock:
1281
+ if self.niSync_StopPTP_cfunc is None:
1282
+ self.niSync_StopPTP_cfunc = self._library.niSync_StopPTP
1283
+ self.niSync_StopPTP_cfunc.argtypes = [ViSession] # noqa: F405
1284
+ self.niSync_StopPTP_cfunc.restype = ViStatus # noqa: F405
1285
+ return self.niSync_StopPTP_cfunc(vi)
1286
+
1287
+ def niSync_Get1588Time(
1288
+ self, vi, timeSeconds, timeNanoseconds, timeFractionalNanoseconds
1289
+ ): # noqa: N802,N803
1290
+ with self._func_lock:
1291
+ if self.niSync_Get1588Time_cfunc is None:
1292
+ self.niSync_Get1588Time_cfunc = self._library.niSync_Get1588Time
1293
+ self.niSync_Get1588Time_cfunc.argtypes = [
1294
+ ViSession,
1295
+ ctypes.POINTER(ViUInt32),
1296
+ ctypes.POINTER(ViUInt32),
1297
+ ctypes.POINTER(ViUInt16),
1298
+ ] # noqa: F405
1299
+ self.niSync_Get1588Time_cfunc.restype = ViStatus # noqa: F405
1300
+ return self.niSync_Get1588Time_cfunc(
1301
+ vi, timeSeconds, timeNanoseconds, timeFractionalNanoseconds
1302
+ )