2 from datetime
import datetime
10 device_version_array = device_c_api_version.split(
".")
11 support_version_array = support_c_api_version.split(
".")
12 if len(support_version_array) != 3:
13 return "support_c_api_version error" 14 if len(device_version_array) != 3:
15 return "device_c_api_version error" 17 version_fail = device_c_api_version +
">" + support_c_api_version
19 if device_version_array == support_version_array:
23 if device_version_array[i] < support_version_array[i]:
36 "wrong slot settings",
41 return repr(error[self.
value])
46 super(ioThinx_4530_API, self).
__init__()
56 raise AssertionError(error)
59 self.
lib = ctypes.cdll.LoadLibrary(shared_library)
65 return(str(
".".join(file.split(
".")[2:5])))
68 error = self.lib.ioThinx_IO_Client_Init(
None)
73 p_status = ctypes.c_uint8()
74 error = self.lib.ioThinx_IO_GetBusStatus(ctypes.byref(p_status))
80 error = self.lib.ioThinx_IO_Config_Reload(
None)
89 p_values = ctypes.c_uint32()
90 error = self.lib.ioThinx_DI_GetValues(ctypes.c_uint32(slot),
91 ctypes.byref(p_values))
94 values = [int(b)
for b
in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
98 buff = (ctypes.c_uint32 * count)()
99 error = self.lib.ioThinx_DI_GetCntValues(ctypes.c_uint32(slot),
100 ctypes.c_uint8(start),
101 ctypes.c_uint8(count),
107 buff_list.append(value)
111 buff = (ctypes.c_uint32 * count)(*buff_list)
112 error = self.lib.ioThinx_DI_SetCntValues(ctypes.c_uint32(slot),
113 ctypes.c_uint8(start),
114 ctypes.c_uint8(count),
120 p_starts = ctypes.c_uint32()
121 error = self.lib.ioThinx_DI_GetCntStarts(ctypes.c_uint32(slot),
122 ctypes.byref(p_starts))
125 starts = [int(b)
for b
in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
129 starts = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
130 error = self.lib.ioThinx_DI_SetCntStarts(ctypes.c_uint32(slot),
131 ctypes.c_uint32(starts))
136 starts = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
137 error = self.lib.ioThinx_DI_SetCntStops(ctypes.c_uint32(slot),
138 ctypes.c_uint32(starts))
143 p_overflows = ctypes.c_uint32()
144 error = self.lib.ioThinx_DI_GetCntOverflows(ctypes.c_uint32(slot),
145 ctypes.byref(p_overflows))
148 overflows = [int(b)
for b
in bin(p_overflows.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
152 overflows = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
153 error = self.lib.ioThinx_DI_SetCntOverflows(ctypes.c_uint32(slot),
154 ctypes.c_uint32(overflows))
159 buff = (ctypes.c_uint8 * count)()
160 error = self.lib.ioThinx_DI_Config_GetModes(ctypes.c_uint32(slot),
161 ctypes.c_uint8(start),
162 ctypes.c_uint8(count),
168 buff_list.append(value)
172 buff = (ctypes.c_uint8 * count)(*buff_list)
173 error = self.lib.ioThinx_DI_Config_SetModes(ctypes.c_uint32(slot),
174 ctypes.c_uint8(start),
175 ctypes.c_uint8(count),
181 buff = (ctypes.c_uint16 * count)()
182 error = self.lib.ioThinx_DI_Config_GetFilters(ctypes.c_uint32(slot),
183 ctypes.c_uint8(start),
184 ctypes.c_uint8(count),
190 buff_list.append(value)
194 buff = (ctypes.c_uint16 * count)(*buff_list)
195 error = self.lib.ioThinx_DI_Config_SetFilters(ctypes.c_uint32(slot),
196 ctypes.c_uint8(start),
197 ctypes.c_uint8(count),
203 buff = (ctypes.c_uint8 * count)()
204 error = self.lib.ioThinx_DI_Config_GetCntTriggers(ctypes.c_uint32(slot),
205 ctypes.c_uint8(start),
206 ctypes.c_uint8(count),
212 buff_list.append(value)
216 buff = (ctypes.c_uint8 * count)(*buff_list)
217 error = self.lib.ioThinx_DI_Config_SetCntTriggers(ctypes.c_uint32(slot),
218 ctypes.c_uint8(start),
219 ctypes.c_uint8(count),
225 buff = (ctypes.c_uint32 * count)()
226 error = self.lib.ioThinx_DI_Config_GetCntValues(ctypes.c_uint32(slot),
227 ctypes.c_uint8(start),
228 ctypes.c_uint8(count),
234 buff_list.append(value)
238 buff = (ctypes.c_uint32 * count)(*buff_list)
239 error = self.lib.ioThinx_DI_Config_SetCntValues(ctypes.c_uint32(slot),
240 ctypes.c_uint8(start),
241 ctypes.c_uint8(count),
250 p_values = ctypes.c_uint32()
251 error = self.lib.ioThinx_DO_GetValues(ctypes.c_uint32(slot),
252 ctypes.byref(p_values))
255 values = [int(b)
for b
in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
259 values = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
260 error = self.lib.ioThinx_DO_SetValues(ctypes.c_uint32(slot),
261 ctypes.c_uint32(values))
266 buff = (ctypes.c_uint32 * count)()
267 error = self.lib.ioThinx_DO_GetPwmCounts(ctypes.c_uint32(slot),
268 ctypes.c_uint8(start),
269 ctypes.c_uint8(count),
275 buff_list.append(value)
279 buff = (ctypes.c_uint32 * count)(*buff_list)
280 error = self.lib.ioThinx_DO_SetPwmCounts(ctypes.c_uint32(slot),
281 ctypes.c_uint8(start),
282 ctypes.c_uint8(count),
288 p_starts = ctypes.c_uint32()
289 error = self.lib.ioThinx_DO_GetPwmStarts(ctypes.c_uint32(slot),
290 ctypes.byref(p_starts))
293 starts = [int(b)
for b
in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
297 starts = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
298 error = self.lib.ioThinx_DO_SetPwmStarts(ctypes.c_uint32(slot),
299 ctypes.c_uint32(starts))
304 stops = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
305 error = self.lib.ioThinx_DO_SetPwmStops(ctypes.c_uint32(slot),
306 ctypes.c_uint32(stops))
311 frequencies_buff = (ctypes.c_uint16 * count)()
312 duty_cycles_buff = (ctypes.c_uint16 * count)()
313 error = self.lib.ioThinx_DO_GetPwmConfigures(ctypes.c_uint32(slot),
314 ctypes.c_uint8(start),
315 ctypes.c_uint8(count),
316 ctypes.byref(frequencies_buff),
317 ctypes.byref(duty_cycles_buff))
321 frequencies_buff_list = []
322 for value
in frequencies_buff:
323 frequencies_buff_list.append(value)
324 duty_cycles_buff_list = []
325 for value
in duty_cycles_buff:
326 duty_cycles_buff_list.append(value)
327 return frequencies_buff_list, duty_cycles_buff_list
330 frequencies_buff_list,
331 duty_cycles_buff_list):
332 frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
333 duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
334 error = self.lib.ioThinx_DO_SetPwmConfigures(ctypes.c_uint32(slot),
335 ctypes.c_uint8(start),
336 ctypes.c_uint8(count),
337 ctypes.byref(frequencies_buff),
338 ctypes.byref(duty_cycles_buff))
343 buff = (ctypes.c_uint8 * count)()
344 error = self.lib.ioThinx_DO_Config_GetModes(ctypes.c_uint32(slot),
345 ctypes.c_uint8(start),
346 ctypes.c_uint8(count),
352 buff_list.append(value)
356 buff = (ctypes.c_uint8 * count)(*buff_list)
357 error = self.lib.ioThinx_DO_Config_SetModes(ctypes.c_uint32(slot),
358 ctypes.c_uint8(start),
359 ctypes.c_uint8(count),
365 buff = (ctypes.c_uint32 * count)()
366 error = self.lib.ioThinx_DO_Config_GetPwmCounts(ctypes.c_uint32(slot),
367 ctypes.c_uint8(start),
368 ctypes.c_uint8(count),
374 buff_list.append(value)
378 buff = (ctypes.c_uint32 * count)(*buff_list)
379 error = self.lib.ioThinx_DO_Config_SetPwmCounts(ctypes.c_uint32(slot),
380 ctypes.c_uint8(start),
381 ctypes.c_uint8(count),
387 frequencies_buff = (ctypes.c_uint16 * count)()
388 duty_cycles_buff = (ctypes.c_uint16 * count)()
389 error = self.lib.ioThinx_DO_Config_GetPwmConfigures(ctypes.c_uint32(slot),
390 ctypes.c_uint8(start),
391 ctypes.c_uint8(count),
392 ctypes.byref(frequencies_buff),
393 ctypes.byref(duty_cycles_buff))
397 frequencies_buff_list = []
398 for value
in frequencies_buff:
399 frequencies_buff_list.append(value)
400 duty_cycles_buff_list = []
401 for value
in duty_cycles_buff:
402 duty_cycles_buff_list.append(value)
404 return frequencies_buff_list, duty_cycles_buff_list
407 frequencies_buff_list,
408 duty_cycles_buff_list):
409 frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
410 duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
411 error = self.lib.ioThinx_DO_Config_SetPwmConfigures(ctypes.c_uint32(slot),
412 ctypes.c_uint8(start),
413 ctypes.c_uint8(count),
414 ctypes.byref(frequencies_buff),
415 ctypes.byref(duty_cycles_buff))
420 p_values = ctypes.c_uint32()
421 error = self.lib.ioThinx_Relay_GetValues(ctypes.c_uint32(slot),
422 ctypes.byref(p_values))
425 values = [int(b)
for b
in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
429 values = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
430 error = self.lib.ioThinx_Relay_SetValues(ctypes.c_uint32(slot),
431 ctypes.c_uint32(values))
436 buff = (ctypes.c_uint32 * count)()
437 error = self.lib.ioThinx_Relay_GetTotalCounts(ctypes.c_uint32(slot),
438 ctypes.c_uint8(start),
439 ctypes.c_uint8(count),
445 buff_list.append(value)
449 buff = (ctypes.c_uint32 * count)()
450 error = self.lib.ioThinx_Relay_GetCurrentCounts(ctypes.c_uint32(slot),
451 ctypes.c_uint8(start),
452 ctypes.c_uint8(count),
458 buff_list.append(value)
462 resets = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
463 error = self.lib.ioThinx_Relay_ResetCurrentCounts(ctypes.c_uint32(slot),
464 ctypes.c_uint32(resets))
469 buff = (ctypes.c_float * count)()
470 error = self.lib.ioThinx_AI_GetEngs(ctypes.c_uint32(slot),
471 ctypes.c_uint8(start),
472 ctypes.c_uint8(count),
478 buff_list.append(value)
482 buff = (ctypes.c_float * count)()
483 error = self.lib.ioThinx_AI_GetMinEngs(ctypes.c_uint32(slot),
484 ctypes.c_uint8(start),
485 ctypes.c_uint8(count),
491 buff_list.append(value)
495 buff = (ctypes.c_float * count)()
496 error = self.lib.ioThinx_AI_GetMaxEngs(ctypes.c_uint32(slot),
497 ctypes.c_uint8(start),
498 ctypes.c_uint8(count),
504 buff_list.append(value)
508 buff = (ctypes.c_uint32 * count)()
509 error = self.lib.ioThinx_AI_GetRaws(ctypes.c_uint32(slot),
510 ctypes.c_uint8(start),
511 ctypes.c_uint8(count),
517 buff_list.append(value)
521 buff = (ctypes.c_uint32 * count)()
522 error = self.lib.ioThinx_AI_GetMinRaws(ctypes.c_uint32(slot),
523 ctypes.c_uint8(start),
524 ctypes.c_uint8(count),
530 buff_list.append(value)
534 buff = (ctypes.c_uint32 * count)()
535 error = self.lib.ioThinx_AI_GetMaxRaws(ctypes.c_uint32(slot),
536 ctypes.c_uint8(start),
537 ctypes.c_uint8(count),
543 buff_list.append(value)
547 resets = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
548 error = self.lib.ioThinx_AI_ResetMins(ctypes.c_uint32(slot),
549 ctypes.c_uint32(resets))
554 resets = int(
"".join(map(str, buff_list[:: -1])), BIN_TYPE)
555 error = self.lib.ioThinx_AI_ResetMaxs(ctypes.c_uint32(slot),
556 ctypes.c_uint32(resets))
561 buff = (ctypes.c_uint8 * count)()
562 error = self.lib.ioThinx_AI_GetStatuss(ctypes.c_uint32(slot),
563 ctypes.c_uint8(start),
564 ctypes.c_uint8(count),
570 buff_list.append(value)
574 buff = (ctypes.c_uint8 * count)()
575 error = self.lib.ioThinx_AI_Config_GetRanges(ctypes.c_uint32(slot),
576 ctypes.c_uint8(start),
577 ctypes.c_uint8(count),
583 buff_list.append(value)
587 buff = (ctypes.c_uint8 * count)(*buff_list)
588 error = self.lib.ioThinx_AI_Config_SetRanges(ctypes.c_uint32(slot),
589 ctypes.c_uint8(start),
590 ctypes.c_uint8(count),
596 buff = (ctypes.c_float * count)()
597 error = self.lib.ioThinx_AI_Config_GetBurnoutValues(ctypes.c_uint32(slot),
598 ctypes.c_uint8(start),
599 ctypes.c_uint8(count),
605 buff_list.append(value)
609 buff = (ctypes.c_float * count)(*buff_list)
610 error = self.lib.ioThinx_AI_Config_SetBurnoutValues(ctypes.c_uint32(slot),
611 ctypes.c_uint8(start),
612 ctypes.c_uint8(count),
618 buff = (ctypes.c_float * count)()
619 error = self.lib.ioThinx_AO_GetEngs(ctypes.c_uint32(slot),
620 ctypes.c_uint8(start),
621 ctypes.c_uint8(count),
627 buff_list.append(value)
631 buff = (ctypes.c_float * count)(*buff_list)
632 error = self.lib.ioThinx_AO_SetEngs(ctypes.c_uint32(slot),
633 ctypes.c_uint8(start),
634 ctypes.c_uint8(count),
640 buff = (ctypes.c_uint16 * count)()
641 error = self.lib.ioThinx_AO_GetRaws(ctypes.c_uint32(slot),
642 ctypes.c_uint8(start),
643 ctypes.c_uint8(count),
649 buff_list.append(value)
653 buff = (ctypes.c_uint16 * count)(*buff_list)
654 error = self.lib.ioThinx_AO_SetRaws(ctypes.c_uint32(slot),
655 ctypes.c_uint8(start),
656 ctypes.c_uint8(count),
662 buff = (ctypes.c_uint8 * count)()
663 error = self.lib.ioThinx_AO_GetStatuss(ctypes.c_uint32(slot),
664 ctypes.c_uint8(start),
665 ctypes.c_uint8(count),
671 buff_list.append(value)
675 buff = (ctypes.c_uint8 * count)()
676 error = self.lib.ioThinx_AO_Config_GetRanges(ctypes.c_uint32(slot),
677 ctypes.c_uint8(start),
678 ctypes.c_uint8(count),
684 buff_list.append(value)
688 buff = (ctypes.c_uint8 * count)(*buff_list)
689 error = self.lib.ioThinx_AO_Config_SetRanges(ctypes.c_uint32(slot),
690 ctypes.c_uint8(start),
691 ctypes.c_uint8(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),
707 buff_list.append(value)
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),
720 buff_list.append(value)
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),
733 buff_list.append(value)
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))
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))
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),
760 buff_list.append(value)
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),
773 error = self.lib.ioThinx_TC_ResetCalibrations(ctypes.c_uint32(slot),
774 ctypes.c_uint8(start),
775 ctypes.c_uint8(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),
789 buff_list.append(value)
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),
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),
811 buff_list.append(value)
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),
824 buff_list.append(value)
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),
837 buff_list.append(value)
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))
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))
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),
864 buff_list.append(value)
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),
877 error = self.lib.ioThinx_RTD_ResetCalibrations(ctypes.c_uint32(slot),
878 ctypes.c_uint8(start),
879 ctypes.c_uint8(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),
893 buff_list.append(value)
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),
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),
919 buff_list.append(value)
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),
932 buff_list.append(value)
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),
945 buff_list.append(value)
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),
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))]
970 error = self.lib.ioThinx_Misc_GetModuleInfo(ctypes.c_uint8(slot),
971 ctypes.byref(p_module_info))
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 = [str(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')
980 fwr_build_date = convert_build_date_from_hex_to_datetime()
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')),
992 pmodule_count = ctypes.c_uint32()
993 error = self.lib.ioThinx_Misc_GetModuleCount(ctypes.byref(pmodule_count))
996 return pmodule_count.value
999 p_state = ctypes.c_uint8()
1000 error = self.lib.ioThinx_Misc_GetRotarySwitchState(ctypes.c_uint32(slot),
1001 ctypes.byref(p_state))
1004 return p_state.value
1007 error = self.lib.ioThinx_Misc_SetUserLedState(ctypes.c_uint32(slot),
1008 ctypes.c_uint8(channel),
1009 ctypes.c_uint8(state))
1014 p_state = ctypes.c_uint8()
1015 error = self.lib.ioThinx_Misc_GetPushButtonState(ctypes.c_uint32(slot),
1016 ctypes.byref(p_state))
1019 return p_state.value
1022 p_state = ctypes.c_uint8()
1023 error = self.lib.ioThinx_Misc_GetLocateState(ctypes.c_uint32(slot),
1024 ctypes.byref(p_state))
1027 return p_state.value
1030 error = self.lib.ioThinx_Misc_SetLocateState(ctypes.c_uint32(slot),
1031 ctypes.c_uint8(state))
1040 error = self.lib.ioThinx_Uart_Open(
1041 ctypes.c_uint32(slot),
1042 ctypes.c_uint32(port),
1043 ctypes.c_uint32(mode),
1044 ctypes.c_uint32(baudrate),
def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_DO_SetValues(self, slot, buff_list)
def ioThinx_DI_GetCntStarts(self, slot)
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_PWR_Config_GetAlarms(self, slot, start, count)
def ioThinx_RTD_ResetMaxs(self, slot, buff_list)
def ioThinx_Misc_GetModuleInfo(self, slot)
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 __init__(self, value)
def ioThinx_TC_GetStatuss(self, slot, start, count)
def ioThinx_DO_GetPwmConfigures(self, slot, start, count)
def ioThinx_RTD_ResetMins(self, slot, buff_list)
def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count)
def ioThinx_DO_GetPwmCounts(self, slot, start, count)
def ioThinx_Uart_Open(self, slot, port, mode, baudrate)
def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count)
def ioThinx_AO_Config_GetRanges(self, slot, start, count)
def ioThinx_Misc_SetLocateState(self, slot, state)
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_AI_ResetMaxs(self, slot, buff_list)
def ioThinx_AO_SetRaws(self, slot, start, count, buff_list)
def ioThinx_DI_SetCntStops(self, slot, 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 get_shared_library_version(self)
def ioThinx_Relay_GetCurrentCounts(self, slot, start, count)
def ioThinx_DI_GetCntValues(self, slot, start, count)
def ioThinx_DO_GetPwmStarts(self, slot)
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_DI_GetCntOverflows(self, slot)
def ioThinx_TC_GetMaxValues(self, slot, start, count)
def ioThinx_PWR_GetFieldStatus(self, slot, start, count)
def ioThinx_IO_GetBusStatus(self)
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_DI_GetValues(self, slot)
def ioThinx_AI_GetMaxEngs(self, slot, start, count)
def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list)
def ioThinx_AI_ResetMins(self, slot, buff_list)
def ioThinx_DO_GetValues(self, slot)
def ioThinx_RTD_GetStatuss(self, slot, start, count)
def ioThinx_IO_Config_Reload(self)
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_SetPwmStops(self, slot, buff_list)
def ioThinx_Misc_GetRotarySwitchState(self, slot)
def ioThinx_Relay_GetValues(self, slot)
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_Misc_GetPushButtonState(self, slot)
def ioThinx_TC_ResetMins(self, slot, buff_list)
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_IO_Client_Init(self)
def ioThinx_PWR_GetSysStatus(self, slot, start, count)
def ioThinx_Misc_GetLocateState(self, slot)
def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_TC_ResetMaxs(self, slot, buff_list)
def ioThinx_AI_Config_GetRanges(self, slot, start, count)
def ioThinx_Misc_GetModuleCount(self)
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)