ioThinx_4530_API.py
Go to the documentation of this file.
1 import ctypes
2 from datetime import datetime
3 import os
4 import serial
5 
6 BIN_TYPE = 2
7 SLOT_CH_NUM = 16
8 
9 
10 def check_c_api_version(device_c_api_version, support_c_api_version):
11  device_version_array = device_c_api_version.split(".")
12  support_version_array = support_c_api_version.split(".")
13  if len(support_version_array) != 3:
14  return "support_c_api_version error"
15  if len(device_version_array) != 3:
16  return "device_c_api_version error"
17 
18  version_fail = device_c_api_version + ">" + support_c_api_version
19 
20  if device_version_array == support_version_array:
21  return None
22 
23  for i in range(3):
24  if device_version_array[i] < support_version_array[i]:
25  return None
26  else:
27  return version_fail
28 
29 
30 class ioThinxError(Exception):
31  def __init__(self, value):
32  self.value = value
33 
34  def __str__(self):
35  error = ["ok",
36  "init fail",
37  "wrong slot settings",
38  "wrong argument",
39  "wrong config",
40  "wrong range"
41  ]
42  return repr(error[self.value])
43 
44 
45 class ioThinx_4530_API(object):
46  def __init__(self):
47  super(ioThinx_4530_API, self).__init__()
48  self.c_api_version = "2.0.0"
49  self.shared_library_dir = "/usr/lib/iothinx/"
50  self.shared_library_filename = "libiothinxio.so"
51 
52  error = check_c_api_version(
53  device_c_api_version=self.get_shared_library_version(),
54  support_c_api_version=self.c_api_version
55  )
56  if error != None:
57  raise AssertionError(error)
58 
59  shared_library = self.shared_library_dir + self.shared_library_filename
60  self.lib = ctypes.cdll.LoadLibrary(shared_library)
62 
64  for file in os.listdir(self.shared_library_dir):
65  if self.shared_library_filename in file and len(file.split(".")) == 5:
66  return(str(".".join(file.split(".")[2:5])))
67 
69  error = self.lib.ioThinx_IO_Client_Init(None)
70  if error != 0:
71  raise ioThinxError(error)
72 
74  p_status = ctypes.c_uint8()
75  error = self.lib.ioThinx_IO_GetBusStatus(ctypes.byref(p_status))
76  if error != 0:
77  raise ioThinxError(error)
78  return p_status.value
79 
81  error = self.lib.ioThinx_IO_Config_Reload(None)
82  if error != 0:
83  raise ioThinxError(error)
84 
85 #
86 # DI
87 #
88 
89  def ioThinx_DI_GetValues(self, slot):
90  p_values = ctypes.c_uint32()
91  error = self.lib.ioThinx_DI_GetValues(ctypes.c_uint32(slot),
92  ctypes.byref(p_values))
93  if error != 0:
94  raise ioThinxError(error)
95  values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
96  return values
97 
98  def ioThinx_DI_GetCntValues(self, slot, start, count):
99  buff = (ctypes.c_uint32 * count)()
100  error = self.lib.ioThinx_DI_GetCntValues(ctypes.c_uint32(slot),
101  ctypes.c_uint8(start),
102  ctypes.c_uint8(count),
103  ctypes.byref(buff))
104  if error != 0:
105  raise ioThinxError(error)
106  buff_list = []
107  for value in buff:
108  buff_list.append(value)
109  return buff_list
110 
111  def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list):
112  buff = (ctypes.c_uint32 * count)(*buff_list)
113  error = self.lib.ioThinx_DI_SetCntValues(ctypes.c_uint32(slot),
114  ctypes.c_uint8(start),
115  ctypes.c_uint8(count),
116  ctypes.byref(buff))
117  if error != 0:
118  raise ioThinxError(error)
119 
120  def ioThinx_DI_GetCntStarts(self, slot):
121  p_starts = ctypes.c_uint32()
122  error = self.lib.ioThinx_DI_GetCntStarts(ctypes.c_uint32(slot),
123  ctypes.byref(p_starts))
124  if error != 0:
125  raise ioThinxError(error)
126  starts = [int(b) for b in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
127  return starts
128 
129  def ioThinx_DI_SetCntStarts(self, slot, buff_list):
130  starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
131  error = self.lib.ioThinx_DI_SetCntStarts(ctypes.c_uint32(slot),
132  ctypes.c_uint32(starts))
133  if error != 0:
134  raise ioThinxError(error)
135 
136  def ioThinx_DI_SetCntStops(self, slot, buff_list):
137  starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
138  error = self.lib.ioThinx_DI_SetCntStops(ctypes.c_uint32(slot),
139  ctypes.c_uint32(starts))
140  if error != 0:
141  raise ioThinxError(error)
142 
143  def ioThinx_DI_GetCntOverflows(self, slot):
144  p_overflows = ctypes.c_uint32()
145  error = self.lib.ioThinx_DI_GetCntOverflows(ctypes.c_uint32(slot),
146  ctypes.byref(p_overflows))
147  if error != 0:
148  raise ioThinxError(error)
149  overflows = [int(b) for b in bin(p_overflows.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
150  return overflows
151 
152  def ioThinx_DI_SetCntOverflows(self, slot, buff_list):
153  overflows = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
154  error = self.lib.ioThinx_DI_SetCntOverflows(ctypes.c_uint32(slot),
155  ctypes.c_uint32(overflows))
156  if error != 0:
157  raise ioThinxError(error)
158 
159  def ioThinx_DI_Config_GetModes(self, slot, start, count):
160  buff = (ctypes.c_uint8 * count)()
161  error = self.lib.ioThinx_DI_Config_GetModes(ctypes.c_uint32(slot),
162  ctypes.c_uint8(start),
163  ctypes.c_uint8(count),
164  ctypes.byref(buff))
165  if error != 0:
166  raise ioThinxError(error)
167  buff_list = []
168  for value in buff:
169  buff_list.append(value)
170  return buff_list
171 
172  def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list):
173  buff = (ctypes.c_uint8 * count)(*buff_list)
174  error = self.lib.ioThinx_DI_Config_SetModes(ctypes.c_uint32(slot),
175  ctypes.c_uint8(start),
176  ctypes.c_uint8(count),
177  ctypes.byref(buff))
178  if error != 0:
179  raise ioThinxError(error)
180 
181  def ioThinx_DI_Config_GetFilters(self, slot, start, count):
182  buff = (ctypes.c_uint16 * count)()
183  error = self.lib.ioThinx_DI_Config_GetFilters(ctypes.c_uint32(slot),
184  ctypes.c_uint8(start),
185  ctypes.c_uint8(count),
186  ctypes.byref(buff))
187  if error != 0:
188  raise ioThinxError(error)
189  buff_list = []
190  for value in buff:
191  buff_list.append(value)
192  return buff_list
193 
194  def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list):
195  buff = (ctypes.c_uint16 * count)(*buff_list)
196  error = self.lib.ioThinx_DI_Config_SetFilters(ctypes.c_uint32(slot),
197  ctypes.c_uint8(start),
198  ctypes.c_uint8(count),
199  ctypes.byref(buff))
200  if error != 0:
201  raise ioThinxError(error)
202 
203  def ioThinx_DI_Config_GetCntTriggers(self, slot, start, count):
204  buff = (ctypes.c_uint8 * count)()
205  error = self.lib.ioThinx_DI_Config_GetCntTriggers(ctypes.c_uint32(slot),
206  ctypes.c_uint8(start),
207  ctypes.c_uint8(count),
208  ctypes.byref(buff))
209  if error != 0:
210  raise ioThinxError(error)
211  buff_list = []
212  for value in buff:
213  buff_list.append(value)
214  return buff_list
215 
216  def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list):
217  buff = (ctypes.c_uint8 * count)(*buff_list)
218  error = self.lib.ioThinx_DI_Config_SetCntTriggers(ctypes.c_uint32(slot),
219  ctypes.c_uint8(start),
220  ctypes.c_uint8(count),
221  ctypes.byref(buff))
222  if error != 0:
223  raise ioThinxError(error)
224 
225  def ioThinx_DI_Config_GetCntValues(self, slot, start, count):
226  buff = (ctypes.c_uint32 * count)()
227  error = self.lib.ioThinx_DI_Config_GetCntValues(ctypes.c_uint32(slot),
228  ctypes.c_uint8(start),
229  ctypes.c_uint8(count),
230  ctypes.byref(buff))
231  if error != 0:
232  raise ioThinxError(error)
233  buff_list = []
234  for value in buff:
235  buff_list.append(value)
236  return buff_list
237 
238  def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list):
239  buff = (ctypes.c_uint32 * count)(*buff_list)
240  error = self.lib.ioThinx_DI_Config_SetCntValues(ctypes.c_uint32(slot),
241  ctypes.c_uint8(start),
242  ctypes.c_uint8(count),
243  ctypes.byref(buff))
244  if error != 0:
245  raise ioThinxError(error)
246 #
247 # DO
248 #
249 
250  def ioThinx_DO_GetValues(self, slot):
251  p_values = ctypes.c_uint32()
252  error = self.lib.ioThinx_DO_GetValues(ctypes.c_uint32(slot),
253  ctypes.byref(p_values))
254  if error != 0:
255  raise ioThinxError(error)
256  values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
257  return values
258 
259  def ioThinx_DO_SetValues(self, slot, buff_list):
260  values = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
261  error = self.lib.ioThinx_DO_SetValues(ctypes.c_uint32(slot),
262  ctypes.c_uint32(values))
263  if error != 0:
264  raise ioThinxError(error)
265 
266  def ioThinx_DO_GetPwmCounts(self, slot, start, count):
267  buff = (ctypes.c_uint32 * count)()
268  error = self.lib.ioThinx_DO_GetPwmCounts(ctypes.c_uint32(slot),
269  ctypes.c_uint8(start),
270  ctypes.c_uint8(count),
271  ctypes.byref(buff))
272  if error != 0:
273  raise ioThinxError(error)
274  buff_list = []
275  for value in buff:
276  buff_list.append(value)
277  return buff_list
278 
279  def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list):
280  buff = (ctypes.c_uint32 * count)(*buff_list)
281  error = self.lib.ioThinx_DO_SetPwmCounts(ctypes.c_uint32(slot),
282  ctypes.c_uint8(start),
283  ctypes.c_uint8(count),
284  ctypes.byref(buff))
285  if error != 0:
286  raise ioThinxError(error)
287 
288  def ioThinx_DO_GetPwmStarts(self, slot):
289  p_starts = ctypes.c_uint32()
290  error = self.lib.ioThinx_DO_GetPwmStarts(ctypes.c_uint32(slot),
291  ctypes.byref(p_starts))
292  if error != 0:
293  raise ioThinxError(error)
294  starts = [int(b) for b in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
295  return starts
296 
297  def ioThinx_DO_SetPwmStarts(self, slot, buff_list):
298  starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
299  error = self.lib.ioThinx_DO_SetPwmStarts(ctypes.c_uint32(slot),
300  ctypes.c_uint32(starts))
301  if error != 0:
302  raise ioThinxError(error)
303 
304  def ioThinx_DO_SetPwmStops(self, slot, buff_list):
305  stops = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
306  error = self.lib.ioThinx_DO_SetPwmStops(ctypes.c_uint32(slot),
307  ctypes.c_uint32(stops))
308  if error != 0:
309  raise ioThinxError(error)
310 
311  def ioThinx_DO_GetPwmConfigures(self, slot, start, count):
312  frequencies_buff = (ctypes.c_uint16 * count)()
313  duty_cycles_buff = (ctypes.c_uint16 * count)()
314  error = self.lib.ioThinx_DO_GetPwmConfigures(ctypes.c_uint32(slot),
315  ctypes.c_uint8(start),
316  ctypes.c_uint8(count),
317  ctypes.byref(frequencies_buff),
318  ctypes.byref(duty_cycles_buff))
319  if error != 0:
320  raise ioThinxError(error)
321 
322  frequencies_buff_list = []
323  for value in frequencies_buff:
324  frequencies_buff_list.append(value)
325  duty_cycles_buff_list = []
326  for value in duty_cycles_buff:
327  duty_cycles_buff_list.append(value)
328  return frequencies_buff_list, duty_cycles_buff_list
329 
330  def ioThinx_DO_SetPwmConfigures(self, slot, start, count,
331  frequencies_buff_list,
332  duty_cycles_buff_list):
333  frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
334  duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
335  error = self.lib.ioThinx_DO_SetPwmConfigures(ctypes.c_uint32(slot),
336  ctypes.c_uint8(start),
337  ctypes.c_uint8(count),
338  ctypes.byref(frequencies_buff),
339  ctypes.byref(duty_cycles_buff))
340  if error != 0:
341  raise ioThinxError(error)
342 
343  def ioThinx_DO_Config_GetModes(self, slot, start, count):
344  buff = (ctypes.c_uint8 * count)()
345  error = self.lib.ioThinx_DO_Config_GetModes(ctypes.c_uint32(slot),
346  ctypes.c_uint8(start),
347  ctypes.c_uint8(count),
348  ctypes.byref(buff))
349  if error != 0:
350  raise ioThinxError(error)
351  buff_list = []
352  for value in buff:
353  buff_list.append(value)
354  return buff_list
355 
356  def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list):
357  buff = (ctypes.c_uint8 * count)(*buff_list)
358  error = self.lib.ioThinx_DO_Config_SetModes(ctypes.c_uint32(slot),
359  ctypes.c_uint8(start),
360  ctypes.c_uint8(count),
361  ctypes.byref(buff))
362  if error != 0:
363  raise ioThinxError(error)
364 
365  def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count):
366  buff = (ctypes.c_uint32 * count)()
367  error = self.lib.ioThinx_DO_Config_GetPwmCounts(ctypes.c_uint32(slot),
368  ctypes.c_uint8(start),
369  ctypes.c_uint8(count),
370  ctypes.byref(buff))
371  if error != 0:
372  raise ioThinxError(error)
373  buff_list = []
374  for value in buff:
375  buff_list.append(value)
376  return buff_list
377 
378  def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list):
379  buff = (ctypes.c_uint32 * count)(*buff_list)
380  error = self.lib.ioThinx_DO_Config_SetPwmCounts(ctypes.c_uint32(slot),
381  ctypes.c_uint8(start),
382  ctypes.c_uint8(count),
383  ctypes.byref(buff))
384  if error != 0:
385  raise ioThinxError(error)
386 
387  def ioThinx_DO_Config_GetPwmConfigures(self, slot, start, count):
388  frequencies_buff = (ctypes.c_uint16 * count)()
389  duty_cycles_buff = (ctypes.c_uint16 * count)()
390  error = self.lib.ioThinx_DO_Config_GetPwmConfigures(ctypes.c_uint32(slot),
391  ctypes.c_uint8(start),
392  ctypes.c_uint8(count),
393  ctypes.byref(frequencies_buff),
394  ctypes.byref(duty_cycles_buff))
395  if error != 0:
396  raise ioThinxError(error)
397 
398  frequencies_buff_list = []
399  for value in frequencies_buff:
400  frequencies_buff_list.append(value)
401  duty_cycles_buff_list = []
402  for value in duty_cycles_buff:
403  duty_cycles_buff_list.append(value)
404 
405  return frequencies_buff_list, duty_cycles_buff_list
406 
407  def ioThinx_DO_Config_SetPwmConfigures(self, slot, start, count,
408  frequencies_buff_list,
409  duty_cycles_buff_list):
410  frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
411  duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
412  error = self.lib.ioThinx_DO_Config_SetPwmConfigures(ctypes.c_uint32(slot),
413  ctypes.c_uint8(start),
414  ctypes.c_uint8(count),
415  ctypes.byref(frequencies_buff),
416  ctypes.byref(duty_cycles_buff))
417  if error != 0:
418  raise ioThinxError(error)
419 
420  def ioThinx_Relay_GetValues(self, slot):
421  p_values = ctypes.c_uint32()
422  error = self.lib.ioThinx_Relay_GetValues(ctypes.c_uint32(slot),
423  ctypes.byref(p_values))
424  if error != 0:
425  raise ioThinxError(error)
426  values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
427  return values
428 
429  def ioThinx_Relay_SetValues(self, slot, buff_list):
430  values = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
431  error = self.lib.ioThinx_Relay_SetValues(ctypes.c_uint32(slot),
432  ctypes.c_uint32(values))
433  if error != 0:
434  raise ioThinxError(error)
435 
436  def ioThinx_Relay_GetTotalCounts(self, slot, start, count):
437  buff = (ctypes.c_uint32 * count)()
438  error = self.lib.ioThinx_Relay_GetTotalCounts(ctypes.c_uint32(slot),
439  ctypes.c_uint8(start),
440  ctypes.c_uint8(count),
441  ctypes.byref(buff))
442  if error != 0:
443  raise ioThinxError(error)
444  buff_list = []
445  for value in buff:
446  buff_list.append(value)
447  return buff_list
448 
449  def ioThinx_Relay_GetCurrentCounts(self, slot, start, count):
450  buff = (ctypes.c_uint32 * count)()
451  error = self.lib.ioThinx_Relay_GetCurrentCounts(ctypes.c_uint32(slot),
452  ctypes.c_uint8(start),
453  ctypes.c_uint8(count),
454  ctypes.byref(buff))
455  if error != 0:
456  raise ioThinxError(error)
457  buff_list = []
458  for value in buff:
459  buff_list.append(value)
460  return buff_list
461 
462  def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list):
463  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
464  error = self.lib.ioThinx_Relay_ResetCurrentCounts(ctypes.c_uint32(slot),
465  ctypes.c_uint32(resets))
466  if error != 0:
467  raise ioThinxError(error)
468 
469  def ioThinx_AI_GetEngs(self, slot, start, count):
470  buff = (ctypes.c_float * count)()
471  error = self.lib.ioThinx_AI_GetEngs(ctypes.c_uint32(slot),
472  ctypes.c_uint8(start),
473  ctypes.c_uint8(count),
474  ctypes.byref(buff))
475  if error != 0:
476  raise ioThinxError(error)
477  buff_list = []
478  for value in buff:
479  buff_list.append(value)
480  return buff_list
481 
482  def ioThinx_AI_GetMinEngs(self, slot, start, count):
483  buff = (ctypes.c_float * count)()
484  error = self.lib.ioThinx_AI_GetMinEngs(ctypes.c_uint32(slot),
485  ctypes.c_uint8(start),
486  ctypes.c_uint8(count),
487  ctypes.byref(buff))
488  if error != 0:
489  raise ioThinxError(error)
490  buff_list = []
491  for value in buff:
492  buff_list.append(value)
493  return buff_list
494 
495  def ioThinx_AI_GetMaxEngs(self, slot, start, count):
496  buff = (ctypes.c_float * count)()
497  error = self.lib.ioThinx_AI_GetMaxEngs(ctypes.c_uint32(slot),
498  ctypes.c_uint8(start),
499  ctypes.c_uint8(count),
500  ctypes.byref(buff))
501  if error != 0:
502  raise ioThinxError(error)
503  buff_list = []
504  for value in buff:
505  buff_list.append(value)
506  return buff_list
507 
508  def ioThinx_AI_GetRaws(self, slot, start, count):
509  buff = (ctypes.c_uint32 * count)()
510  error = self.lib.ioThinx_AI_GetRaws(ctypes.c_uint32(slot),
511  ctypes.c_uint8(start),
512  ctypes.c_uint8(count),
513  ctypes.byref(buff))
514  if error != 0:
515  raise ioThinxError(error)
516  buff_list = []
517  for value in buff:
518  buff_list.append(value)
519  return buff_list
520 
521  def ioThinx_AI_GetMinRaws(self, slot, start, count):
522  buff = (ctypes.c_uint32 * count)()
523  error = self.lib.ioThinx_AI_GetMinRaws(ctypes.c_uint32(slot),
524  ctypes.c_uint8(start),
525  ctypes.c_uint8(count),
526  ctypes.byref(buff))
527  if error != 0:
528  raise ioThinxError(error)
529  buff_list = []
530  for value in buff:
531  buff_list.append(value)
532  return buff_list
533 
534  def ioThinx_AI_GetMaxRaws(self, slot, start, count):
535  buff = (ctypes.c_uint32 * count)()
536  error = self.lib.ioThinx_AI_GetMaxRaws(ctypes.c_uint32(slot),
537  ctypes.c_uint8(start),
538  ctypes.c_uint8(count),
539  ctypes.byref(buff))
540  if error != 0:
541  raise ioThinxError(error)
542  buff_list = []
543  for value in buff:
544  buff_list.append(value)
545  return buff_list
546 
547  def ioThinx_AI_ResetMins(self, slot, buff_list):
548  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
549  error = self.lib.ioThinx_AI_ResetMins(ctypes.c_uint32(slot),
550  ctypes.c_uint32(resets))
551  if error != 0:
552  raise ioThinxError(error)
553 
554  def ioThinx_AI_ResetMaxs(self, slot, buff_list):
555  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
556  error = self.lib.ioThinx_AI_ResetMaxs(ctypes.c_uint32(slot),
557  ctypes.c_uint32(resets))
558  if error != 0:
559  raise ioThinxError(error)
560 
561  def ioThinx_AI_GetStatuss(self, slot, start, count):
562  buff = (ctypes.c_uint8 * count)()
563  error = self.lib.ioThinx_AI_GetStatuss(ctypes.c_uint32(slot),
564  ctypes.c_uint8(start),
565  ctypes.c_uint8(count),
566  ctypes.byref(buff))
567  if error != 0:
568  raise ioThinxError(error)
569  buff_list = []
570  for value in buff:
571  buff_list.append(value)
572  return buff_list
573 
574  def ioThinx_AI_Config_GetRanges(self, slot, start, count):
575  buff = (ctypes.c_uint8 * count)()
576  error = self.lib.ioThinx_AI_Config_GetRanges(ctypes.c_uint32(slot),
577  ctypes.c_uint8(start),
578  ctypes.c_uint8(count),
579  ctypes.byref(buff))
580  if error != 0:
581  raise ioThinxError(error)
582  buff_list = []
583  for value in buff:
584  buff_list.append(value)
585  return buff_list
586 
587  def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list):
588  buff = (ctypes.c_uint8 * count)(*buff_list)
589  error = self.lib.ioThinx_AI_Config_SetRanges(ctypes.c_uint32(slot),
590  ctypes.c_uint8(start),
591  ctypes.c_uint8(count),
592  ctypes.byref(buff))
593  if error != 0:
594  raise ioThinxError(error)
595 
596  def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, count):
597  buff = (ctypes.c_float * count)()
598  error = self.lib.ioThinx_AI_Config_GetBurnoutValues(ctypes.c_uint32(slot),
599  ctypes.c_uint8(start),
600  ctypes.c_uint8(count),
601  ctypes.byref(buff))
602  if error != 0:
603  raise ioThinxError(error)
604  buff_list = []
605  for value in buff:
606  buff_list.append(value)
607  return buff_list
608 
609  def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list):
610  buff = (ctypes.c_float * count)(*buff_list)
611  error = self.lib.ioThinx_AI_Config_SetBurnoutValues(ctypes.c_uint32(slot),
612  ctypes.c_uint8(start),
613  ctypes.c_uint8(count),
614  ctypes.byref(buff))
615  if error != 0:
616  raise ioThinxError(error)
617 
618  def ioThinx_AO_GetEngs(self, slot, start, count):
619  buff = (ctypes.c_float * count)()
620  error = self.lib.ioThinx_AO_GetEngs(ctypes.c_uint32(slot),
621  ctypes.c_uint8(start),
622  ctypes.c_uint8(count),
623  ctypes.byref(buff))
624  if error != 0:
625  raise ioThinxError(error)
626  buff_list = []
627  for value in buff:
628  buff_list.append(value)
629  return buff_list
630 
631  def ioThinx_AO_SetEngs(self, slot, start, count, buff_list):
632  buff = (ctypes.c_float * count)(*buff_list)
633  error = self.lib.ioThinx_AO_SetEngs(ctypes.c_uint32(slot),
634  ctypes.c_uint8(start),
635  ctypes.c_uint8(count),
636  ctypes.byref(buff))
637  if error != 0:
638  raise ioThinxError(error)
639 
640  def ioThinx_AO_GetRaws(self, slot, start, count):
641  buff = (ctypes.c_uint16 * count)()
642  error = self.lib.ioThinx_AO_GetRaws(ctypes.c_uint32(slot),
643  ctypes.c_uint8(start),
644  ctypes.c_uint8(count),
645  ctypes.byref(buff))
646  if error != 0:
647  raise ioThinxError(error)
648  buff_list = []
649  for value in buff:
650  buff_list.append(value)
651  return buff_list
652 
653  def ioThinx_AO_SetRaws(self, slot, start, count, buff_list):
654  buff = (ctypes.c_uint16 * count)(*buff_list)
655  error = self.lib.ioThinx_AO_SetRaws(ctypes.c_uint32(slot),
656  ctypes.c_uint8(start),
657  ctypes.c_uint8(count),
658  ctypes.byref(buff))
659  if error != 0:
660  raise ioThinxError(error)
661 
662  def ioThinx_AO_GetStatuss(self, slot, start, count):
663  buff = (ctypes.c_uint8 * count)()
664  error = self.lib.ioThinx_AO_GetStatuss(ctypes.c_uint32(slot),
665  ctypes.c_uint8(start),
666  ctypes.c_uint8(count),
667  ctypes.byref(buff))
668  if error != 0:
669  raise ioThinxError(error)
670  buff_list = []
671  for value in buff:
672  buff_list.append(value)
673  return buff_list
674 
675  def ioThinx_AO_Config_GetRanges(self, slot, start, count):
676  buff = (ctypes.c_uint8 * count)()
677  error = self.lib.ioThinx_AO_Config_GetRanges(ctypes.c_uint32(slot),
678  ctypes.c_uint8(start),
679  ctypes.c_uint8(count),
680  ctypes.byref(buff))
681  if error != 0:
682  raise ioThinxError(error)
683  buff_list = []
684  for value in buff:
685  buff_list.append(value)
686  return buff_list
687 
688  def ioThinx_AO_Config_SetRanges(self, slot, start, count, buff_list):
689  buff = (ctypes.c_uint8 * count)(*buff_list)
690  error = self.lib.ioThinx_AO_Config_SetRanges(ctypes.c_uint32(slot),
691  ctypes.c_uint8(start),
692  ctypes.c_uint8(count),
693  ctypes.byref(buff))
694  if error != 0:
695  raise ioThinxError(error)
696 
697  def ioThinx_TC_GetValues(self, slot, start, count):
698  buff = (ctypes.c_float * count)()
699  error = self.lib.ioThinx_TC_GetValues(ctypes.c_uint32(slot),
700  ctypes.c_uint8(start),
701  ctypes.c_uint8(count),
702  ctypes.byref(buff))
703  if error != 0:
704  raise ioThinxError(error)
705  buff_list = []
706  for value in buff:
707  buff_list.append(value)
708  return buff_list
709 
710  def ioThinx_TC_GetMinValues(self, slot, start, count):
711  buff = (ctypes.c_float * count)()
712  error = self.lib.ioThinx_TC_GetMinValues(ctypes.c_uint32(slot),
713  ctypes.c_uint8(start),
714  ctypes.c_uint8(count),
715  ctypes.byref(buff))
716  if error != 0:
717  raise ioThinxError(error)
718  buff_list = []
719  for value in buff:
720  buff_list.append(value)
721  return buff_list
722 
723  def ioThinx_TC_GetMaxValues(self, slot, start, count):
724  buff = (ctypes.c_float * count)()
725  error = self.lib.ioThinx_TC_GetMaxValues(ctypes.c_uint32(slot),
726  ctypes.c_uint8(start),
727  ctypes.c_uint8(count),
728  ctypes.byref(buff))
729  if error != 0:
730  raise ioThinxError(error)
731  buff_list = []
732  for value in buff:
733  buff_list.append(value)
734  return buff_list
735 
736  def ioThinx_TC_ResetMins(self, slot, buff_list):
737  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
738  error = self.lib.ioThinx_TC_ResetMins(ctypes.c_uint32(slot),
739  ctypes.c_uint32(resets))
740  if error != 0:
741  raise ioThinxError(error)
742 
743  def ioThinx_TC_ResetMaxs(self, slot, buff_list):
744  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
745  error = self.lib.ioThinx_TC_ResetMaxs(ctypes.c_uint32(slot),
746  ctypes.c_uint32(resets))
747  if error != 0:
748  raise ioThinxError(error)
749 
750  def ioThinx_TC_GetStatuss(self, slot, start, count):
751  buff = (ctypes.c_uint8 * count)()
752  error = self.lib.ioThinx_TC_GetStatuss(ctypes.c_uint32(slot),
753  ctypes.c_uint8(start),
754  ctypes.c_uint8(count),
755  ctypes.byref(buff))
756  if error != 0:
757  raise ioThinxError(error)
758  buff_list = []
759  for value in buff:
760  buff_list.append(value)
761  return buff_list
762 
763  def ioThinx_TC_SetCalibrations(self, slot, start, count, buff_list):
764  buff = (ctypes.c_float * count)(*buff_list)
765  error = self.lib.ioThinx_TC_SetCalibrations(ctypes.c_uint32(slot),
766  ctypes.c_uint8(start),
767  ctypes.c_uint8(count),
768  ctypes.byref(buff))
769  if error != 0:
770  raise ioThinxError(error)
771 
772  def ioThinx_TC_ResetCalibrations(self, slot, start, count):
773  error = self.lib.ioThinx_TC_ResetCalibrations(ctypes.c_uint32(slot),
774  ctypes.c_uint8(start),
775  ctypes.c_uint8(count))
776  if error != 0:
777  raise ioThinxError(error)
778 
779  def ioThinx_TC_Config_GetSensorTypes(self, slot, start, count):
780  buff = (ctypes.c_uint8 * count)()
781  error = self.lib.ioThinx_TC_Config_GetSensorTypes(ctypes.c_uint32(slot),
782  ctypes.c_uint8(start),
783  ctypes.c_uint8(count),
784  ctypes.byref(buff))
785  if error != 0:
786  raise ioThinxError(error)
787  buff_list = []
788  for value in buff:
789  buff_list.append(value)
790  return buff_list
791 
792  def ioThinx_TC_Config_SetSensorTypes(self, slot, start, count, buff_list):
793  buff = (ctypes.c_uint8 * count)(*buff_list)
794  error = self.lib.ioThinx_TC_Config_SetSensorTypes(ctypes.c_uint32(slot),
795  ctypes.c_uint8(start),
796  ctypes.c_uint8(count),
797  ctypes.byref(buff))
798  if error != 0:
799  raise ioThinxError(error)
800 
801  def ioThinx_RTD_GetValues(self, slot, start, count):
802  buff = (ctypes.c_float * count)()
803  error = self.lib.ioThinx_RTD_GetValues(ctypes.c_uint32(slot),
804  ctypes.c_uint8(start),
805  ctypes.c_uint8(count),
806  ctypes.byref(buff))
807  if error != 0:
808  raise ioThinxError(error)
809  buff_list = []
810  for value in buff:
811  buff_list.append(value)
812  return buff_list
813 
814  def ioThinx_RTD_GetMinValues(self, slot, start, count):
815  buff = (ctypes.c_float * count)()
816  error = self.lib.ioThinx_RTD_GetMinValues(ctypes.c_uint32(slot),
817  ctypes.c_uint8(start),
818  ctypes.c_uint8(count),
819  ctypes.byref(buff))
820  if error != 0:
821  raise ioThinxError(error)
822  buff_list = []
823  for value in buff:
824  buff_list.append(value)
825  return buff_list
826 
827  def ioThinx_RTD_GetMaxValues(self, slot, start, count):
828  buff = (ctypes.c_float * count)()
829  error = self.lib.ioThinx_RTD_GetMaxValues(ctypes.c_uint32(slot),
830  ctypes.c_uint8(start),
831  ctypes.c_uint8(count),
832  ctypes.byref(buff))
833  if error != 0:
834  raise ioThinxError(error)
835  buff_list = []
836  for value in buff:
837  buff_list.append(value)
838  return buff_list
839 
840  def ioThinx_RTD_ResetMins(self, slot, buff_list):
841  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
842  error = self.lib.ioThinx_RTD_ResetMins(ctypes.c_uint32(slot),
843  ctypes.c_uint32(resets))
844  if error != 0:
845  raise ioThinxError(error)
846 
847  def ioThinx_RTD_ResetMaxs(self, slot, buff_list):
848  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
849  error = self.lib.ioThinx_RTD_ResetMaxs(ctypes.c_uint32(slot),
850  ctypes.c_uint32(resets))
851  if error != 0:
852  raise ioThinxError(error)
853 
854  def ioThinx_RTD_GetStatuss(self, slot, start, count):
855  buff = (ctypes.c_uint8 * count)()
856  error = self.lib.ioThinx_RTD_GetStatuss(ctypes.c_uint32(slot),
857  ctypes.c_uint8(start),
858  ctypes.c_uint8(count),
859  ctypes.byref(buff))
860  if error != 0:
861  raise ioThinxError(error)
862  buff_list = []
863  for value in buff:
864  buff_list.append(value)
865  return buff_list
866 
867  def ioThinx_RTD_SetCalibrations(self, slot, start, count, buff_list):
868  buff = (ctypes.c_float * count)(*buff_list)
869  error = self.lib.ioThinx_RTD_SetCalibrations(ctypes.c_uint32(slot),
870  ctypes.c_uint8(start),
871  ctypes.c_uint8(count),
872  ctypes.byref(buff))
873  if error != 0:
874  raise ioThinxError(error)
875 
876  def ioThinx_RTD_ResetCalibrations(self, slot, start, count):
877  error = self.lib.ioThinx_RTD_ResetCalibrations(ctypes.c_uint32(slot),
878  ctypes.c_uint8(start),
879  ctypes.c_uint8(count))
880  if error != 0:
881  raise ioThinxError(error)
882 
883  def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count):
884  buff = (ctypes.c_uint8 * count)()
885  error = self.lib.ioThinx_RTD_Config_GetSensorTypes(ctypes.c_uint32(slot),
886  ctypes.c_uint8(start),
887  ctypes.c_uint8(count),
888  ctypes.byref(buff))
889  if error != 0:
890  raise ioThinxError(error)
891  buff_list = []
892  for value in buff:
893  buff_list.append(value)
894  return buff_list
895 
896  def ioThinx_RTD_Config_SetSensorTypes(self, slot, start, count, buff_list):
897  buff = (ctypes.c_uint8 * count)(*buff_list)
898  error = self.lib.ioThinx_RTD_Config_SetSensorTypes(ctypes.c_uint32(slot),
899  ctypes.c_uint8(start),
900  ctypes.c_uint8(count),
901  ctypes.byref(buff))
902  if error != 0:
903  raise ioThinxError(error)
904 
905 #
906 # PWR
907 #
908 
909  def ioThinx_PWR_GetSysStatus(self, slot, start, count):
910  buff = (ctypes.c_uint8 * count)()
911  error = self.lib.ioThinx_PWR_GetSysStatus(ctypes.c_uint32(slot),
912  ctypes.c_uint8(start),
913  ctypes.c_uint8(count),
914  ctypes.byref(buff))
915  if error != 0:
916  raise ioThinxError(error)
917  buff_list = []
918  for value in buff:
919  buff_list.append(value)
920  return buff_list
921 
922  def ioThinx_PWR_GetFieldStatus(self, slot, start, count):
923  buff = (ctypes.c_uint8 * count)()
924  error = self.lib.ioThinx_PWR_GetFieldStatus(ctypes.c_uint32(slot),
925  ctypes.c_uint8(start),
926  ctypes.c_uint8(count),
927  ctypes.byref(buff))
928  if error != 0:
929  raise ioThinxError(error)
930  buff_list = []
931  for value in buff:
932  buff_list.append(value)
933  return buff_list
934 
935  def ioThinx_PWR_Config_GetAlarms(self, slot, start, count):
936  buff = (ctypes.c_float * count)()
937  error = self.lib.ioThinx_PWR_Config_GetAlarms(ctypes.c_uint32(slot),
938  ctypes.c_uint8(start),
939  ctypes.c_uint8(count),
940  ctypes.byref(buff))
941  if error != 0:
942  raise ioThinxError(error)
943  buff_list = []
944  for value in buff:
945  buff_list.append(value)
946  return buff_list
947 
948  def ioThinx_PWR_Config_SetAlarms(self, slot, start, count, buff_list):
949  buff = (ctypes.c_float * count)(*buff_list)
950  error = self.lib.ioThinx_PWR_Config_SetAlarms(ctypes.c_uint32(slot),
951  ctypes.c_uint8(start),
952  ctypes.c_uint8(count),
953  ctypes.byref(buff))
954  if error != 0:
955  raise ioThinxError(error)
956 
957 #
958 # Misc
959 #
960 
961  def ioThinx_Misc_GetModuleInfo(self, slot):
962  class MODULE_INFO(ctypes.Structure):
963  _fields_ = [('model_name', (ctypes.c_uint8 * 20)),
964  ('product_id', ctypes.c_uint32),
965  ('fwr_version', ctypes.c_uint16),
966  ('fwr_build_date', ctypes.c_uint32),
967  ('serial_number', (ctypes.c_uint8 * 13))]
968 
969  p_module_info = MODULE_INFO()
970  error = self.lib.ioThinx_Misc_GetModuleInfo(ctypes.c_uint8(slot),
971  ctypes.byref(p_module_info))
972  if error != 0:
973  raise ioThinxError(error)
974 
975  def convert_build_date_from_hex_to_datetime():
976  build_date = hex(p_module_info.fwr_build_date).strip('0x').strip('L')
977  build_date = ['{:02d}'.format(int(build_date[i:i + 2], 16)) for i in range(0, len(build_date), BIN_TYPE)]
978  build_date = datetime.strptime("".join(build_date), '%y%m%d%H')
979  return build_date
980  fwr_build_date = convert_build_date_from_hex_to_datetime()
981 
982  module_info = {
983  'model_name': str(bytearray(p_module_info.model_name).decode().rstrip('\x00')),
984  'product_id': hex(p_module_info.product_id).rstrip("L"),
985  'fwr_version': hex(p_module_info.fwr_version),
986  'fwr_build_date': fwr_build_date,
987  'serial_number': str(bytearray(p_module_info.serial_number).decode().rstrip('\x00')),
988  }
989  return module_info
990 
992  class MODULE_INFO(ctypes.Structure):
993  _fields_ = [('model_name', (ctypes.c_uint8 * 20)),
994  ('product_id', ctypes.c_uint32),
995  ('fwr_version', ctypes.c_uint16),
996  ('fwr_build_date', ctypes.c_uint32),
997  ('serial_number', (ctypes.c_uint8 * 13))]
998 
999  p_module_info = MODULE_INFO()
1000  error = self.lib.ioThinx_Misc_GetModuleInfoML(ctypes.c_uint8(slot),
1001  ctypes.byref(p_module_info))
1002  if error != 0:
1003  raise ioThinxError(error)
1004 
1005  def convert_build_date_from_hex_to_datetime():
1006  build_date = hex(p_module_info.fwr_build_date).strip('0x').strip('L')
1007  build_date = ['{:02d}'.format(int(build_date[i:i + 2], 16)) for i in range(0, len(build_date), BIN_TYPE)]
1008  build_date = datetime.strptime("".join(build_date), '%y%m%d%H')
1009  return build_date
1010  fwr_build_date = convert_build_date_from_hex_to_datetime()
1011 
1012  module_info = {
1013  'model_name': str(bytearray(p_module_info.model_name).decode().rstrip('\x00')),
1014  'product_id': hex(p_module_info.product_id).rstrip("L"),
1015  'fwr_version': hex(p_module_info.fwr_version),
1016  'fwr_build_date': fwr_build_date,
1017  'serial_number': str(bytearray(p_module_info.serial_number).decode().rstrip('\x00')),
1018  }
1019  return module_info
1020 
1022  pmodule_count = ctypes.c_uint32()
1023  error = self.lib.ioThinx_Misc_GetModuleCount(ctypes.byref(pmodule_count))
1024  if error != 0:
1025  raise ioThinxError(error)
1026  return pmodule_count.value
1027 
1029  pmodule_count = ctypes.c_uint32()
1030  error = self.lib.ioThinx_Misc_GetModuleCountML(ctypes.byref(pmodule_count))
1031  if error != 0:
1032  raise ioThinxError(error)
1033  return pmodule_count.value
1034 
1036  p_state = ctypes.c_uint8()
1037  error = self.lib.ioThinx_Misc_GetRotarySwitchState(ctypes.c_uint32(slot),
1038  ctypes.byref(p_state))
1039  if error != 0:
1040  raise ioThinxError(error)
1041  return p_state.value
1042 
1043  def ioThinx_Misc_SetUserLedState(self, slot, channel, state):
1044  error = self.lib.ioThinx_Misc_SetUserLedState(ctypes.c_uint32(slot),
1045  ctypes.c_uint8(channel),
1046  ctypes.c_uint8(state))
1047  if error != 0:
1048  raise ioThinxError(error)
1049 
1051  p_state = ctypes.c_uint8()
1052  error = self.lib.ioThinx_Misc_GetPushButtonState(ctypes.c_uint32(slot),
1053  ctypes.byref(p_state))
1054  if error != 0:
1055  raise ioThinxError(error)
1056  return p_state.value
1057 
1059  p_state = ctypes.c_uint8()
1060  error = self.lib.ioThinx_Misc_GetLocateState(ctypes.c_uint32(slot),
1061  ctypes.byref(p_state))
1062  if error != 0:
1063  raise ioThinxError(error)
1064  return p_state.value
1065 
1066  def ioThinx_Misc_SetLocateState(self, slot, state):
1067  error = self.lib.ioThinx_Misc_SetLocateState(ctypes.c_uint32(slot),
1068  ctypes.c_uint8(state))
1069  if error != 0:
1070  raise ioThinxError(error)
1071 
1072 #
1073 # Communication
1074 #
1075  # def ioThinx_Uart_Open(self, slot, port, mode, baudrate):
1076  # fd = ctypes.c_int()
1077  # error = self.lib.ioThinx_Uart_Open(
1078  # ctypes.c_uint32(slot),
1079  # ctypes.c_uint32(port),
1080  # ctypes.c_uint32(mode),
1081  # ctypes.c_uint32(baudrate),
1082  # ctypes.byref(fd)
1083  # )
1084  # if error != 0:
1085  # raise ioThinxError(error)
1086 
1087  # return fd.value
1088  def ioThinx_Serial_GetDevName(self, slot, port):
1089  buff = (ctypes.c_uint8 * 20)()
1090  p_name = (ctypes.c_uint8 * 20)()
1091  error = self.lib.ioThinx_Serial_GetDevName(
1092  ctypes.c_uint32(slot),
1093  ctypes.c_uint32(port),
1094  ctypes.byref(p_name)
1095  )
1096  if error != 0:
1097  raise ioThinxError(error)
1098 
1099  buff_list = []
1100  for value in p_name:
1101  buff_list.append(value)
1102 
1103  dev_name = bytes(buff_list).decode('ascii')
1104  return dev_name
1105 
1106  def ioThinx_Serial_SetInterface(self, slot, port, mode):
1107  error = self.lib.ioThinx_Serial_SetInterface(
1108  ctypes.c_uint32(slot),
1109  ctypes.c_uint32(port),
1110  ctypes.c_uint32(mode)
1111  )
1112  if error != 0:
1113  raise ioThinxError(error)
1114 
1115  def ioThinx_Serial_GetInterface(self, slot, port):
1116  mode = ctypes.c_uint32()
1117  error = self.lib.ioThinx_Serial_GetInterface(
1118  ctypes.c_uint32(slot),
1119  ctypes.c_uint32(port),
1120  ctypes.byref(mode)
1121  )
1122  if error != 0:
1123  raise ioThinxError(error)
1124  return mode.value
def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetCntValues(self, slot, start, count)
def ioThinx_AI_GetMaxRaws(self, slot, start, count)
def ioThinx_Misc_SetUserLedState(self, slot, channel, state)
def ioThinx_Serial_SetInterface(self, slot, port, mode)
def ioThinx_PWR_Config_GetAlarms(self, slot, start, count)
def ioThinx_AO_GetRaws(self, slot, start, count)
def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list)
def ioThinx_AO_SetEngs(self, slot, start, count, buff_list)
def ioThinx_RTD_GetMinValues(self, slot, start, count)
def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list)
def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list)
def ioThinx_TC_GetStatuss(self, slot, start, count)
def ioThinx_DO_GetPwmConfigures(self, slot, start, count)
def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count)
def ioThinx_DO_GetPwmCounts(self, slot, start, count)
def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count)
def ioThinx_AO_Config_GetRanges(self, slot, start, count)
def ioThinx_DI_SetCntStarts(self, slot, buff_list)
def ioThinx_DO_SetPwmConfigures(self, slot, start, count, frequencies_buff_list, duty_cycles_buff_list)
def check_c_api_version(device_c_api_version, support_c_api_version)
def ioThinx_AI_GetStatuss(self, slot, start, count)
def ioThinx_AO_SetRaws(self, slot, start, count, buff_list)
def ioThinx_RTD_GetValues(self, slot, start, count)
def ioThinx_DO_Config_GetPwmConfigures(self, slot, start, count)
def ioThinx_AI_GetRaws(self, slot, start, count)
def ioThinx_TC_Config_SetSensorTypes(self, slot, start, count, buff_list)
def ioThinx_Relay_GetCurrentCounts(self, slot, start, count)
def ioThinx_DI_GetCntValues(self, slot, start, count)
def ioThinx_DI_SetCntOverflows(self, slot, buff_list)
def ioThinx_TC_SetCalibrations(self, slot, start, count, buff_list)
def ioThinx_Relay_GetTotalCounts(self, slot, start, count)
def ioThinx_PWR_Config_SetAlarms(self, slot, start, count, buff_list)
def ioThinx_RTD_GetMaxValues(self, slot, start, count)
def ioThinx_AO_Config_SetRanges(self, slot, start, count, buff_list)
def ioThinx_RTD_SetCalibrations(self, slot, start, count, buff_list)
def ioThinx_TC_GetMinValues(self, slot, start, count)
def ioThinx_TC_ResetCalibrations(self, slot, start, count)
def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, count)
def ioThinx_DO_SetPwmStarts(self, slot, buff_list)
def ioThinx_AO_GetEngs(self, slot, start, count)
def ioThinx_TC_GetMaxValues(self, slot, start, count)
def ioThinx_PWR_GetFieldStatus(self, slot, start, count)
def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list)
def ioThinx_TC_GetValues(self, slot, start, count)
def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list)
def ioThinx_AI_GetMaxEngs(self, slot, start, count)
def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list)
def ioThinx_RTD_GetStatuss(self, slot, start, count)
def ioThinx_RTD_Config_SetSensorTypes(self, slot, start, count, buff_list)
def ioThinx_AI_GetMinRaws(self, slot, start, count)
def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list)
def ioThinx_RTD_ResetCalibrations(self, slot, start, count)
def ioThinx_DO_Config_GetModes(self, slot, start, count)
def ioThinx_AI_GetEngs(self, slot, start, count)
def ioThinx_AI_GetMinEngs(self, slot, start, count)
def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list)
def ioThinx_TC_Config_GetSensorTypes(self, slot, start, count)
def ioThinx_DI_Config_GetCntTriggers(self, slot, start, count)
def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetFilters(self, slot, start, count)
def ioThinx_DI_Config_GetModes(self, slot, start, count)
def ioThinx_PWR_GetSysStatus(self, slot, start, count)
def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_AI_Config_GetRanges(self, slot, start, count)
def ioThinx_AO_GetStatuss(self, slot, start, count)
def ioThinx_Relay_SetValues(self, slot, buff_list)
def ioThinx_DO_Config_SetPwmConfigures(self, slot, start, count, frequencies_buff_list, duty_cycles_buff_list)