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_GetModuleInfoML (self, slot)
 
def ioThinx_Misc_GetModuleCount (self)
 
def ioThinx_Misc_GetModuleCountML (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_Serial_GetDevName (self, slot, port)
 
def ioThinx_Serial_SetInterface (self, slot, port, mode)
 
def ioThinx_Serial_GetInterface (self, slot, port)
 

Data Fields

 shared_library_dir
 
 shared_library_filename
 
 lib
 

Detailed Description

Definition at line 26 of file ioThinx_4530_API.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 27 of file ioThinx_4530_API.py.

27  def __init__(self):
28  super(ioThinx_4530_API, self).__init__()
29  self.shared_library_dir = "/usr/lib/iothinx/"
30  self.shared_library_filename = "libiothinxio.so"
31 
32  shared_library = self.shared_library_dir + self.shared_library_filename
33  self.lib = ctypes.cdll.LoadLibrary(shared_library)
35 

Member Function Documentation

def get_shared_library_version (   self)

Definition at line 36 of file ioThinx_4530_API.py.

37  for file in os.listdir(self.shared_library_dir):
38  if self.shared_library_filename in file and len(file.split(".")) == 5:
39  return(str(".".join(file.split(".")[2:5])))
40 
def ioThinx_IO_Client_Init (   self)

Definition at line 41 of file ioThinx_4530_API.py.

42  error = self.lib.ioThinx_IO_Client_Init(None)
43  if error is not 0:
44  raise ioThinxError(error)
45 
def ioThinx_IO_GetBusStatus (   self)

Definition at line 46 of file ioThinx_4530_API.py.

47  p_status = ctypes.c_uint8()
48  error = self.lib.ioThinx_IO_GetBusStatus(ctypes.byref(p_status))
49  if error is not 0:
50  raise ioThinxError(error)
51  return p_status.value
52 
def ioThinx_IO_Config_Reload (   self)

Definition at line 53 of file ioThinx_4530_API.py.

54  error = self.lib.ioThinx_IO_Config_Reload(None)
55  if error is not 0:
56  raise ioThinxError(error)
57 
58 #
59 # DI
60 #
61 
def ioThinx_DI_GetValues (   self,
  slot 
)

Definition at line 62 of file ioThinx_4530_API.py.

62  def ioThinx_DI_GetValues(self, slot):
63  p_values = ctypes.c_uint32()
64  error = self.lib.ioThinx_DI_GetValues(ctypes.c_uint32(slot),
65  ctypes.byref(p_values))
66  if error is not 0:
67  raise ioThinxError(error)
68  values = [int(b) for b in bin(p_values.value)
69  [2:].zfill(SLOT_CH_NUM)[::-1]]
70  return values
71 
def ioThinx_DI_GetCntValues (   self,
  slot,
  start,
  count 
)

Definition at line 72 of file ioThinx_4530_API.py.

72  def ioThinx_DI_GetCntValues(self, slot, start, count):
73  buff = (ctypes.c_uint32 * count)()
74  error = self.lib.ioThinx_DI_GetCntValues(ctypes.c_uint32(slot),
75  ctypes.c_uint8(start),
76  ctypes.c_uint8(count),
77  ctypes.byref(buff))
78  if error is not 0:
79  raise ioThinxError(error)
80  buff_list = []
81  for value in buff:
82  buff_list.append(value)
83  return buff_list
84 
def ioThinx_DI_GetCntValues(self, slot, start, count)
def ioThinx_DI_SetCntValues (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 85 of file ioThinx_4530_API.py.

85  def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list):
86  buff = (ctypes.c_uint32 * count)(*buff_list)
87  error = self.lib.ioThinx_DI_SetCntValues(ctypes.c_uint32(slot),
88  ctypes.c_uint8(start),
89  ctypes.c_uint8(count),
90  ctypes.byref(buff))
91  if error is not 0:
92  raise ioThinxError(error)
93 
def ioThinx_DI_SetCntValues(self, slot, start, count, buff_list)
def ioThinx_DI_GetCntStarts (   self,
  slot 
)

Definition at line 94 of file ioThinx_4530_API.py.

94  def ioThinx_DI_GetCntStarts(self, slot):
95  p_starts = ctypes.c_uint32()
96  error = self.lib.ioThinx_DI_GetCntStarts(ctypes.c_uint32(slot),
97  ctypes.byref(p_starts))
98  if error is not 0:
99  raise ioThinxError(error)
100  starts = [int(b) for b in bin(p_starts.value)
101  [2:].zfill(SLOT_CH_NUM)[::-1]]
102  return starts
103 
def ioThinx_DI_SetCntStarts (   self,
  slot,
  buff_list 
)

Definition at line 104 of file ioThinx_4530_API.py.

104  def ioThinx_DI_SetCntStarts(self, slot, buff_list):
105  starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
106  error = self.lib.ioThinx_DI_SetCntStarts(ctypes.c_uint32(slot),
107  ctypes.c_uint32(starts))
108  if error is not 0:
109  raise ioThinxError(error)
110 
def ioThinx_DI_SetCntStarts(self, slot, buff_list)
def ioThinx_DI_SetCntStops (   self,
  slot,
  buff_list 
)

Definition at line 111 of file ioThinx_4530_API.py.

111  def ioThinx_DI_SetCntStops(self, slot, buff_list):
112  starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
113  error = self.lib.ioThinx_DI_SetCntStops(ctypes.c_uint32(slot),
114  ctypes.c_uint32(starts))
115  if error is not 0:
116  raise ioThinxError(error)
117 
def ioThinx_DI_GetCntOverflows (   self,
  slot 
)

Definition at line 118 of file ioThinx_4530_API.py.

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

Definition at line 128 of file ioThinx_4530_API.py.

128  def ioThinx_DI_SetCntOverflows(self, slot, buff_list):
129  overflows = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
130  error = self.lib.ioThinx_DI_SetCntOverflows(ctypes.c_uint32(slot),
131  ctypes.c_uint32(overflows))
132  if error is not 0:
133  raise ioThinxError(error)
134 
def ioThinx_DI_SetCntOverflows(self, slot, buff_list)
def ioThinx_DI_Config_GetModes (   self,
  slot,
  start,
  count 
)

Definition at line 135 of file ioThinx_4530_API.py.

135  def ioThinx_DI_Config_GetModes(self, slot, start, count):
136  buff = (ctypes.c_uint8 * count)()
137  error = self.lib.ioThinx_DI_Config_GetModes(ctypes.c_uint32(slot),
138  ctypes.c_uint8(start),
139  ctypes.c_uint8(count),
140  ctypes.byref(buff))
141  if error is not 0:
142  raise ioThinxError(error)
143  buff_list = []
144  for value in buff:
145  buff_list.append(value)
146  return buff_list
147 
def ioThinx_DI_Config_GetModes(self, slot, start, count)
def ioThinx_DI_Config_SetModes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 148 of file ioThinx_4530_API.py.

148  def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list):
149  buff = (ctypes.c_uint8 * count)(*buff_list)
150  error = self.lib.ioThinx_DI_Config_SetModes(ctypes.c_uint32(slot),
151  ctypes.c_uint8(start),
152  ctypes.c_uint8(count),
153  ctypes.byref(buff))
154  if error is not 0:
155  raise ioThinxError(error)
156 
def ioThinx_DI_Config_SetModes(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetFilters (   self,
  slot,
  start,
  count 
)

Definition at line 157 of file ioThinx_4530_API.py.

157  def ioThinx_DI_Config_GetFilters(self, slot, start, count):
158  buff = (ctypes.c_uint16 * count)()
159  error = self.lib.ioThinx_DI_Config_GetFilters(ctypes.c_uint32(slot),
160  ctypes.c_uint8(start),
161  ctypes.c_uint8(count),
162  ctypes.byref(buff))
163  if error is not 0:
164  raise ioThinxError(error)
165  buff_list = []
166  for value in buff:
167  buff_list.append(value)
168  return buff_list
169 
def ioThinx_DI_Config_GetFilters(self, slot, start, count)
def ioThinx_DI_Config_SetFilters (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 170 of file ioThinx_4530_API.py.

170  def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list):
171  buff = (ctypes.c_uint16 * count)(*buff_list)
172  error = self.lib.ioThinx_DI_Config_SetFilters(ctypes.c_uint32(slot),
173  ctypes.c_uint8(start),
174  ctypes.c_uint8(count),
175  ctypes.byref(buff))
176  if error is not 0:
177  raise ioThinxError(error)
178 
def ioThinx_DI_Config_SetFilters(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetCntTriggers (   self,
  slot,
  start,
  count 
)

Definition at line 179 of file ioThinx_4530_API.py.

179  def ioThinx_DI_Config_GetCntTriggers(self, slot, start, count):
180  buff = (ctypes.c_uint8 * count)()
181  error = self.lib.ioThinx_DI_Config_GetCntTriggers(ctypes.c_uint32(slot),
182  ctypes.c_uint8(start),
183  ctypes.c_uint8(count),
184  ctypes.byref(buff))
185  if error is not 0:
186  raise ioThinxError(error)
187  buff_list = []
188  for value in buff:
189  buff_list.append(value)
190  return buff_list
191 
def ioThinx_DI_Config_GetCntTriggers(self, slot, start, count)
def ioThinx_DI_Config_SetCntTriggers (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 192 of file ioThinx_4530_API.py.

192  def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list):
193  buff = (ctypes.c_uint8 * count)(*buff_list)
194  error = self.lib.ioThinx_DI_Config_SetCntTriggers(ctypes.c_uint32(slot),
195  ctypes.c_uint8(start),
196  ctypes.c_uint8(count),
197  ctypes.byref(buff))
198  if error is not 0:
199  raise ioThinxError(error)
200 
def ioThinx_DI_Config_SetCntTriggers(self, slot, start, count, buff_list)
def ioThinx_DI_Config_GetCntValues (   self,
  slot,
  start,
  count 
)

Definition at line 201 of file ioThinx_4530_API.py.

201  def ioThinx_DI_Config_GetCntValues(self, slot, start, count):
202  buff = (ctypes.c_uint32 * count)()
203  error = self.lib.ioThinx_DI_Config_GetCntValues(ctypes.c_uint32(slot),
204  ctypes.c_uint8(start),
205  ctypes.c_uint8(count),
206  ctypes.byref(buff))
207  if error is not 0:
208  raise ioThinxError(error)
209  buff_list = []
210  for value in buff:
211  buff_list.append(value)
212  return buff_list
213 
def ioThinx_DI_Config_GetCntValues(self, slot, start, count)
def ioThinx_DI_Config_SetCntValues (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 214 of file ioThinx_4530_API.py.

214  def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list):
215  buff = (ctypes.c_uint32 * count)(*buff_list)
216  error = self.lib.ioThinx_DI_Config_SetCntValues(ctypes.c_uint32(slot),
217  ctypes.c_uint8(start),
218  ctypes.c_uint8(count),
219  ctypes.byref(buff))
220  if error is not 0:
221  raise ioThinxError(error)
222 #
223 # DO
224 #
225 
def ioThinx_DI_Config_SetCntValues(self, slot, start, count, buff_list)
def ioThinx_DO_GetValues (   self,
  slot 
)

Definition at line 226 of file ioThinx_4530_API.py.

226  def ioThinx_DO_GetValues(self, slot):
227  p_values = ctypes.c_uint32()
228  error = self.lib.ioThinx_DO_GetValues(ctypes.c_uint32(slot),
229  ctypes.byref(p_values))
230  if error is not 0:
231  raise ioThinxError(error)
232  values = [int(b) for b in bin(p_values.value)
233  [2:].zfill(SLOT_CH_NUM)[::-1]]
234  return values
235 
def ioThinx_DO_SetValues (   self,
  slot,
  buff_list 
)

Definition at line 236 of file ioThinx_4530_API.py.

236  def ioThinx_DO_SetValues(self, slot, buff_list):
237  values = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
238  error = self.lib.ioThinx_DO_SetValues(ctypes.c_uint32(slot),
239  ctypes.c_uint32(values))
240  if error is not 0:
241  raise ioThinxError(error)
242 
def ioThinx_DO_GetPwmCounts (   self,
  slot,
  start,
  count 
)

Definition at line 243 of file ioThinx_4530_API.py.

243  def ioThinx_DO_GetPwmCounts(self, slot, start, count):
244  buff = (ctypes.c_uint32 * count)()
245  error = self.lib.ioThinx_DO_GetPwmCounts(ctypes.c_uint32(slot),
246  ctypes.c_uint8(start),
247  ctypes.c_uint8(count),
248  ctypes.byref(buff))
249  if error is not 0:
250  raise ioThinxError(error)
251  buff_list = []
252  for value in buff:
253  buff_list.append(value)
254  return buff_list
255 
def ioThinx_DO_GetPwmCounts(self, slot, start, count)
def ioThinx_DO_SetPwmCounts (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 256 of file ioThinx_4530_API.py.

256  def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list):
257  buff = (ctypes.c_uint32 * count)(*buff_list)
258  error = self.lib.ioThinx_DO_SetPwmCounts(ctypes.c_uint32(slot),
259  ctypes.c_uint8(start),
260  ctypes.c_uint8(count),
261  ctypes.byref(buff))
262  if error is not 0:
263  raise ioThinxError(error)
264 
def ioThinx_DO_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_DO_GetPwmStarts (   self,
  slot 
)

Definition at line 265 of file ioThinx_4530_API.py.

265  def ioThinx_DO_GetPwmStarts(self, slot):
266  p_starts = ctypes.c_uint32()
267  error = self.lib.ioThinx_DO_GetPwmStarts(ctypes.c_uint32(slot),
268  ctypes.byref(p_starts))
269  if error is not 0:
270  raise ioThinxError(error)
271  starts = [int(b) for b in bin(p_starts.value)
272  [2:].zfill(SLOT_CH_NUM)[::-1]]
273  return starts
274 
def ioThinx_DO_SetPwmStarts (   self,
  slot,
  buff_list 
)

Definition at line 275 of file ioThinx_4530_API.py.

275  def ioThinx_DO_SetPwmStarts(self, slot, buff_list):
276  starts = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
277  error = self.lib.ioThinx_DO_SetPwmStarts(ctypes.c_uint32(slot),
278  ctypes.c_uint32(starts))
279  if error is not 0:
280  raise ioThinxError(error)
281 
def ioThinx_DO_SetPwmStarts(self, slot, buff_list)
def ioThinx_DO_SetPwmStops (   self,
  slot,
  buff_list 
)

Definition at line 282 of file ioThinx_4530_API.py.

282  def ioThinx_DO_SetPwmStops(self, slot, buff_list):
283  stops = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
284  error = self.lib.ioThinx_DO_SetPwmStops(ctypes.c_uint32(slot),
285  ctypes.c_uint32(stops))
286  if error is not 0:
287  raise ioThinxError(error)
288 
def ioThinx_DO_GetPwmConfigures (   self,
  slot,
  start,
  count 
)

Definition at line 289 of file ioThinx_4530_API.py.

289  def ioThinx_DO_GetPwmConfigures(self, slot, start, count):
290  frequencies_buff = (ctypes.c_uint16 * count)()
291  duty_cycles_buff = (ctypes.c_uint16 * count)()
292  error = self.lib.ioThinx_DO_GetPwmConfigures(ctypes.c_uint32(slot),
293  ctypes.c_uint8(start),
294  ctypes.c_uint8(count),
295  ctypes.byref(
296  frequencies_buff),
297  ctypes.byref(duty_cycles_buff))
298  if error is not 0:
299  raise ioThinxError(error)
300 
301  frequencies_buff_list = []
302  for value in frequencies_buff:
303  frequencies_buff_list.append(value)
304  duty_cycles_buff_list = []
305  for value in duty_cycles_buff:
306  duty_cycles_buff_list.append(value)
307  return frequencies_buff_list, duty_cycles_buff_list
308 
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 311 of file ioThinx_4530_API.py.

311  duty_cycles_buff_list):
312  frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
313  duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
314  error = self.lib.ioThinx_DO_SetPwmConfigures(ctypes.c_uint32(slot),
315  ctypes.c_uint8(start),
316  ctypes.c_uint8(count),
317  ctypes.byref(
318  frequencies_buff),
319  ctypes.byref(duty_cycles_buff))
320  if error is not 0:
321  raise ioThinxError(error)
322 
def ioThinx_DO_Config_GetModes (   self,
  slot,
  start,
  count 
)

Definition at line 323 of file ioThinx_4530_API.py.

323  def ioThinx_DO_Config_GetModes(self, slot, start, count):
324  buff = (ctypes.c_uint8 * count)()
325  error = self.lib.ioThinx_DO_Config_GetModes(ctypes.c_uint32(slot),
326  ctypes.c_uint8(start),
327  ctypes.c_uint8(count),
328  ctypes.byref(buff))
329  if error is not 0:
330  raise ioThinxError(error)
331  buff_list = []
332  for value in buff:
333  buff_list.append(value)
334  return buff_list
335 
def ioThinx_DO_Config_GetModes(self, slot, start, count)
def ioThinx_DO_Config_SetModes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 336 of file ioThinx_4530_API.py.

336  def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list):
337  buff = (ctypes.c_uint8 * count)(*buff_list)
338  error = self.lib.ioThinx_DO_Config_SetModes(ctypes.c_uint32(slot),
339  ctypes.c_uint8(start),
340  ctypes.c_uint8(count),
341  ctypes.byref(buff))
342  if error is not 0:
343  raise ioThinxError(error)
344 
def ioThinx_DO_Config_SetModes(self, slot, start, count, buff_list)
def ioThinx_DO_Config_GetPwmCounts (   self,
  slot,
  start,
  count 
)

Definition at line 345 of file ioThinx_4530_API.py.

345  def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count):
346  buff = (ctypes.c_uint32 * count)()
347  error = self.lib.ioThinx_DO_Config_GetPwmCounts(ctypes.c_uint32(slot),
348  ctypes.c_uint8(start),
349  ctypes.c_uint8(count),
350  ctypes.byref(buff))
351  if error is not 0:
352  raise ioThinxError(error)
353  buff_list = []
354  for value in buff:
355  buff_list.append(value)
356  return buff_list
357 
def ioThinx_DO_Config_GetPwmCounts(self, slot, start, count)
def ioThinx_DO_Config_SetPwmCounts (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 358 of file ioThinx_4530_API.py.

358  def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list):
359  buff = (ctypes.c_uint32 * count)(*buff_list)
360  error = self.lib.ioThinx_DO_Config_SetPwmCounts(ctypes.c_uint32(slot),
361  ctypes.c_uint8(start),
362  ctypes.c_uint8(count),
363  ctypes.byref(buff))
364  if error is not 0:
365  raise ioThinxError(error)
366 
def ioThinx_DO_Config_SetPwmCounts(self, slot, start, count, buff_list)
def ioThinx_DO_Config_GetPwmConfigures (   self,
  slot,
  start,
  count 
)

Definition at line 367 of file ioThinx_4530_API.py.

367  def ioThinx_DO_Config_GetPwmConfigures(self, slot, start, count):
368  frequencies_buff = (ctypes.c_uint16 * count)()
369  duty_cycles_buff = (ctypes.c_uint16 * count)()
370  error = self.lib.ioThinx_DO_Config_GetPwmConfigures(ctypes.c_uint32(slot),
371  ctypes.c_uint8(
372  start),
373  ctypes.c_uint8(
374  count),
375  ctypes.byref(
376  frequencies_buff),
377  ctypes.byref(duty_cycles_buff))
378  if error is not 0:
379  raise ioThinxError(error)
380 
381  frequencies_buff_list = []
382  for value in frequencies_buff:
383  frequencies_buff_list.append(value)
384  duty_cycles_buff_list = []
385  for value in duty_cycles_buff:
386  duty_cycles_buff_list.append(value)
387 
388  return frequencies_buff_list, duty_cycles_buff_list
389 
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 392 of file ioThinx_4530_API.py.

392  duty_cycles_buff_list):
393  frequencies_buff = (ctypes.c_uint16 * count)(*frequencies_buff_list)
394  duty_cycles_buff = (ctypes.c_uint16 * count)(*duty_cycles_buff_list)
395  error = self.lib.ioThinx_DO_Config_SetPwmConfigures(ctypes.c_uint32(slot),
396  ctypes.c_uint8(
397  start),
398  ctypes.c_uint8(
399  count),
400  ctypes.byref(
401  frequencies_buff),
402  ctypes.byref(duty_cycles_buff))
403  if error is not 0:
404  raise ioThinxError(error)
405 
def ioThinx_Relay_GetValues (   self,
  slot 
)

Definition at line 406 of file ioThinx_4530_API.py.

406  def ioThinx_Relay_GetValues(self, slot):
407  p_values = ctypes.c_uint32()
408  error = self.lib.ioThinx_Relay_GetValues(ctypes.c_uint32(slot),
409  ctypes.byref(p_values))
410  if error is not 0:
411  raise ioThinxError(error)
412  values = [int(b) for b in bin(p_values.value)
413  [2:].zfill(SLOT_CH_NUM)[::-1]]
414  return values
415 
def ioThinx_Relay_SetValues (   self,
  slot,
  buff_list 
)

Definition at line 416 of file ioThinx_4530_API.py.

416  def ioThinx_Relay_SetValues(self, slot, buff_list):
417  values = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
418  error = self.lib.ioThinx_Relay_SetValues(ctypes.c_uint32(slot),
419  ctypes.c_uint32(values))
420  if error is not 0:
421  raise ioThinxError(error)
422 
def ioThinx_Relay_SetValues(self, slot, buff_list)
def ioThinx_Relay_GetTotalCounts (   self,
  slot,
  start,
  count 
)

Definition at line 423 of file ioThinx_4530_API.py.

423  def ioThinx_Relay_GetTotalCounts(self, slot, start, count):
424  buff = (ctypes.c_uint32 * count)()
425  error = self.lib.ioThinx_Relay_GetTotalCounts(ctypes.c_uint32(slot),
426  ctypes.c_uint8(start),
427  ctypes.c_uint8(count),
428  ctypes.byref(buff))
429  if error is not 0:
430  raise ioThinxError(error)
431  buff_list = []
432  for value in buff:
433  buff_list.append(value)
434  return buff_list
435 
def ioThinx_Relay_GetTotalCounts(self, slot, start, count)
def ioThinx_Relay_GetCurrentCounts (   self,
  slot,
  start,
  count 
)

Definition at line 436 of file ioThinx_4530_API.py.

436  def ioThinx_Relay_GetCurrentCounts(self, slot, start, count):
437  buff = (ctypes.c_uint32 * count)()
438  error = self.lib.ioThinx_Relay_GetCurrentCounts(ctypes.c_uint32(slot),
439  ctypes.c_uint8(start),
440  ctypes.c_uint8(count),
441  ctypes.byref(buff))
442  if error is not 0:
443  raise ioThinxError(error)
444  buff_list = []
445  for value in buff:
446  buff_list.append(value)
447  return buff_list
448 
def ioThinx_Relay_GetCurrentCounts(self, slot, start, count)
def ioThinx_Relay_ResetCurrentCounts (   self,
  slot,
  buff_list 
)

Definition at line 449 of file ioThinx_4530_API.py.

449  def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list):
450  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
451  error = self.lib.ioThinx_Relay_ResetCurrentCounts(ctypes.c_uint32(slot),
452  ctypes.c_uint32(resets))
453  if error is not 0:
454  raise ioThinxError(error)
455 
def ioThinx_Relay_ResetCurrentCounts(self, slot, buff_list)
def ioThinx_AI_GetEngs (   self,
  slot,
  start,
  count 
)

Definition at line 456 of file ioThinx_4530_API.py.

456  def ioThinx_AI_GetEngs(self, slot, start, count):
457  buff = (ctypes.c_float * count)()
458  error = self.lib.ioThinx_AI_GetEngs(ctypes.c_uint32(slot),
459  ctypes.c_uint8(start),
460  ctypes.c_uint8(count),
461  ctypes.byref(buff))
462  if error is not 0:
463  raise ioThinxError(error)
464  buff_list = []
465  for value in buff:
466  buff_list.append(value)
467  return buff_list
468 
def ioThinx_AI_GetEngs(self, slot, start, count)
def ioThinx_AI_GetMinEngs (   self,
  slot,
  start,
  count 
)

Definition at line 469 of file ioThinx_4530_API.py.

469  def ioThinx_AI_GetMinEngs(self, slot, start, count):
470  buff = (ctypes.c_float * count)()
471  error = self.lib.ioThinx_AI_GetMinEngs(ctypes.c_uint32(slot),
472  ctypes.c_uint8(start),
473  ctypes.c_uint8(count),
474  ctypes.byref(buff))
475  if error is not 0:
476  raise ioThinxError(error)
477  buff_list = []
478  for value in buff:
479  buff_list.append(value)
480  return buff_list
481 
def ioThinx_AI_GetMinEngs(self, slot, start, count)
def ioThinx_AI_GetMaxEngs (   self,
  slot,
  start,
  count 
)

Definition at line 482 of file ioThinx_4530_API.py.

482  def ioThinx_AI_GetMaxEngs(self, slot, start, count):
483  buff = (ctypes.c_float * count)()
484  error = self.lib.ioThinx_AI_GetMaxEngs(ctypes.c_uint32(slot),
485  ctypes.c_uint8(start),
486  ctypes.c_uint8(count),
487  ctypes.byref(buff))
488  if error is not 0:
489  raise ioThinxError(error)
490  buff_list = []
491  for value in buff:
492  buff_list.append(value)
493  return buff_list
494 
def ioThinx_AI_GetMaxEngs(self, slot, start, count)
def ioThinx_AI_GetRaws (   self,
  slot,
  start,
  count 
)

Definition at line 495 of file ioThinx_4530_API.py.

495  def ioThinx_AI_GetRaws(self, slot, start, count):
496  buff = (ctypes.c_uint32 * count)()
497  error = self.lib.ioThinx_AI_GetRaws(ctypes.c_uint32(slot),
498  ctypes.c_uint8(start),
499  ctypes.c_uint8(count),
500  ctypes.byref(buff))
501  if error is not 0:
502  raise ioThinxError(error)
503  buff_list = []
504  for value in buff:
505  buff_list.append(value)
506  return buff_list
507 
def ioThinx_AI_GetRaws(self, slot, start, count)
def ioThinx_AI_GetMinRaws (   self,
  slot,
  start,
  count 
)

Definition at line 508 of file ioThinx_4530_API.py.

508  def ioThinx_AI_GetMinRaws(self, slot, start, count):
509  buff = (ctypes.c_uint32 * count)()
510  error = self.lib.ioThinx_AI_GetMinRaws(ctypes.c_uint32(slot),
511  ctypes.c_uint8(start),
512  ctypes.c_uint8(count),
513  ctypes.byref(buff))
514  if error is not 0:
515  raise ioThinxError(error)
516  buff_list = []
517  for value in buff:
518  buff_list.append(value)
519  return buff_list
520 
def ioThinx_AI_GetMinRaws(self, slot, start, count)
def ioThinx_AI_GetMaxRaws (   self,
  slot,
  start,
  count 
)

Definition at line 521 of file ioThinx_4530_API.py.

521  def ioThinx_AI_GetMaxRaws(self, slot, start, count):
522  buff = (ctypes.c_uint32 * count)()
523  error = self.lib.ioThinx_AI_GetMaxRaws(ctypes.c_uint32(slot),
524  ctypes.c_uint8(start),
525  ctypes.c_uint8(count),
526  ctypes.byref(buff))
527  if error is not 0:
528  raise ioThinxError(error)
529  buff_list = []
530  for value in buff:
531  buff_list.append(value)
532  return buff_list
533 
def ioThinx_AI_GetMaxRaws(self, slot, start, count)
def ioThinx_AI_ResetMins (   self,
  slot,
  buff_list 
)

Definition at line 534 of file ioThinx_4530_API.py.

534  def ioThinx_AI_ResetMins(self, slot, buff_list):
535  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
536  error = self.lib.ioThinx_AI_ResetMins(ctypes.c_uint32(slot),
537  ctypes.c_uint32(resets))
538  if error is not 0:
539  raise ioThinxError(error)
540 
def ioThinx_AI_ResetMaxs (   self,
  slot,
  buff_list 
)

Definition at line 541 of file ioThinx_4530_API.py.

541  def ioThinx_AI_ResetMaxs(self, slot, buff_list):
542  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
543  error = self.lib.ioThinx_AI_ResetMaxs(ctypes.c_uint32(slot),
544  ctypes.c_uint32(resets))
545  if error is not 0:
546  raise ioThinxError(error)
547 
def ioThinx_AI_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 548 of file ioThinx_4530_API.py.

548  def ioThinx_AI_GetStatuss(self, slot, start, count):
549  buff = (ctypes.c_uint8 * count)()
550  error = self.lib.ioThinx_AI_GetStatuss(ctypes.c_uint32(slot),
551  ctypes.c_uint8(start),
552  ctypes.c_uint8(count),
553  ctypes.byref(buff))
554  if error is not 0:
555  raise ioThinxError(error)
556  buff_list = []
557  for value in buff:
558  buff_list.append(value)
559  return buff_list
560 
def ioThinx_AI_GetStatuss(self, slot, start, count)
def ioThinx_AI_Config_GetRanges (   self,
  slot,
  start,
  count 
)

Definition at line 561 of file ioThinx_4530_API.py.

561  def ioThinx_AI_Config_GetRanges(self, slot, start, count):
562  buff = (ctypes.c_uint8 * count)()
563  error = self.lib.ioThinx_AI_Config_GetRanges(ctypes.c_uint32(slot),
564  ctypes.c_uint8(start),
565  ctypes.c_uint8(count),
566  ctypes.byref(buff))
567  if error is not 0:
568  raise ioThinxError(error)
569  buff_list = []
570  for value in buff:
571  buff_list.append(value)
572  return buff_list
573 
def ioThinx_AI_Config_GetRanges(self, slot, start, count)
def ioThinx_AI_Config_SetRanges (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 574 of file ioThinx_4530_API.py.

574  def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list):
575  buff = (ctypes.c_uint8 * count)(*buff_list)
576  error = self.lib.ioThinx_AI_Config_SetRanges(ctypes.c_uint32(slot),
577  ctypes.c_uint8(start),
578  ctypes.c_uint8(count),
579  ctypes.byref(buff))
580  if error is not 0:
581  raise ioThinxError(error)
582 
def ioThinx_AI_Config_SetRanges(self, slot, start, count, buff_list)
def ioThinx_AI_Config_GetBurnoutValues (   self,
  slot,
  start,
  count 
)

Definition at line 583 of file ioThinx_4530_API.py.

583  def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, count):
584  buff = (ctypes.c_float * count)()
585  error = self.lib.ioThinx_AI_Config_GetBurnoutValues(ctypes.c_uint32(slot),
586  ctypes.c_uint8(
587  start),
588  ctypes.c_uint8(
589  count),
590  ctypes.byref(buff))
591  if error is not 0:
592  raise ioThinxError(error)
593  buff_list = []
594  for value in buff:
595  buff_list.append(value)
596  return buff_list
597 
def ioThinx_AI_Config_GetBurnoutValues(self, slot, start, count)
def ioThinx_AI_Config_SetBurnoutValues (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 598 of file ioThinx_4530_API.py.

598  def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list):
599  buff = (ctypes.c_float * count)(*buff_list)
600  error = self.lib.ioThinx_AI_Config_SetBurnoutValues(ctypes.c_uint32(slot),
601  ctypes.c_uint8(
602  start),
603  ctypes.c_uint8(
604  count),
605  ctypes.byref(buff))
606  if error is not 0:
607  raise ioThinxError(error)
608 
def ioThinx_AI_Config_SetBurnoutValues(self, slot, start, count, buff_list)
def ioThinx_AO_GetEngs (   self,
  slot,
  start,
  count 
)

Definition at line 609 of file ioThinx_4530_API.py.

609  def ioThinx_AO_GetEngs(self, slot, start, count):
610  buff = (ctypes.c_float * count)()
611  error = self.lib.ioThinx_AO_GetEngs(ctypes.c_uint32(slot),
612  ctypes.c_uint8(start),
613  ctypes.c_uint8(count),
614  ctypes.byref(buff))
615  if error is not 0:
616  raise ioThinxError(error)
617  buff_list = []
618  for value in buff:
619  buff_list.append(value)
620  return buff_list
621 
def ioThinx_AO_GetEngs(self, slot, start, count)
def ioThinx_AO_SetEngs (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 622 of file ioThinx_4530_API.py.

622  def ioThinx_AO_SetEngs(self, slot, start, count, buff_list):
623  buff = (ctypes.c_float * count)(*buff_list)
624  error = self.lib.ioThinx_AO_SetEngs(ctypes.c_uint32(slot),
625  ctypes.c_uint8(start),
626  ctypes.c_uint8(count),
627  ctypes.byref(buff))
628  if error is not 0:
629  raise ioThinxError(error)
630 
def ioThinx_AO_SetEngs(self, slot, start, count, buff_list)
def ioThinx_AO_GetRaws (   self,
  slot,
  start,
  count 
)

Definition at line 631 of file ioThinx_4530_API.py.

631  def ioThinx_AO_GetRaws(self, slot, start, count):
632  buff = (ctypes.c_uint16 * count)()
633  error = self.lib.ioThinx_AO_GetRaws(ctypes.c_uint32(slot),
634  ctypes.c_uint8(start),
635  ctypes.c_uint8(count),
636  ctypes.byref(buff))
637  if error is not 0:
638  raise ioThinxError(error)
639  buff_list = []
640  for value in buff:
641  buff_list.append(value)
642  return buff_list
643 
def ioThinx_AO_GetRaws(self, slot, start, count)
def ioThinx_AO_SetRaws (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 644 of file ioThinx_4530_API.py.

644  def ioThinx_AO_SetRaws(self, slot, start, count, buff_list):
645  buff = (ctypes.c_uint16 * count)(*buff_list)
646  error = self.lib.ioThinx_AO_SetRaws(ctypes.c_uint32(slot),
647  ctypes.c_uint8(start),
648  ctypes.c_uint8(count),
649  ctypes.byref(buff))
650  if error is not 0:
651  raise ioThinxError(error)
652 
def ioThinx_AO_SetRaws(self, slot, start, count, buff_list)
def ioThinx_AO_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 653 of file ioThinx_4530_API.py.

653  def ioThinx_AO_GetStatuss(self, slot, start, count):
654  buff = (ctypes.c_uint8 * count)()
655  error = self.lib.ioThinx_AO_GetStatuss(ctypes.c_uint32(slot),
656  ctypes.c_uint8(start),
657  ctypes.c_uint8(count),
658  ctypes.byref(buff))
659  if error is not 0:
660  raise ioThinxError(error)
661  buff_list = []
662  for value in buff:
663  buff_list.append(value)
664  return buff_list
665 
def ioThinx_AO_GetStatuss(self, slot, start, count)
def ioThinx_AO_Config_GetRanges (   self,
  slot,
  start,
  count 
)

Definition at line 666 of file ioThinx_4530_API.py.

666  def ioThinx_AO_Config_GetRanges(self, slot, start, count):
667  buff = (ctypes.c_uint8 * count)()
668  error = self.lib.ioThinx_AO_Config_GetRanges(ctypes.c_uint32(slot),
669  ctypes.c_uint8(start),
670  ctypes.c_uint8(count),
671  ctypes.byref(buff))
672  if error is not 0:
673  raise ioThinxError(error)
674  buff_list = []
675  for value in buff:
676  buff_list.append(value)
677  return buff_list
678 
def ioThinx_AO_Config_GetRanges(self, slot, start, count)
def ioThinx_AO_Config_SetRanges (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 679 of file ioThinx_4530_API.py.

679  def ioThinx_AO_Config_SetRanges(self, slot, start, count, buff_list):
680  buff = (ctypes.c_uint8 * count)(*buff_list)
681  error = self.lib.ioThinx_AO_Config_SetRanges(ctypes.c_uint32(slot),
682  ctypes.c_uint8(start),
683  ctypes.c_uint8(count),
684  ctypes.byref(buff))
685  if error is not 0:
686  raise ioThinxError(error)
687 
def ioThinx_AO_Config_SetRanges(self, slot, start, count, buff_list)
def ioThinx_TC_GetValues (   self,
  slot,
  start,
  count 
)

Definition at line 688 of file ioThinx_4530_API.py.

688  def ioThinx_TC_GetValues(self, slot, start, count):
689  buff = (ctypes.c_float * count)()
690  error = self.lib.ioThinx_TC_GetValues(ctypes.c_uint32(slot),
691  ctypes.c_uint8(start),
692  ctypes.c_uint8(count),
693  ctypes.byref(buff))
694  if error is not 0:
695  raise ioThinxError(error)
696  buff_list = []
697  for value in buff:
698  buff_list.append(value)
699  return buff_list
700 
def ioThinx_TC_GetValues(self, slot, start, count)
def ioThinx_TC_GetMinValues (   self,
  slot,
  start,
  count 
)

Definition at line 701 of file ioThinx_4530_API.py.

701  def ioThinx_TC_GetMinValues(self, slot, start, count):
702  buff = (ctypes.c_float * count)()
703  error = self.lib.ioThinx_TC_GetMinValues(ctypes.c_uint32(slot),
704  ctypes.c_uint8(start),
705  ctypes.c_uint8(count),
706  ctypes.byref(buff))
707  if error is not 0:
708  raise ioThinxError(error)
709  buff_list = []
710  for value in buff:
711  buff_list.append(value)
712  return buff_list
713 
def ioThinx_TC_GetMinValues(self, slot, start, count)
def ioThinx_TC_GetMaxValues (   self,
  slot,
  start,
  count 
)

Definition at line 714 of file ioThinx_4530_API.py.

714  def ioThinx_TC_GetMaxValues(self, slot, start, count):
715  buff = (ctypes.c_float * count)()
716  error = self.lib.ioThinx_TC_GetMaxValues(ctypes.c_uint32(slot),
717  ctypes.c_uint8(start),
718  ctypes.c_uint8(count),
719  ctypes.byref(buff))
720  if error is not 0:
721  raise ioThinxError(error)
722  buff_list = []
723  for value in buff:
724  buff_list.append(value)
725  return buff_list
726 
def ioThinx_TC_GetMaxValues(self, slot, start, count)
def ioThinx_TC_ResetMins (   self,
  slot,
  buff_list 
)

Definition at line 727 of file ioThinx_4530_API.py.

727  def ioThinx_TC_ResetMins(self, slot, buff_list):
728  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
729  error = self.lib.ioThinx_TC_ResetMins(ctypes.c_uint32(slot),
730  ctypes.c_uint32(resets))
731  if error is not 0:
732  raise ioThinxError(error)
733 
def ioThinx_TC_ResetMaxs (   self,
  slot,
  buff_list 
)

Definition at line 734 of file ioThinx_4530_API.py.

734  def ioThinx_TC_ResetMaxs(self, slot, buff_list):
735  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
736  error = self.lib.ioThinx_TC_ResetMaxs(ctypes.c_uint32(slot),
737  ctypes.c_uint32(resets))
738  if error is not 0:
739  raise ioThinxError(error)
740 
def ioThinx_TC_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 741 of file ioThinx_4530_API.py.

741  def ioThinx_TC_GetStatuss(self, slot, start, count):
742  buff = (ctypes.c_uint8 * count)()
743  error = self.lib.ioThinx_TC_GetStatuss(ctypes.c_uint32(slot),
744  ctypes.c_uint8(start),
745  ctypes.c_uint8(count),
746  ctypes.byref(buff))
747  if error is not 0:
748  raise ioThinxError(error)
749  buff_list = []
750  for value in buff:
751  buff_list.append(value)
752  return buff_list
753 
def ioThinx_TC_GetStatuss(self, slot, start, count)
def ioThinx_TC_SetCalibrations (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 754 of file ioThinx_4530_API.py.

754  def ioThinx_TC_SetCalibrations(self, slot, start, count, buff_list):
755  buff = (ctypes.c_float * count)(*buff_list)
756  error = self.lib.ioThinx_TC_SetCalibrations(ctypes.c_uint32(slot),
757  ctypes.c_uint8(start),
758  ctypes.c_uint8(count),
759  ctypes.byref(buff))
760  if error is not 0:
761  raise ioThinxError(error)
762 
def ioThinx_TC_SetCalibrations(self, slot, start, count, buff_list)
def ioThinx_TC_ResetCalibrations (   self,
  slot,
  start,
  count 
)

Definition at line 763 of file ioThinx_4530_API.py.

763  def ioThinx_TC_ResetCalibrations(self, slot, start, count):
764  error = self.lib.ioThinx_TC_ResetCalibrations(ctypes.c_uint32(slot),
765  ctypes.c_uint8(start),
766  ctypes.c_uint8(count))
767  if error is not 0:
768  raise ioThinxError(error)
769 
def ioThinx_TC_ResetCalibrations(self, slot, start, count)
def ioThinx_TC_Config_GetSensorTypes (   self,
  slot,
  start,
  count 
)

Definition at line 770 of file ioThinx_4530_API.py.

770  def ioThinx_TC_Config_GetSensorTypes(self, slot, start, count):
771  buff = (ctypes.c_uint8 * count)()
772  error = self.lib.ioThinx_TC_Config_GetSensorTypes(ctypes.c_uint32(slot),
773  ctypes.c_uint8(start),
774  ctypes.c_uint8(count),
775  ctypes.byref(buff))
776  if error is not 0:
777  raise ioThinxError(error)
778  buff_list = []
779  for value in buff:
780  buff_list.append(value)
781  return buff_list
782 
def ioThinx_TC_Config_GetSensorTypes(self, slot, start, count)
def ioThinx_TC_Config_SetSensorTypes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 783 of file ioThinx_4530_API.py.

783  def ioThinx_TC_Config_SetSensorTypes(self, slot, start, count, buff_list):
784  buff = (ctypes.c_uint8 * count)(*buff_list)
785  error = self.lib.ioThinx_TC_Config_SetSensorTypes(ctypes.c_uint32(slot),
786  ctypes.c_uint8(start),
787  ctypes.c_uint8(count),
788  ctypes.byref(buff))
789  if error is not 0:
790  raise ioThinxError(error)
791 
def ioThinx_TC_Config_SetSensorTypes(self, slot, start, count, buff_list)
def ioThinx_RTD_GetValues (   self,
  slot,
  start,
  count 
)

Definition at line 792 of file ioThinx_4530_API.py.

792  def ioThinx_RTD_GetValues(self, slot, start, count):
793  buff = (ctypes.c_float * count)()
794  error = self.lib.ioThinx_RTD_GetValues(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  buff_list = []
801  for value in buff:
802  buff_list.append(value)
803  return buff_list
804 
def ioThinx_RTD_GetValues(self, slot, start, count)
def ioThinx_RTD_GetMinValues (   self,
  slot,
  start,
  count 
)

Definition at line 805 of file ioThinx_4530_API.py.

805  def ioThinx_RTD_GetMinValues(self, slot, start, count):
806  buff = (ctypes.c_float * count)()
807  error = self.lib.ioThinx_RTD_GetMinValues(ctypes.c_uint32(slot),
808  ctypes.c_uint8(start),
809  ctypes.c_uint8(count),
810  ctypes.byref(buff))
811  if error is not 0:
812  raise ioThinxError(error)
813  buff_list = []
814  for value in buff:
815  buff_list.append(value)
816  return buff_list
817 
def ioThinx_RTD_GetMinValues(self, slot, start, count)
def ioThinx_RTD_GetMaxValues (   self,
  slot,
  start,
  count 
)

Definition at line 818 of file ioThinx_4530_API.py.

818  def ioThinx_RTD_GetMaxValues(self, slot, start, count):
819  buff = (ctypes.c_float * count)()
820  error = self.lib.ioThinx_RTD_GetMaxValues(ctypes.c_uint32(slot),
821  ctypes.c_uint8(start),
822  ctypes.c_uint8(count),
823  ctypes.byref(buff))
824  if error is not 0:
825  raise ioThinxError(error)
826  buff_list = []
827  for value in buff:
828  buff_list.append(value)
829  return buff_list
830 
def ioThinx_RTD_GetMaxValues(self, slot, start, count)
def ioThinx_RTD_ResetMins (   self,
  slot,
  buff_list 
)

Definition at line 831 of file ioThinx_4530_API.py.

831  def ioThinx_RTD_ResetMins(self, slot, buff_list):
832  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
833  error = self.lib.ioThinx_RTD_ResetMins(ctypes.c_uint32(slot),
834  ctypes.c_uint32(resets))
835  if error is not 0:
836  raise ioThinxError(error)
837 
def ioThinx_RTD_ResetMaxs (   self,
  slot,
  buff_list 
)

Definition at line 838 of file ioThinx_4530_API.py.

838  def ioThinx_RTD_ResetMaxs(self, slot, buff_list):
839  resets = int("".join(map(str, buff_list[:: -1])), BIN_TYPE)
840  error = self.lib.ioThinx_RTD_ResetMaxs(ctypes.c_uint32(slot),
841  ctypes.c_uint32(resets))
842  if error is not 0:
843  raise ioThinxError(error)
844 
def ioThinx_RTD_GetStatuss (   self,
  slot,
  start,
  count 
)

Definition at line 845 of file ioThinx_4530_API.py.

845  def ioThinx_RTD_GetStatuss(self, slot, start, count):
846  buff = (ctypes.c_uint8 * count)()
847  error = self.lib.ioThinx_RTD_GetStatuss(ctypes.c_uint32(slot),
848  ctypes.c_uint8(start),
849  ctypes.c_uint8(count),
850  ctypes.byref(buff))
851  if error is not 0:
852  raise ioThinxError(error)
853  buff_list = []
854  for value in buff:
855  buff_list.append(value)
856  return buff_list
857 
def ioThinx_RTD_GetStatuss(self, slot, start, count)
def ioThinx_RTD_SetCalibrations (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 858 of file ioThinx_4530_API.py.

858  def ioThinx_RTD_SetCalibrations(self, slot, start, count, buff_list):
859  buff = (ctypes.c_float * count)(*buff_list)
860  error = self.lib.ioThinx_RTD_SetCalibrations(ctypes.c_uint32(slot),
861  ctypes.c_uint8(start),
862  ctypes.c_uint8(count),
863  ctypes.byref(buff))
864  if error is not 0:
865  raise ioThinxError(error)
866 
def ioThinx_RTD_SetCalibrations(self, slot, start, count, buff_list)
def ioThinx_RTD_ResetCalibrations (   self,
  slot,
  start,
  count 
)

Definition at line 867 of file ioThinx_4530_API.py.

867  def ioThinx_RTD_ResetCalibrations(self, slot, start, count):
868  error = self.lib.ioThinx_RTD_ResetCalibrations(ctypes.c_uint32(slot),
869  ctypes.c_uint8(start),
870  ctypes.c_uint8(count))
871  if error is not 0:
872  raise ioThinxError(error)
873 
def ioThinx_RTD_ResetCalibrations(self, slot, start, count)
def ioThinx_RTD_Config_GetSensorTypes (   self,
  slot,
  start,
  count 
)

Definition at line 874 of file ioThinx_4530_API.py.

874  def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count):
875  buff = (ctypes.c_uint8 * count)()
876  error = self.lib.ioThinx_RTD_Config_GetSensorTypes(ctypes.c_uint32(slot),
877  ctypes.c_uint8(
878  start),
879  ctypes.c_uint8(
880  count),
881  ctypes.byref(buff))
882  if error is not 0:
883  raise ioThinxError(error)
884  buff_list = []
885  for value in buff:
886  buff_list.append(value)
887  return buff_list
888 
def ioThinx_RTD_Config_GetSensorTypes(self, slot, start, count)
def ioThinx_RTD_Config_SetSensorTypes (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 889 of file ioThinx_4530_API.py.

889  def ioThinx_RTD_Config_SetSensorTypes(self, slot, start, count, buff_list):
890  buff = (ctypes.c_uint8 * count)(*buff_list)
891  error = self.lib.ioThinx_RTD_Config_SetSensorTypes(ctypes.c_uint32(slot),
892  ctypes.c_uint8(
893  start),
894  ctypes.c_uint8(
895  count),
896  ctypes.byref(buff))
897  if error is not 0:
898  raise ioThinxError(error)
899 
900 #
901 # PWR
902 #
903 
def ioThinx_RTD_Config_SetSensorTypes(self, slot, start, count, buff_list)
def ioThinx_PWR_GetSysStatus (   self,
  slot,
  start,
  count 
)

Definition at line 904 of file ioThinx_4530_API.py.

904  def ioThinx_PWR_GetSysStatus(self, slot, start, count):
905  buff = (ctypes.c_uint8 * count)()
906  error = self.lib.ioThinx_PWR_GetSysStatus(ctypes.c_uint32(slot),
907  ctypes.c_uint8(start),
908  ctypes.c_uint8(count),
909  ctypes.byref(buff))
910  if error is not 0:
911  raise ioThinxError(error)
912  buff_list = []
913  for value in buff:
914  buff_list.append(value)
915  return buff_list
916 
def ioThinx_PWR_GetSysStatus(self, slot, start, count)
def ioThinx_PWR_GetFieldStatus (   self,
  slot,
  start,
  count 
)

Definition at line 917 of file ioThinx_4530_API.py.

917  def ioThinx_PWR_GetFieldStatus(self, slot, start, count):
918  buff = (ctypes.c_uint8 * count)()
919  error = self.lib.ioThinx_PWR_GetFieldStatus(ctypes.c_uint32(slot),
920  ctypes.c_uint8(start),
921  ctypes.c_uint8(count),
922  ctypes.byref(buff))
923  if error is not 0:
924  raise ioThinxError(error)
925  buff_list = []
926  for value in buff:
927  buff_list.append(value)
928  return buff_list
929 
def ioThinx_PWR_GetFieldStatus(self, slot, start, count)
def ioThinx_PWR_Config_GetAlarms (   self,
  slot,
  start,
  count 
)

Definition at line 930 of file ioThinx_4530_API.py.

930  def ioThinx_PWR_Config_GetAlarms(self, slot, start, count):
931  buff = (ctypes.c_float * count)()
932  error = self.lib.ioThinx_PWR_Config_GetAlarms(ctypes.c_uint32(slot),
933  ctypes.c_uint8(start),
934  ctypes.c_uint8(count),
935  ctypes.byref(buff))
936  if error is not 0:
937  raise ioThinxError(error)
938  buff_list = []
939  for value in buff:
940  buff_list.append(value)
941  return buff_list
942 
def ioThinx_PWR_Config_GetAlarms(self, slot, start, count)
def ioThinx_PWR_Config_SetAlarms (   self,
  slot,
  start,
  count,
  buff_list 
)

Definition at line 943 of file ioThinx_4530_API.py.

943  def ioThinx_PWR_Config_SetAlarms(self, slot, start, count, buff_list):
944  buff = (ctypes.c_float * count)(*buff_list)
945  error = self.lib.ioThinx_PWR_Config_SetAlarms(ctypes.c_uint32(slot),
946  ctypes.c_uint8(start),
947  ctypes.c_uint8(count),
948  ctypes.byref(buff))
949  if error is not 0:
950  raise ioThinxError(error)
951 
952 #
953 # Misc
954 #
955 
def ioThinx_PWR_Config_SetAlarms(self, slot, start, count, buff_list)
def ioThinx_Misc_GetModuleInfo (   self,
  slot 
)

Definition at line 956 of file ioThinx_4530_API.py.

956  def ioThinx_Misc_GetModuleInfo(self, slot):
957  class MODULE_INFO(ctypes.Structure):
958  _fields_ = [('model_name', (ctypes.c_uint8 * 20)),
959  ('product_id', ctypes.c_uint32),
960  ('fwr_version', ctypes.c_uint16),
961  ('fwr_build_date', ctypes.c_uint32),
962  ('serial_number', (ctypes.c_uint8 * 13))]
963 
964  p_module_info = MODULE_INFO()
965  error = self.lib.ioThinx_Misc_GetModuleInfo(ctypes.c_uint8(slot),
966  ctypes.byref(p_module_info))
967  if error is not 0:
968  raise ioThinxError(error)
969 
970  def convert_build_date_from_hex_to_datetime():
971  build_date = hex(p_module_info.fwr_build_date).strip(
972  '0x').strip('L')
973  build_date = ['{:02d}'.format(
974  int(build_date[i:i + 2], 16)) for i in range(0, len(build_date), BIN_TYPE)]
975  build_date = datetime.strptime("".join(build_date), '%y%m%d%H')
976  return build_date
977  fwr_build_date = convert_build_date_from_hex_to_datetime()
978 
979  module_info = {
980  'model_name': str(bytearray(p_module_info.model_name).decode().rstrip('\x00')),
981  'product_id': hex(p_module_info.product_id).rstrip("L"),
982  'fwr_version': hex(p_module_info.fwr_version),
983  'fwr_build_date': fwr_build_date,
984  'serial_number': str(bytearray(p_module_info.serial_number).decode().rstrip('\x00')),
985  }
986  return module_info
987 
char const int const cJSON_bool format
Definition: cJSON.h:161
def ioThinx_Misc_GetModuleInfoML (   self,
  slot 
)

Definition at line 988 of file ioThinx_4530_API.py.

989  class MODULE_INFO(ctypes.Structure):
990  _fields_ = [('model_name', (ctypes.c_uint8 * 20)),
991  ('product_id', ctypes.c_uint32),
992  ('fwr_version', ctypes.c_uint16),
993  ('fwr_build_date', ctypes.c_uint32),
994  ('serial_number', (ctypes.c_uint8 * 13))]
995 
996  p_module_info = MODULE_INFO()
997  error = self.lib.ioThinx_Misc_GetModuleInfoML(ctypes.c_uint8(slot),
998  ctypes.byref(p_module_info))
999  if error is not 0:
1000  raise ioThinxError(error)
1001 
1002  def convert_build_date_from_hex_to_datetime():
1003  build_date = hex(p_module_info.fwr_build_date).strip(
1004  '0x').strip('L')
1005  build_date = ['{:02d}'.format(
1006  int(build_date[i:i + 2], 16)) for i in range(0, len(build_date), BIN_TYPE)]
1007  build_date = datetime.strptime("".join(build_date), '%y%m%d%H')
1008  return build_date
1009  fwr_build_date = convert_build_date_from_hex_to_datetime()
1010 
1011  module_info = {
1012  'model_name': str(bytearray(p_module_info.model_name).decode().rstrip('\x00')),
1013  'product_id': hex(p_module_info.product_id).rstrip("L"),
1014  'fwr_version': hex(p_module_info.fwr_version),
1015  'fwr_build_date': fwr_build_date,
1016  'serial_number': str(bytearray(p_module_info.serial_number).decode().rstrip('\x00')),
1017  }
1018  return module_info
1019 
char const int const cJSON_bool format
Definition: cJSON.h:161
def ioThinx_Misc_GetModuleCount (   self)

Definition at line 1020 of file ioThinx_4530_API.py.

1021  p_module_count = ctypes.c_uint32()
1022  error = self.lib.ioThinx_Misc_GetModuleCount(
1023  ctypes.byref(p_module_count))
1024  if error is not 0:
1025  raise ioThinxError(error)
1026  return p_module_count.value
1027 
def ioThinx_Misc_GetModuleCountML (   self)

Definition at line 1028 of file ioThinx_4530_API.py.

1029  p_module_count = ctypes.c_uint32()
1030  error = self.lib.ioThinx_Misc_GetModuleCountML(
1031  ctypes.byref(p_module_count))
1032  if error is not 0:
1033  raise ioThinxError(error)
1034  return p_module_count.value
1035 
def ioThinx_Misc_GetRotarySwitchState (   self,
  slot 
)

Definition at line 1036 of file ioThinx_4530_API.py.

1037  p_state = ctypes.c_uint8()
1038  error = self.lib.ioThinx_Misc_GetRotarySwitchState(ctypes.c_uint32(slot),
1039  ctypes.byref(p_state))
1040  if error is not 0:
1041  raise ioThinxError(error)
1042  return p_state.value
1043 
def ioThinx_Misc_SetUserLedState (   self,
  slot,
  channel,
  state 
)

Definition at line 1044 of file ioThinx_4530_API.py.

1044  def ioThinx_Misc_SetUserLedState(self, slot, channel, state):
1045  error = self.lib.ioThinx_Misc_SetUserLedState(ctypes.c_uint32(slot),
1046  ctypes.c_uint8(channel),
1047  ctypes.c_uint8(state))
1048  if error is not 0:
1049  raise ioThinxError(error)
1050 
def ioThinx_Misc_SetUserLedState(self, slot, channel, state)
def ioThinx_Misc_GetPushButtonState (   self,
  slot 
)

Definition at line 1051 of file ioThinx_4530_API.py.

1052  p_state = ctypes.c_uint8()
1053  error = self.lib.ioThinx_Misc_GetPushButtonState(ctypes.c_uint32(slot),
1054  ctypes.byref(p_state))
1055  if error is not 0:
1056  raise ioThinxError(error)
1057  return p_state.value
1058 
def ioThinx_Misc_GetLocateState (   self,
  slot 
)

Definition at line 1059 of file ioThinx_4530_API.py.

1060  p_state = ctypes.c_uint8()
1061  error = self.lib.ioThinx_Misc_GetLocateState(ctypes.c_uint32(slot),
1062  ctypes.byref(p_state))
1063  if error is not 0:
1064  raise ioThinxError(error)
1065  return p_state.value
1066 
def ioThinx_Misc_SetLocateState (   self,
  slot,
  state 
)

Definition at line 1067 of file ioThinx_4530_API.py.

1067  def ioThinx_Misc_SetLocateState(self, slot, state):
1068  error = self.lib.ioThinx_Misc_SetLocateState(ctypes.c_uint32(slot),
1069  ctypes.c_uint8(state))
1070  if error is not 0:
1071  raise ioThinxError(error)
1072 
1073 #
1074 # Communication
1075 #
1076 
def ioThinx_Serial_GetDevName (   self,
  slot,
  port 
)

Definition at line 1077 of file ioThinx_4530_API.py.

1077  def ioThinx_Serial_GetDevName(self, slot, port):
1078  buff = (ctypes.c_uint8 * 20)()
1079  p_name = (ctypes.c_uint8 * 20)()
1080  error = self.lib.ioThinx_Serial_GetDevName(
1081  ctypes.c_uint32(slot),
1082  ctypes.c_uint32(port),
1083  ctypes.byref(p_name)
1084  )
1085  if error is not 0:
1086  raise ioThinxError(error)
1087 
1088  buff_list = []
1089  for value in p_name:
1090  buff_list.append(value)
1091 
1092  dev_name = bytes(buff_list).decode('ascii')
1093  return dev_name
1094 
def ioThinx_Serial_SetInterface (   self,
  slot,
  port,
  mode 
)

Definition at line 1095 of file ioThinx_4530_API.py.

1095  def ioThinx_Serial_SetInterface(self, slot, port, mode):
1096  error = self.lib.ioThinx_Serial_SetInterface(
1097  ctypes.c_uint32(slot),
1098  ctypes.c_uint32(port),
1099  ctypes.c_uint32(mode)
1100  )
1101 
1102  if error is not 0:
1103  raise ioThinxError(error)
1104 
def ioThinx_Serial_SetInterface(self, slot, port, mode)
def ioThinx_Serial_GetInterface (   self,
  slot,
  port 
)

Definition at line 1105 of file ioThinx_4530_API.py.

1105  def ioThinx_Serial_GetInterface(self, slot, port):
1106  mode = ctypes.c_uint32()
1107  error = self.lib.ioThinx_Serial_GetInterface(
1108  ctypes.c_uint32(slot),
1109  ctypes.c_uint32(port),
1110  ctypes.byref(mode)
1111  )
1112  if error is not 0:
1113  raise ioThinxError(error)
1114  return mode.value

Field Documentation

shared_library_dir

Definition at line 29 of file ioThinx_4530_API.py.

shared_library_filename

Definition at line 30 of file ioThinx_4530_API.py.

lib

Definition at line 33 of file ioThinx_4530_API.py.


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