Public Member Functions | Data Fields
ioThinx_4530_API Class Reference
Inheritance diagram for ioThinx_4530_API:

Public Member Functions

def __init__ (self)
 
def get_shared_library_version (self)
 
def ioThinx_IO_Client_Init (self)
 
def ioThinx_IO_GetBusStatus (self)
 
def ioThinx_IO_Config_Reload (self)
 
def ioThinx_DI_GetValues (self, slot)
 
def ioThinx_DI_GetCntValues (self, slot, start, count)
 
def ioThinx_DI_SetCntValues (self, slot, start, count, buff_list)
 
def ioThinx_DI_GetCntStarts (self, slot)
 
def ioThinx_DI_SetCntStarts (self, slot, buff_list)
 
def ioThinx_DI_SetCntStops (self, slot, buff_list)
 
def ioThinx_DI_GetCntOverflows (self, slot)
 
def ioThinx_DI_SetCntOverflows (self, slot, buff_list)
 
def ioThinx_DI_Config_GetModes (self, slot, start, count)
 
def ioThinx_DI_Config_SetModes (self, slot, start, count, buff_list)
 
def ioThinx_DI_Config_GetFilters (self, slot, start, count)
 
def ioThinx_DI_Config_SetFilters (self, slot, start, count, buff_list)
 
def ioThinx_DI_Config_GetCntTriggers (self, slot, start, count)
 
def ioThinx_DI_Config_SetCntTriggers (self, slot, start, count, buff_list)
 
def ioThinx_DI_Config_GetCntValues (self, slot, start, count)
 
def ioThinx_DI_Config_SetCntValues (self, slot, start, count, buff_list)
 
def ioThinx_DO_GetValues (self, slot)
 
def ioThinx_DO_SetValues (self, slot, buff_list)
 
def ioThinx_DO_GetPwmCounts (self, slot, start, count)
 
def ioThinx_DO_SetPwmCounts (self, slot, start, count, buff_list)
 
def ioThinx_DO_GetPwmStarts (self, slot)
 
def ioThinx_DO_SetPwmStarts (self, slot, buff_list)
 
def ioThinx_DO_SetPwmStops (self, slot, buff_list)
 
def ioThinx_DO_GetPwmConfigures (self, slot, start, count)
 
def ioThinx_DO_SetPwmConfigures (self, slot, start, count, frequencies_buff_list, duty_cycles_buff_list)
 
def ioThinx_DO_Config_GetModes (self, slot, start, count)
 
def ioThinx_DO_Config_SetModes (self, slot, start, count, buff_list)
 
def ioThinx_DO_Config_GetPwmCounts (self, slot, start, count)
 
def ioThinx_DO_Config_SetPwmCounts (self, slot, start, count, buff_list)
 
def ioThinx_DO_Config_GetPwmConfigures (self, slot, start, count)
 
def ioThinx_DO_Config_SetPwmConfigures (self, slot, start, count, frequencies_buff_list, duty_cycles_buff_list)
 
def ioThinx_Relay_GetValues (self, slot)
 
def ioThinx_Relay_SetValues (self, slot, buff_list)
 
def ioThinx_Relay_GetTotalCounts (self, slot, start, count)
 
def ioThinx_Relay_GetCurrentCounts (self, slot, start, count)
 
def ioThinx_Relay_ResetCurrentCounts (self, slot, buff_list)
 
def ioThinx_AI_GetEngs (self, slot, start, count)
 
def ioThinx_AI_GetMinEngs (self, slot, start, count)
 
def ioThinx_AI_GetMaxEngs (self, slot, start, count)
 
def ioThinx_AI_GetRaws (self, slot, start, count)
 
def ioThinx_AI_GetMinRaws (self, slot, start, count)
 
def ioThinx_AI_GetMaxRaws (self, slot, start, count)
 
def ioThinx_AI_ResetMins (self, slot, buff_list)
 
def ioThinx_AI_ResetMaxs (self, slot, buff_list)
 
def ioThinx_AI_GetStatuss (self, slot, start, count)
 
def ioThinx_AI_Config_GetRanges (self, slot, start, count)
 
def ioThinx_AI_Config_SetRanges (self, slot, start, count, buff_list)
 
def ioThinx_AI_Config_GetBurnoutValues (self, slot, start, count)
 
def ioThinx_AI_Config_SetBurnoutValues (self, slot, start, count, buff_list)
 
def ioThinx_AO_GetEngs (self, slot, start, count)
 
def ioThinx_AO_SetEngs (self, slot, start, count, buff_list)
 
def ioThinx_AO_GetRaws (self, slot, start, count)
 
def ioThinx_AO_SetRaws (self, slot, start, count, buff_list)
 
def ioThinx_AO_GetStatuss (self, slot, start, count)
 
def ioThinx_AO_Config_GetRanges (self, slot, start, count)
 
def ioThinx_AO_Config_SetRanges (self, slot, start, count, buff_list)
 
def ioThinx_TC_GetValues (self, slot, start, count)
 
def ioThinx_TC_GetMinValues (self, slot, start, count)
 
def ioThinx_TC_GetMaxValues (self, slot, start, count)
 
def ioThinx_TC_ResetMins (self, slot, buff_list)
 
def ioThinx_TC_ResetMaxs (self, slot, buff_list)
 
def ioThinx_TC_GetStatuss (self, slot, start, count)
 
def ioThinx_TC_SetCalibrations (self, slot, start, count, buff_list)
 
def ioThinx_TC_ResetCalibrations (self, slot, start, count)
 
def ioThinx_TC_Config_GetSensorTypes (self, slot, start, count)
 
def ioThinx_TC_Config_SetSensorTypes (self, slot, start, count, buff_list)
 
def ioThinx_RTD_GetValues (self, slot, start, count)
 
def ioThinx_RTD_GetMinValues (self, slot, start, count)
 
def ioThinx_RTD_GetMaxValues (self, slot, start, count)
 
def ioThinx_RTD_ResetMins (self, slot, buff_list)
 
def ioThinx_RTD_ResetMaxs (self, slot, buff_list)
 
def ioThinx_RTD_GetStatuss (self, slot, start, count)
 
def ioThinx_RTD_SetCalibrations (self, slot, start, count, buff_list)
 
def ioThinx_RTD_ResetCalibrations (self, slot, start, count)
 
def ioThinx_RTD_Config_GetSensorTypes (self, slot, start, count)
 
def ioThinx_RTD_Config_SetSensorTypes (self, slot, start, count, buff_list)
 
def ioThinx_PWR_GetSysStatus (self, slot, start, count)
 
def ioThinx_PWR_GetFieldStatus (self, slot, start, count)
 
def ioThinx_PWR_Config_GetAlarms (self, slot, start, count)
 
def ioThinx_PWR_Config_SetAlarms (self, slot, start, count, buff_list)
 
def ioThinx_Misc_GetModuleInfo (self, slot)
 
def ioThinx_Misc_GetModuleCount (self)
 
def ioThinx_Misc_GetRotarySwitchState (self, slot)
 
def ioThinx_Misc_SetUserLedState (self, slot, channel, state)
 
def ioThinx_Misc_GetPushButtonState (self, slot)
 
def ioThinx_Misc_GetLocateState (self, slot)
 
def ioThinx_Misc_SetLocateState (self, slot, state)
 
def ioThinx_Uart_Open (self, slot, port, mode, baudrate)
 

Data Fields

 c_api_version
 
 shared_library_dir
 
 shared_library_filename
 
 lib
 

Detailed Description

Definition at line 44 of file ioThinx_4530_API.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 45 of file ioThinx_4530_API.py.

45  def __init__(self):
46  super(ioThinx_4530_API, self).__init__()
47  self.c_api_version = "1.2.0"
48  self.shared_library_dir = "/usr/lib/iothinx/"
49  self.shared_library_filename = "libiothinxio.so"
50 
51  error = check_c_api_version(
52  device_c_api_version = self.get_shared_library_version(),
53  support_c_api_version = self.c_api_version
54  )
55  if error is not None:
56  raise AssertionError(error)
57 
58  shared_library = self.shared_library_dir + self.shared_library_filename
59  self.lib = ctypes.cdll.LoadLibrary(shared_library)
61 
def check_c_api_version(device_c_api_version, support_c_api_version)

Member Function Documentation

def get_shared_library_version (   self)

Definition at line 62 of file ioThinx_4530_API.py.

63  for file in os.listdir(self.shared_library_dir):
64  if self.shared_library_filename in file and len(file.split(".")) == 5:
65  return(str(".".join(file.split(".")[2:5])))
66 
def ioThinx_IO_Client_Init (   self)

Definition at line 67 of file ioThinx_4530_API.py.

68  error = self.lib.ioThinx_IO_Client_Init(None)
69  if error is not 0:
70  raise ioThinxError(error)
71 
def ioThinx_IO_GetBusStatus (   self)

Definition at line 72 of file ioThinx_4530_API.py.

73  p_status = ctypes.c_uint8()
74  error = self.lib.ioThinx_IO_GetBusStatus(ctypes.byref(p_status))
75  if error is not 0:
76  raise ioThinxError(error)
77  return p_status.value
78 
def ioThinx_IO_Config_Reload (   self)

Definition at line 79 of file ioThinx_4530_API.py.

80  error = self.lib.ioThinx_IO_Config_Reload(None)
81  if error is not 0:
82  raise ioThinxError(error)
83 
84 #
85 # DI
86 #
87 
def ioThinx_DI_GetValues (   self,
  slot 
)

Definition at line 88 of file ioThinx_4530_API.py.

88  def ioThinx_DI_GetValues(self, slot):
89  p_values = ctypes.c_uint32()
90  error = self.lib.ioThinx_DI_GetValues(ctypes.c_uint32(slot),
91  ctypes.byref(p_values))
92  if error is not 0:
93  raise ioThinxError(error)
94  values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
95  return values
96 
def ioThinx_DI_GetCntValues (   self,
  slot,
  start,
  count 
)

Definition at line 97 of file ioThinx_4530_API.py.

97  def ioThinx_DI_GetCntValues(self, slot, start, count):
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),
102  ctypes.byref(buff))
103  if error is not 0:
104  raise ioThinxError(error)
105  buff_list = []
106  for value in buff:
107  buff_list.append(value)
108  return buff_list
109 
def ioThinx_DI_GetCntValues(self, slot, start, count)
def ioThinx_DI_SetCntValues (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 110 of file ioThinx_4530_API.py.

110  def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list):
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),
115  ctypes.byref(buff))
116  if error is not 0:
117  raise ioThinxError(error)
118 
def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list)
def ioThinx_DI_GetCntStarts (   self,
  slot 
)

Definition at line 119 of file ioThinx_4530_API.py.

119  def ioThinx_DI_GetCntStarts(self, slot):
120  p_starts = ctypes.c_uint32()
121  error = self.lib.ioThinx_DI_GetCntStarts(ctypes.c_uint32(slot),
122  ctypes.byref(p_starts))
123  if error is not 0:
124  raise ioThinxError(error)
125  starts = [int(b) for b in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
126  return starts
127 
def ioThinx_DI_SetCntStarts (   self,
  slot,
  buff_list 
)

Definition at line 128 of file ioThinx_4530_API.py.

128  def ioThinx_DI_SetCntStarts(self, slot, buff_list):
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))
132  if error is not 0:
133  raise ioThinxError(error)
134 
def ioThinx_DI_SetCntStarts(self, slot, buff_list)
def ioThinx_DI_SetCntStops (   self,
  slot,
  buff_list 
)

Definition at line 135 of file ioThinx_4530_API.py.

135  def ioThinx_DI_SetCntStops(self, slot, buff_list):
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))
139  if error is not 0:
140  raise ioThinxError(error)
141 
def ioThinx_DI_GetCntOverflows (   self,
  slot 
)

Definition at line 142 of file ioThinx_4530_API.py.

142  def ioThinx_DI_GetCntOverflows(self, slot):
143  p_overflows = ctypes.c_uint32()
144  error = self.lib.ioThinx_DI_GetCntOverflows(ctypes.c_uint32(slot),
145  ctypes.byref(p_overflows))
146  if error is not 0:
147  raise ioThinxError(error)
148  overflows = [int(b) for b in bin(p_overflows.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
149  return overflows
150 
def ioThinx_DI_SetCntOverflows (   self,
  slot,
  buff_list 
)

Definition at line 151 of file ioThinx_4530_API.py.

151  def ioThinx_DI_SetCntOverflows(self, slot, buff_list):
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))
155  if error is not 0:
156  raise ioThinxError(error)
157 
def ioThinx_DI_SetCntOverflows(self, slot, buff_list)
def ioThinx_DI_Config_GetModes (   self,
  slot,
  start,
  count 
)

Definition at line 158 of file ioThinx_4530_API.py.

158  def ioThinx_DI_Config_GetModes(self, slot, start, count):
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),
163  ctypes.byref(buff))
164  if error is not 0:
165  raise ioThinxError(error)
166  buff_list = []
167  for value in buff:
168  buff_list.append(value)
169  return buff_list
170 
def ioThinx_DI_Config_GetModes(self, slot, start, count)
def ioThinx_DI_Config_SetModes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 171 of file ioThinx_4530_API.py.

171  def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list):
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),
176  ctypes.byref(buff))
177  if error is not 0:
178  raise ioThinxError(error)
179 
def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetFilters (   self,
  slot,
  start,
  count 
)

Definition at line 180 of file ioThinx_4530_API.py.

180  def ioThinx_DI_Config_GetFilters(self, slot, start, 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),
185  ctypes.byref(buff))
186  if error is not 0:
187  raise ioThinxError(error)
188  buff_list = []
189  for value in buff:
190  buff_list.append(value)
191  return buff_list
192 
def ioThinx_DI_Config_GetFilters(self, slot, start, count)
def ioThinx_DI_Config_SetFilters (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 193 of file ioThinx_4530_API.py.

193  def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list):
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),
198  ctypes.byref(buff))
199  if error is not 0:
200  raise ioThinxError(error)
201 
def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetCntTriggers (   self,
  slot,
  start,
  count 
)

Definition at line 202 of file ioThinx_4530_API.py.

202  def ioThinx_DI_Config_GetCntTriggers(self, slot, start, 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),
207  ctypes.byref(buff))
208  if error is not 0:
209  raise ioThinxError(error)
210  buff_list = []
211  for value in buff:
212  buff_list.append(value)
213  return buff_list
214 
def ioThinx_DI_Config_GetCntTriggers(self, slot, start, count)
def ioThinx_DI_Config_SetCntTriggers (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 215 of file ioThinx_4530_API.py.

215  def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list):
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),
220  ctypes.byref(buff))
221  if error is not 0:
222  raise ioThinxError(error)
223 
def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetCntValues (   self,
  slot,
  start,
  count 
)

Definition at line 224 of file ioThinx_4530_API.py.

224  def ioThinx_DI_Config_GetCntValues(self, slot, start, 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),
229  ctypes.byref(buff))
230  if error is not 0:
231  raise ioThinxError(error)
232  buff_list = []
233  for value in buff:
234  buff_list.append(value)
235  return buff_list
236 
def ioThinx_DI_Config_GetCntValues(self, slot, start, count)
def ioThinx_DI_Config_SetCntValues (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 237 of file ioThinx_4530_API.py.

237  def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list):
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),
242  ctypes.byref(buff))
243  if error is not 0:
244  raise ioThinxError(error)
245 #
246 # DO
247 #
248 
def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list)
def ioThinx_DO_GetValues (   self,
  slot 
)

Definition at line 249 of file ioThinx_4530_API.py.

249  def ioThinx_DO_GetValues(self, slot):
250  p_values = ctypes.c_uint32()
251  error = self.lib.ioThinx_DO_GetValues(ctypes.c_uint32(slot),
252  ctypes.byref(p_values))
253  if error is not 0:
254  raise ioThinxError(error)
255  values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
256  return values
257 
def ioThinx_DO_SetValues (   self,
  slot,
  buff_list 
)

Definition at line 258 of file ioThinx_4530_API.py.

258  def ioThinx_DO_SetValues(self, slot, buff_list):
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))
262  if error is not 0:
263  raise ioThinxError(error)
264 
def ioThinx_DO_GetPwmCounts (   self,
  slot,
  start,
  count 
)

Definition at line 265 of file ioThinx_4530_API.py.

265  def ioThinx_DO_GetPwmCounts(self, slot, start, count):
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),
270  ctypes.byref(buff))
271  if error is not 0:
272  raise ioThinxError(error)
273  buff_list = []
274  for value in buff:
275  buff_list.append(value)
276  return buff_list
277 
def ioThinx_DO_GetPwmCounts(self, slot, start, count)
def ioThinx_DO_SetPwmCounts (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 278 of file ioThinx_4530_API.py.

278  def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list):
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),
283  ctypes.byref(buff))
284  if error is not 0:
285  raise ioThinxError(error)
286 
def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_DO_GetPwmStarts (   self,
  slot 
)

Definition at line 287 of file ioThinx_4530_API.py.

287  def ioThinx_DO_GetPwmStarts(self, slot):
288  p_starts = ctypes.c_uint32()
289  error = self.lib.ioThinx_DO_GetPwmStarts(ctypes.c_uint32(slot),
290  ctypes.byref(p_starts))
291  if error is not 0:
292  raise ioThinxError(error)
293  starts = [int(b) for b in bin(p_starts.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
294  return starts
295 
def ioThinx_DO_SetPwmStarts (   self,
  slot,
  buff_list 
)

Definition at line 296 of file ioThinx_4530_API.py.

296  def ioThinx_DO_SetPwmStarts(self, slot, buff_list):
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))
300  if error is not 0:
301  raise ioThinxError(error)
302 
def ioThinx_DO_SetPwmStarts(self, slot, buff_list)
def ioThinx_DO_SetPwmStops (   self,
  slot,
  buff_list 
)

Definition at line 303 of file ioThinx_4530_API.py.

303  def ioThinx_DO_SetPwmStops(self, slot, buff_list):
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))
307  if error is not 0:
308  raise ioThinxError(error)
309 
def ioThinx_DO_GetPwmConfigures (   self,
  slot,
  start,
  count 
)

Definition at line 310 of file ioThinx_4530_API.py.

310  def ioThinx_DO_GetPwmConfigures(self, slot, start, count):
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))
318  if error is not 0:
319  raise ioThinxError(error)
320 
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
328 
def ioThinx_DO_GetPwmConfigures(self, slot, start, count)
def ioThinx_DO_SetPwmConfigures (   self,
  slot,
  start,
  count,
  frequencies_buff_list,
  duty_cycles_buff_list 
)

Definition at line 331 of file ioThinx_4530_API.py.

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))
339  if error is not 0:
340  raise ioThinxError(error)
341 
def ioThinx_DO_Config_GetModes (   self,
  slot,
  start,
  count 
)

Definition at line 342 of file ioThinx_4530_API.py.

342  def ioThinx_DO_Config_GetModes(self, slot, start, count):
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),
347  ctypes.byref(buff))
348  if error is not 0:
349  raise ioThinxError(error)
350  buff_list = []
351  for value in buff:
352  buff_list.append(value)
353  return buff_list
354 
def ioThinx_DO_Config_GetModes(self, slot, start, count)
def ioThinx_DO_Config_SetModes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 355 of file ioThinx_4530_API.py.

355  def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list):
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),
360  ctypes.byref(buff))
361  if error is not 0:
362  raise ioThinxError(error)
363 
def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list)
def ioThinx_DO_Config_GetPwmCounts (   self,
  slot,
  start,
  count 
)

Definition at line 364 of file ioThinx_4530_API.py.

364  def ioThinx_DO_Config_GetPwmCounts(self, slot, start, 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),
369  ctypes.byref(buff))
370  if error is not 0:
371  raise ioThinxError(error)
372  buff_list = []
373  for value in buff:
374  buff_list.append(value)
375  return buff_list
376 
def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count)
def ioThinx_DO_Config_SetPwmCounts (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 377 of file ioThinx_4530_API.py.

377  def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list):
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),
382  ctypes.byref(buff))
383  if error is not 0:
384  raise ioThinxError(error)
385 
def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_DO_Config_GetPwmConfigures (   self,
  slot,
  start,
  count 
)

Definition at line 386 of file ioThinx_4530_API.py.

386  def ioThinx_DO_Config_GetPwmConfigures(self, slot, start, 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))
394  if error is not 0:
395  raise ioThinxError(error)
396 
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)
403 
404  return frequencies_buff_list, duty_cycles_buff_list
405 
def ioThinx_DO_Config_GetPwmConfigures(self, slot, start, count)
def ioThinx_DO_Config_SetPwmConfigures (   self,
  slot,
  start,
  count,
  frequencies_buff_list,
  duty_cycles_buff_list 
)

Definition at line 408 of file ioThinx_4530_API.py.

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))
416  if error is not 0:
417  raise ioThinxError(error)
418 
def ioThinx_Relay_GetValues (   self,
  slot 
)

Definition at line 419 of file ioThinx_4530_API.py.

419  def ioThinx_Relay_GetValues(self, slot):
420  p_values = ctypes.c_uint32()
421  error = self.lib.ioThinx_Relay_GetValues(ctypes.c_uint32(slot),
422  ctypes.byref(p_values))
423  if error is not 0:
424  raise ioThinxError(error)
425  values = [int(b) for b in bin(p_values.value)[2:].zfill(SLOT_CH_NUM)[::-1]]
426  return values
427 
def ioThinx_Relay_SetValues (   self,
  slot,
  buff_list 
)

Definition at line 428 of file ioThinx_4530_API.py.

428  def ioThinx_Relay_SetValues(self, slot, buff_list):
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))
432  if error is not 0:
433  raise ioThinxError(error)
434 
def ioThinx_Relay_SetValues(self, slot, buff_list)
def ioThinx_Relay_GetTotalCounts (   self,
  slot,
  start,
  count 
)

Definition at line 435 of file ioThinx_4530_API.py.

435  def ioThinx_Relay_GetTotalCounts(self, slot, start, count):
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),
440  ctypes.byref(buff))
441  if error is not 0:
442  raise ioThinxError(error)
443  buff_list = []
444  for value in buff:
445  buff_list.append(value)
446  return buff_list
447 
def ioThinx_Relay_GetTotalCounts(self, slot, start, count)
def ioThinx_Relay_GetCurrentCounts (   self,
  slot,
  start,
  count 
)

Definition at line 448 of file ioThinx_4530_API.py.

448  def ioThinx_Relay_GetCurrentCounts(self, slot, start, count):
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),
453  ctypes.byref(buff))
454  if error is not 0:
455  raise ioThinxError(error)
456  buff_list = []
457  for value in buff:
458  buff_list.append(value)
459  return buff_list
460 
def ioThinx_Relay_GetCurrentCounts(self, slot, start, count)
def ioThinx_Relay_ResetCurrentCounts (   self,
  slot,
  buff_list 
)

Definition at line 461 of file ioThinx_4530_API.py.

461  def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list):
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))
465  if error is not 0:
466  raise ioThinxError(error)
467 
def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list)
def ioThinx_AI_GetEngs (   self,
  slot,
  start,
  count 
)

Definition at line 468 of file ioThinx_4530_API.py.

468  def ioThinx_AI_GetEngs(self, slot, start, count):
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),
473  ctypes.byref(buff))
474  if error is not 0:
475  raise ioThinxError(error)
476  buff_list = []
477  for value in buff:
478  buff_list.append(value)
479  return buff_list
480 
def ioThinx_AI_GetEngs(self, slot, start, count)
def ioThinx_AI_GetMinEngs (   self,
  slot,
  start,
  count 
)

Definition at line 481 of file ioThinx_4530_API.py.

481  def ioThinx_AI_GetMinEngs(self, slot, start, count):
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),
486  ctypes.byref(buff))
487  if error is not 0:
488  raise ioThinxError(error)
489  buff_list = []
490  for value in buff:
491  buff_list.append(value)
492  return buff_list
493 
def ioThinx_AI_GetMinEngs(self, slot, start, count)
def ioThinx_AI_GetMaxEngs (   self,
  slot,
  start,
  count 
)

Definition at line 494 of file ioThinx_4530_API.py.

494  def ioThinx_AI_GetMaxEngs(self, slot, start, count):
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),
499  ctypes.byref(buff))
500  if error is not 0:
501  raise ioThinxError(error)
502  buff_list = []
503  for value in buff:
504  buff_list.append(value)
505  return buff_list
506 
def ioThinx_AI_GetMaxEngs(self, slot, start, count)
def ioThinx_AI_GetRaws (   self,
  slot,
  start,
  count 
)

Definition at line 507 of file ioThinx_4530_API.py.

507  def ioThinx_AI_GetRaws(self, slot, start, count):
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),
512  ctypes.byref(buff))
513  if error is not 0:
514  raise ioThinxError(error)
515  buff_list = []
516  for value in buff:
517  buff_list.append(value)
518  return buff_list
519 
def ioThinx_AI_GetRaws(self, slot, start, count)
def ioThinx_AI_GetMinRaws (   self,
  slot,
  start,
  count 
)

Definition at line 520 of file ioThinx_4530_API.py.

520  def ioThinx_AI_GetMinRaws(self, slot, start, count):
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),
525  ctypes.byref(buff))
526  if error is not 0:
527  raise ioThinxError(error)
528  buff_list = []
529  for value in buff:
530  buff_list.append(value)
531  return buff_list
532 
def ioThinx_AI_GetMinRaws(self, slot, start, count)
def ioThinx_AI_GetMaxRaws (   self,
  slot,
  start,
  count 
)

Definition at line 533 of file ioThinx_4530_API.py.

533  def ioThinx_AI_GetMaxRaws(self, slot, start, count):
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),
538  ctypes.byref(buff))
539  if error is not 0:
540  raise ioThinxError(error)
541  buff_list = []
542  for value in buff:
543  buff_list.append(value)
544  return buff_list
545 
def ioThinx_AI_GetMaxRaws(self, slot, start, count)
def ioThinx_AI_ResetMins (   self,
  slot,
  buff_list 
)

Definition at line 546 of file ioThinx_4530_API.py.

546  def ioThinx_AI_ResetMins(self, slot, buff_list):
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))
550  if error is not 0:
551  raise ioThinxError(error)
552 
def ioThinx_AI_ResetMaxs (   self,
  slot,
  buff_list 
)

Definition at line 553 of file ioThinx_4530_API.py.

553  def ioThinx_AI_ResetMaxs(self, slot, buff_list):
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))
557  if error is not 0:
558  raise ioThinxError(error)
559 
def ioThinx_AI_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 560 of file ioThinx_4530_API.py.

560  def ioThinx_AI_GetStatuss(self, slot, start, count):
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),
565  ctypes.byref(buff))
566  if error is not 0:
567  raise ioThinxError(error)
568  buff_list = []
569  for value in buff:
570  buff_list.append(value)
571  return buff_list
572 
def ioThinx_AI_GetStatuss(self, slot, start, count)
def ioThinx_AI_Config_GetRanges (   self,
  slot,
  start,
  count 
)

Definition at line 573 of file ioThinx_4530_API.py.

573  def ioThinx_AI_Config_GetRanges(self, slot, start, count):
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),
578  ctypes.byref(buff))
579  if error is not 0:
580  raise ioThinxError(error)
581  buff_list = []
582  for value in buff:
583  buff_list.append(value)
584  return buff_list
585 
def ioThinx_AI_Config_GetRanges(self, slot, start, count)
def ioThinx_AI_Config_SetRanges (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 586 of file ioThinx_4530_API.py.

586  def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list):
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),
591  ctypes.byref(buff))
592  if error is not 0:
593  raise ioThinxError(error)
594 
def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list)
def ioThinx_AI_Config_GetBurnoutValues (   self,
  slot,
  start,
  count 
)

Definition at line 595 of file ioThinx_4530_API.py.

595  def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, 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),
600  ctypes.byref(buff))
601  if error is not 0:
602  raise ioThinxError(error)
603  buff_list = []
604  for value in buff:
605  buff_list.append(value)
606  return buff_list
607 
def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, count)
def ioThinx_AI_Config_SetBurnoutValues (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 608 of file ioThinx_4530_API.py.

608  def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list):
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),
613  ctypes.byref(buff))
614  if error is not 0:
615  raise ioThinxError(error)
616 
def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list)
def ioThinx_AO_GetEngs (   self,
  slot,
  start,
  count 
)

Definition at line 617 of file ioThinx_4530_API.py.

617  def ioThinx_AO_GetEngs(self, slot, start, 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),
622  ctypes.byref(buff))
623  if error is not 0:
624  raise ioThinxError(error)
625  buff_list = []
626  for value in buff:
627  buff_list.append(value)
628  return buff_list
629 
def ioThinx_AO_GetEngs(self, slot, start, count)
def ioThinx_AO_SetEngs (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 630 of file ioThinx_4530_API.py.

630  def ioThinx_AO_SetEngs(self, slot, start, count, buff_list):
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),
635  ctypes.byref(buff))
636  if error is not 0:
637  raise ioThinxError(error)
638 
def ioThinx_AO_SetEngs(self, slot, start, count, buff_list)
def ioThinx_AO_GetRaws (   self,
  slot,
  start,
  count 
)

Definition at line 639 of file ioThinx_4530_API.py.

639  def ioThinx_AO_GetRaws(self, slot, start, 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),
644  ctypes.byref(buff))
645  if error is not 0:
646  raise ioThinxError(error)
647  buff_list = []
648  for value in buff:
649  buff_list.append(value)
650  return buff_list
651 
def ioThinx_AO_GetRaws(self, slot, start, count)
def ioThinx_AO_SetRaws (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 652 of file ioThinx_4530_API.py.

652  def ioThinx_AO_SetRaws(self, slot, start, count, buff_list):
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),
657  ctypes.byref(buff))
658  if error is not 0:
659  raise ioThinxError(error)
660 
def ioThinx_AO_SetRaws(self, slot, start, count, buff_list)
def ioThinx_AO_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 661 of file ioThinx_4530_API.py.

661  def ioThinx_AO_GetStatuss(self, slot, start, 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),
666  ctypes.byref(buff))
667  if error is not 0:
668  raise ioThinxError(error)
669  buff_list = []
670  for value in buff:
671  buff_list.append(value)
672  return buff_list
673 
def ioThinx_AO_GetStatuss(self, slot, start, count)
def ioThinx_AO_Config_GetRanges (   self,
  slot,
  start,
  count 
)

Definition at line 674 of file ioThinx_4530_API.py.

674  def ioThinx_AO_Config_GetRanges(self, slot, start, count):
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),
679  ctypes.byref(buff))
680  if error is not 0:
681  raise ioThinxError(error)
682  buff_list = []
683  for value in buff:
684  buff_list.append(value)
685  return buff_list
686 
def ioThinx_AO_Config_GetRanges(self, slot, start, count)
def ioThinx_AO_Config_SetRanges (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 687 of file ioThinx_4530_API.py.

687  def ioThinx_AO_Config_SetRanges(self, slot, start, count, buff_list):
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),
692  ctypes.byref(buff))
693  if error is not 0:
694  raise ioThinxError(error)
695 
696 
def ioThinx_AO_Config_SetRanges(self, slot, start, count, buff_list)
def ioThinx_TC_GetValues (   self,
  slot,
  start,
  count 
)

Definition at line 697 of file ioThinx_4530_API.py.

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 is not 0:
704  raise ioThinxError(error)
705  buff_list = []
706  for value in buff:
707  buff_list.append(value)
708  return buff_list
709 
def ioThinx_TC_GetValues(self, slot, start, count)
def ioThinx_TC_GetMinValues (   self,
  slot,
  start,
  count 
)

Definition at line 710 of file ioThinx_4530_API.py.

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 is not 0:
717  raise ioThinxError(error)
718  buff_list = []
719  for value in buff:
720  buff_list.append(value)
721  return buff_list
722 
def ioThinx_TC_GetMinValues(self, slot, start, count)
def ioThinx_TC_GetMaxValues (   self,
  slot,
  start,
  count 
)

Definition at line 723 of file ioThinx_4530_API.py.

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 is not 0:
730  raise ioThinxError(error)
731  buff_list = []
732  for value in buff:
733  buff_list.append(value)
734  return buff_list
735 
def ioThinx_TC_GetMaxValues(self, slot, start, count)
def ioThinx_TC_ResetMins (   self,
  slot,
  buff_list 
)

Definition at line 736 of file ioThinx_4530_API.py.

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 is not 0:
741  raise ioThinxError(error)
742 
def ioThinx_TC_ResetMaxs (   self,
  slot,
  buff_list 
)

Definition at line 743 of file ioThinx_4530_API.py.

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 is not 0:
748  raise ioThinxError(error)
749 
def ioThinx_TC_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 750 of file ioThinx_4530_API.py.

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 is not 0:
757  raise ioThinxError(error)
758  buff_list = []
759  for value in buff:
760  buff_list.append(value)
761  return buff_list
762 
def ioThinx_TC_GetStatuss(self, slot, start, count)
def ioThinx_TC_SetCalibrations (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 763 of file ioThinx_4530_API.py.

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 is not 0:
770  raise ioThinxError(error)
771 
def ioThinx_TC_SetCalibrations(self, slot, start, count, buff_list)
def ioThinx_TC_ResetCalibrations (   self,
  slot,
  start,
  count 
)

Definition at line 772 of file ioThinx_4530_API.py.

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 is not 0:
777  raise ioThinxError(error)
778 
def ioThinx_TC_ResetCalibrations(self, slot, start, count)
def ioThinx_TC_Config_GetSensorTypes (   self,
  slot,
  start,
  count 
)

Definition at line 779 of file ioThinx_4530_API.py.

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 is not 0:
786  raise ioThinxError(error)
787  buff_list = []
788  for value in buff:
789  buff_list.append(value)
790  return buff_list
791 
def ioThinx_TC_Config_GetSensorTypes(self, slot, start, count)
def ioThinx_TC_Config_SetSensorTypes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 792 of file ioThinx_4530_API.py.

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 is not 0:
799  raise ioThinxError(error)
800 
def ioThinx_TC_Config_SetSensorTypes(self, slot, start, count, buff_list)
def ioThinx_RTD_GetValues (   self,
  slot,
  start,
  count 
)

Definition at line 801 of file ioThinx_4530_API.py.

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 is not 0:
808  raise ioThinxError(error)
809  buff_list = []
810  for value in buff:
811  buff_list.append(value)
812  return buff_list
813 
def ioThinx_RTD_GetValues(self, slot, start, count)
def ioThinx_RTD_GetMinValues (   self,
  slot,
  start,
  count 
)

Definition at line 814 of file ioThinx_4530_API.py.

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 is not 0:
821  raise ioThinxError(error)
822  buff_list = []
823  for value in buff:
824  buff_list.append(value)
825  return buff_list
826 
def ioThinx_RTD_GetMinValues(self, slot, start, count)
def ioThinx_RTD_GetMaxValues (   self,
  slot,
  start,
  count 
)

Definition at line 827 of file ioThinx_4530_API.py.

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 is not 0:
834  raise ioThinxError(error)
835  buff_list = []
836  for value in buff:
837  buff_list.append(value)
838  return buff_list
839 
def ioThinx_RTD_GetMaxValues(self, slot, start, count)
def ioThinx_RTD_ResetMins (   self,
  slot,
  buff_list 
)

Definition at line 840 of file ioThinx_4530_API.py.

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 is not 0:
845  raise ioThinxError(error)
846 
def ioThinx_RTD_ResetMaxs (   self,
  slot,
  buff_list 
)

Definition at line 847 of file ioThinx_4530_API.py.

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 is not 0:
852  raise ioThinxError(error)
853 
def ioThinx_RTD_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 854 of file ioThinx_4530_API.py.

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 is not 0:
861  raise ioThinxError(error)
862  buff_list = []
863  for value in buff:
864  buff_list.append(value)
865  return buff_list
866 
def ioThinx_RTD_GetStatuss(self, slot, start, count)
def ioThinx_RTD_SetCalibrations (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 867 of file ioThinx_4530_API.py.

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 is not 0:
874  raise ioThinxError(error)
875 
def ioThinx_RTD_SetCalibrations(self, slot, start, count, buff_list)
def ioThinx_RTD_ResetCalibrations (   self,
  slot,
  start,
  count 
)

Definition at line 876 of file ioThinx_4530_API.py.

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 is not 0:
881  raise ioThinxError(error)
882 
def ioThinx_RTD_ResetCalibrations(self, slot, start, count)
def ioThinx_RTD_Config_GetSensorTypes (   self,
  slot,
  start,
  count 
)

Definition at line 883 of file ioThinx_4530_API.py.

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 is not 0:
890  raise ioThinxError(error)
891  buff_list = []
892  for value in buff:
893  buff_list.append(value)
894  return buff_list
895 
def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count)
def ioThinx_RTD_Config_SetSensorTypes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 896 of file ioThinx_4530_API.py.

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 is not 0:
903  raise ioThinxError(error)
904 
905 #
906 # PWR
907 #
908 
def ioThinx_RTD_Config_SetSensorTypes(self, slot, start, count, buff_list)
def ioThinx_PWR_GetSysStatus (   self,
  slot,
  start,
  count 
)

Definition at line 909 of file ioThinx_4530_API.py.

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 is not 0:
916  raise ioThinxError(error)
917  buff_list = []
918  for value in buff:
919  buff_list.append(value)
920  return buff_list
921 
def ioThinx_PWR_GetSysStatus(self, slot, start, count)
def ioThinx_PWR_GetFieldStatus (   self,
  slot,
  start,
  count 
)

Definition at line 922 of file ioThinx_4530_API.py.

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 is not 0:
929  raise ioThinxError(error)
930  buff_list = []
931  for value in buff:
932  buff_list.append(value)
933  return buff_list
934 
def ioThinx_PWR_GetFieldStatus(self, slot, start, count)
def ioThinx_PWR_Config_GetAlarms (   self,
  slot,
  start,
  count 
)

Definition at line 935 of file ioThinx_4530_API.py.

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 is not 0:
942  raise ioThinxError(error)
943  buff_list = []
944  for value in buff:
945  buff_list.append(value)
946  return buff_list
947 
def ioThinx_PWR_Config_GetAlarms(self, slot, start, count)
def ioThinx_PWR_Config_SetAlarms (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 948 of file ioThinx_4530_API.py.

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 is not 0:
955  raise ioThinxError(error)
956 
957 #
958 # Misc
959 #
960 
def ioThinx_PWR_Config_SetAlarms(self, slot, start, count, buff_list)
def ioThinx_Misc_GetModuleInfo (   self,
  slot 
)

Definition at line 961 of file ioThinx_4530_API.py.

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 is not 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 = [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')
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 
def ioThinx_Misc_GetModuleCount (   self)

Definition at line 991 of file ioThinx_4530_API.py.

992  pmodule_count = ctypes.c_uint32()
993  error = self.lib.ioThinx_Misc_GetModuleCount(ctypes.byref(pmodule_count))
994  if error is not 0:
995  raise ioThinxError(error)
996  return pmodule_count.value
997 
def ioThinx_Misc_GetRotarySwitchState (   self,
  slot 
)

Definition at line 998 of file ioThinx_4530_API.py.

999  p_state = ctypes.c_uint8()
1000  error = self.lib.ioThinx_Misc_GetRotarySwitchState(ctypes.c_uint32(slot),
1001  ctypes.byref(p_state))
1002  if error is not 0:
1003  raise ioThinxError(error)
1004  return p_state.value
1005 
def ioThinx_Misc_SetUserLedState (   self,
  slot,
  channel,
  state 
)

Definition at line 1006 of file ioThinx_4530_API.py.

1006  def ioThinx_Misc_SetUserLedState(self, slot, channel, state):
1007  error = self.lib.ioThinx_Misc_SetUserLedState(ctypes.c_uint32(slot),
1008  ctypes.c_uint8(channel),
1009  ctypes.c_uint8(state))
1010  if error is not 0:
1011  raise ioThinxError(error)
1012 
def ioThinx_Misc_SetUserLedState(self, slot, channel, state)
def ioThinx_Misc_GetPushButtonState (   self,
  slot 
)

Definition at line 1013 of file ioThinx_4530_API.py.

1014  p_state = ctypes.c_uint8()
1015  error = self.lib.ioThinx_Misc_GetPushButtonState(ctypes.c_uint32(slot),
1016  ctypes.byref(p_state))
1017  if error is not 0:
1018  raise ioThinxError(error)
1019  return p_state.value
1020 
def ioThinx_Misc_GetLocateState (   self,
  slot 
)

Definition at line 1021 of file ioThinx_4530_API.py.

1022  p_state = ctypes.c_uint8()
1023  error = self.lib.ioThinx_Misc_GetLocateState(ctypes.c_uint32(slot),
1024  ctypes.byref(p_state))
1025  if error is not 0:
1026  raise ioThinxError(error)
1027  return p_state.value
1028 
def ioThinx_Misc_SetLocateState (   self,
  slot,
  state 
)

Definition at line 1029 of file ioThinx_4530_API.py.

1029  def ioThinx_Misc_SetLocateState(self, slot, state):
1030  error = self.lib.ioThinx_Misc_SetLocateState(ctypes.c_uint32(slot),
1031  ctypes.c_uint8(state))
1032  if error is not 0:
1033  raise ioThinxError(error)
1034 
1035 #
1036 # Communication
1037 #
def ioThinx_Uart_Open (   self,
  slot,
  port,
  mode,
  baudrate 
)

Definition at line 1038 of file ioThinx_4530_API.py.

1038  def ioThinx_Uart_Open(self, slot, port, mode, baudrate):
1039  fd = ctypes.c_int()
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),
1045  ctypes.byref(fd)
1046  )
1047  if error is not 0:
1048  raise ioThinxError(error)
1049 
1050  return fd.value

Field Documentation

c_api_version

Definition at line 47 of file ioThinx_4530_API.py.

shared_library_dir

Definition at line 48 of file ioThinx_4530_API.py.

shared_library_filename

Definition at line 49 of file ioThinx_4530_API.py.

lib

Definition at line 59 of file ioThinx_4530_API.py.


The documentation for this class was generated from the following file: