quarchpy 2.1.20.dev2__py2.py3-none-any.whl → 2.1.20.dev3__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. quarchpy/.idea/.name +1 -1
  2. quarchpy/.idea/inspectionProfiles/Project_Default.xml +26 -0
  3. quarchpy/.idea/modules.xml +0 -1
  4. quarchpy/.idea/quarchpy.iml +1 -4
  5. quarchpy/.idea/workspace.xml +21 -226
  6. quarchpy/__pycache__/__init__.cpython-311.pyc +0 -0
  7. quarchpy/__pycache__/_version.cpython-311.pyc +0 -0
  8. quarchpy/__pycache__/connection.cpython-311.pyc +0 -0
  9. quarchpy/__pycache__/run.cpython-311.pyc +0 -0
  10. quarchpy/_version.py +1 -1
  11. quarchpy/config_files/__pycache__/__init__.cpython-311.pyc +0 -0
  12. quarchpy/config_files/__pycache__/quarch_config_parser.cpython-311.pyc +0 -0
  13. quarchpy/connection_specific/QPS/qis/help.txt +12 -4
  14. quarchpy/connection_specific/QPS/qis/qis.jar +0 -0
  15. quarchpy/connection_specific/QPS/qis/qis_lib/CInterface-1.7.8.jar +0 -0
  16. quarchpy/connection_specific/QPS/qis/qis_lib/Collections-2.4.jar +0 -0
  17. quarchpy/connection_specific/QPS/qis/qis_lib/Desktop-1.1.jar +0 -0
  18. quarchpy/connection_specific/QPS/qis/qis_lib/Executor-3.13.jar +0 -0
  19. quarchpy/connection_specific/QPS/qis/qis_lib/JNA-1.2.jar +0 -0
  20. quarchpy/connection_specific/QPS/qis/qis_lib/OS-1.8.jar +0 -0
  21. quarchpy/connection_specific/QPS/qis/qis_lib/QuarchCommon-0.2.9.jar +0 -0
  22. quarchpy/connection_specific/QPS/qis/qis_lib/SystemTray-4.4.jar +0 -0
  23. quarchpy/connection_specific/QPS/qis/qis_lib/Updates-1.1.jar +0 -0
  24. quarchpy/connection_specific/QPS/qis/qis_lib/Utilities-1.46.jar +0 -0
  25. quarchpy/connection_specific/QPS/qis/qis_lib/commons-csv-1.8.jar +0 -0
  26. quarchpy/connection_specific/QPS/qis/qis_lib/javassist-3.29.2-GA.jar +0 -0
  27. quarchpy/connection_specific/QPS/qis/qis_lib/jna-jpms-5.12.1.jar +0 -0
  28. quarchpy/connection_specific/QPS/qis/qis_lib/jna-platform-jpms-5.12.1.jar +0 -0
  29. quarchpy/connection_specific/QPS/qis/qis_lib/kotlin-stdlib-1.9.21.jar +0 -0
  30. quarchpy/connection_specific/QPS/qis/qis_lib/slf4j-api-2.0.9.jar +0 -0
  31. quarchpy/connection_specific/QPS/qis/qis_lib/slf4j-simple-2.0.9.jar +0 -0
  32. quarchpy/connection_specific/QPS/qis/resources/filters/Example.txt +36 -0
  33. quarchpy/connection_specific/QPS/qis/resources/filters/filters.csv +1004 -0
  34. quarchpy/connection_specific/QPS/qis/resources/filters/iec_filters.xml +26 -0
  35. quarchpy/connection_specific/QPS/qis/resources/filters/iec_filters.xml.bak +26 -0
  36. quarchpy/connection_specific/QPS/qps.jar +0 -0
  37. quarchpy/connection_specific/QPS/qps_lib/QuarchCommon-0.2.9.jar +0 -0
  38. quarchpy/connection_specific/QPS/qps_lib/commons-lang3-3.12.0.jar +0 -0
  39. quarchpy/connection_specific/QPS/qps_lib/opencsv-5.9.jar +0 -0
  40. quarchpy/connection_specific/QPS/qps_lib/qis-1.40.jar +0 -0
  41. quarchpy/connection_specific/QPS/scriptCommands.txt +2 -2
  42. quarchpy/connection_specific/__pycache__/StreamChannels.cpython-311.pyc +0 -0
  43. quarchpy/connection_specific/__pycache__/__init__.cpython-311.pyc +0 -0
  44. quarchpy/connection_specific/__pycache__/connection_QIS.cpython-311.pyc +0 -0
  45. quarchpy/connection_specific/__pycache__/connection_QPS.cpython-311.pyc +0 -0
  46. quarchpy/connection_specific/__pycache__/connection_ReST.cpython-311.pyc +0 -0
  47. quarchpy/connection_specific/__pycache__/connection_Serial.cpython-311.pyc +0 -0
  48. quarchpy/connection_specific/__pycache__/connection_TCP.cpython-311.pyc +0 -0
  49. quarchpy/connection_specific/__pycache__/connection_Telnet.cpython-311.pyc +0 -0
  50. quarchpy/connection_specific/__pycache__/connection_USB.cpython-311.pyc +0 -0
  51. quarchpy/connection_specific/__pycache__/connection_mDNS.cpython-311.pyc +0 -0
  52. quarchpy/connection_specific/connection_QIS.py +5 -3
  53. quarchpy/connection_specific/connection_QIS.py.bak +1738 -0
  54. quarchpy/connection_specific/serial/__pycache__/__init__.cpython-311.pyc +0 -0
  55. quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-311.pyc +0 -0
  56. quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-311.pyc +0 -0
  57. quarchpy/connection_specific/serial/__pycache__/win32.cpython-311.pyc +0 -0
  58. quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-311.pyc +0 -0
  59. quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-311.pyc +0 -0
  60. quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-311.pyc +0 -0
  61. quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-311.pyc +0 -0
  62. quarchpy/connection_specific/usb_libs/__pycache__/libusb1.cpython-311.pyc +0 -0
  63. quarchpy/connection_specific/usb_libs/__pycache__/usb1.cpython-311.pyc +0 -0
  64. quarchpy/debug/TextScanIP.py +11 -0
  65. quarchpy/debug/__pycache__/SystemTest.cpython-311.pyc +0 -0
  66. quarchpy/debug/__pycache__/__init__.cpython-311.pyc +0 -0
  67. quarchpy/debug/__pycache__/module_debug.cpython-311.pyc +0 -0
  68. quarchpy/debug/__pycache__/simple_terminal.cpython-311.pyc +0 -0
  69. quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-311.pyc +0 -0
  70. quarchpy/debug/__pycache__/versionCompare.cpython-311.pyc +0 -0
  71. quarchpy/device/__pycache__/__init__.cpython-311.pyc +0 -0
  72. quarchpy/device/__pycache__/device.cpython-311.pyc +0 -0
  73. quarchpy/device/__pycache__/quarchArray.cpython-311.pyc +0 -0
  74. quarchpy/device/__pycache__/quarchPPM.cpython-311.pyc +0 -0
  75. quarchpy/device/__pycache__/quarchQPS.cpython-311.pyc +0 -0
  76. quarchpy/device/__pycache__/scanDevices.cpython-311.pyc +0 -0
  77. quarchpy/device/device.py.bak +504 -0
  78. quarchpy/device/quarchPPM.py.bak +67 -0
  79. quarchpy/device/quarchQPS.py.bak +396 -0
  80. quarchpy/device/scanDevices.py.bak +130 -108
  81. quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-311.pyc +0 -0
  82. quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-311.pyc +0 -0
  83. quarchpy/disk_test/__pycache__/__init__.cpython-311.pyc +0 -0
  84. quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-311.pyc +0 -0
  85. quarchpy/docs/CHANGES.rst.bak +4 -2
  86. quarchpy/docs/_build/doctrees/CHANGES.doctree +0 -0
  87. quarchpy/docs/_build/doctrees/environment.pickle +0 -0
  88. quarchpy/docs/_build/doctrees/source/changelog.doctree +0 -0
  89. quarchpy/docs/_build/doctrees/source/quarchpy.fio.doctree +0 -0
  90. quarchpy/docs/_build/html/CHANGES.html +121 -113
  91. quarchpy/docs/_build/html/_sources/CHANGES.rst.txt +6 -1
  92. quarchpy/docs/_build/html/_static/alabaster.css +14 -9
  93. quarchpy/docs/_build/html/_static/basic.css +1 -1
  94. quarchpy/docs/_build/html/_static/pygments.css +1 -1
  95. quarchpy/docs/_build/html/genindex.html +9 -27
  96. quarchpy/docs/_build/html/index.html +62 -60
  97. quarchpy/docs/_build/html/objects.inv +0 -0
  98. quarchpy/docs/_build/html/py-modindex.html +7 -11
  99. quarchpy/docs/_build/html/readme.html +7 -6
  100. quarchpy/docs/_build/html/search.html +7 -6
  101. quarchpy/docs/_build/html/searchindex.js +1 -1
  102. quarchpy/docs/_build/html/source/changelog.html +176 -167
  103. quarchpy/docs/_build/html/source/licenses.html +7 -6
  104. quarchpy/docs/_build/html/source/modules.html +8 -7
  105. quarchpy/docs/_build/html/source/quarchpy.calibration.html +7 -6
  106. quarchpy/docs/_build/html/source/quarchpy.config_files.html +7 -6
  107. quarchpy/docs/_build/html/source/quarchpy.connection_specific.html +7 -6
  108. quarchpy/docs/_build/html/source/quarchpy.debug.html +7 -6
  109. quarchpy/docs/_build/html/source/quarchpy.device.html +7 -6
  110. quarchpy/docs/_build/html/source/quarchpy.disk_test.html +7 -6
  111. quarchpy/docs/_build/html/source/quarchpy.fio.html +9 -34
  112. quarchpy/docs/_build/html/source/quarchpy.html +8 -16
  113. quarchpy/docs/_build/html/source/quarchpy.iometer.html +7 -6
  114. quarchpy/docs/_build/html/source/quarchpy.qis.html +7 -6
  115. quarchpy/docs/_build/html/source/quarchpy.qps.html +7 -6
  116. quarchpy/docs/_build/html/source/quarchpy.user_interface.html +7 -6
  117. quarchpy/docs/_build/html/source/quarchpy.utilities.html +7 -6
  118. quarchpy/docs/_build/html/source/readme.html +7 -6
  119. quarchpy/fio/__pycache__/FIO_interface.cpython-311.pyc +0 -0
  120. quarchpy/fio/__pycache__/__init__.cpython-311.pyc +0 -0
  121. quarchpy/fio/__pycache__/fioDiskFinder.cpython-311.pyc +0 -0
  122. quarchpy/iometer/__pycache__/__init__.cpython-311.pyc +0 -0
  123. quarchpy/iometer/__pycache__/gen_iometer_template.cpython-311.pyc +0 -0
  124. quarchpy/iometer/__pycache__/iometerFuncs.cpython-311.pyc +0 -0
  125. quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-311.pyc +0 -0
  126. quarchpy/qis/__pycache__/__init__.cpython-311.pyc +0 -0
  127. quarchpy/qis/__pycache__/qisFuncs.cpython-311.pyc +0 -0
  128. quarchpy/qps/__pycache__/__init__.cpython-311.pyc +0 -0
  129. quarchpy/qps/__pycache__/qpsFuncs.cpython-311.pyc +0 -0
  130. quarchpy/qps/qpsFuncs.py.bak +28 -68
  131. quarchpy/user_interface/__pycache__/__init__.cpython-311.pyc +0 -0
  132. quarchpy/user_interface/__pycache__/user_interface.cpython-311.pyc +0 -0
  133. quarchpy/user_interface/user_interface.py.bak +749 -0
  134. quarchpy/utilities/TestCenter.py.bak +150 -0
  135. quarchpy/utilities/__pycache__/BitManipulation.cpython-311.pyc +0 -0
  136. quarchpy/utilities/__pycache__/TestCenter.cpython-311.pyc +0 -0
  137. quarchpy/utilities/__pycache__/TimeValue.cpython-311.pyc +0 -0
  138. quarchpy/utilities/__pycache__/Version.cpython-311.pyc +0 -0
  139. quarchpy/utilities/__pycache__/__init__.cpython-311.pyc +0 -0
  140. {quarchpy-2.1.20.dev2.dist-info → quarchpy-2.1.20.dev3.dist-info}/METADATA +1 -1
  141. {quarchpy-2.1.20.dev2.dist-info → quarchpy-2.1.20.dev3.dist-info}/RECORD +143 -114
  142. quarchpy/_version.py.bak +0 -1
  143. quarchpy/connection_specific/connection_mDNS.py.bak +0 -48
  144. quarchpy/debug/SystemTest.py.bak +0 -188
  145. quarchpy/debug/simple_terminal.py.bak +0 -50
  146. quarchpy/fio/FIO_interface.py.bak +0 -322
  147. quarchpy/qis/qisFuncs.py.bak +0 -265
  148. quarchpy/run.py.bak +0 -283
  149. {quarchpy-2.1.20.dev2.dist-info → quarchpy-2.1.20.dev3.dist-info}/WHEEL +0 -0
  150. {quarchpy-2.1.20.dev2.dist-info → quarchpy-2.1.20.dev3.dist-info}/top_level.txt +0 -0
@@ -20,7 +20,8 @@ from quarchpy.connection_specific.connection_Serial import serialList, serial
20
20
  from quarchpy.device.quarchArray import isThisAnArrayController
21
21
  from quarchpy.connection_specific.connection_USB import TQuarchUSB_IF
22
22
  from quarchpy.connection_specific import connection_ReST
23
- from quarchpy.connection_specific.connection_mDNS import MyListener
23
+
24
+ # TODO: bodge bodge bodge
24
25
  from quarchpy.utilities import TestCenter
25
26
 
26
27
 
@@ -175,110 +176,123 @@ def list_USB(debuPrint=False):
175
176
  '''
176
177
  List all Quarch devices found over LAN, using a UDP broadcast scan
177
178
  '''
179
+
180
+ def get_interface_ips():
181
+ interfaces = socket.if_nameindex()
182
+ interface_ips = {}
183
+ for idx, interface in interfaces:
184
+ try:
185
+ addresses = socket.getaddrinfo(interface, None)
186
+ ip_addresses = [addr[4][0] for addr in addresses]
187
+ interface_ips[interface] = ip_addresses
188
+ except socket.gaierror:
189
+ logging.warning(f"Unable to get IP address for interface {interface}")
190
+ return interface_ips
178
191
  def list_network(target_conn="all", debugPring=False, lanTimeout=1, ipAddressLookup=None):
179
192
 
180
193
  retVal={}
194
+ # Create and configure the socket for broadcast.
195
+ mySocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
196
+ mySocket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
197
+ mySocket.settimeout(lanTimeout)
181
198
 
182
199
  lan_modules = dict()
183
200
 
184
201
  specifiedDevice = None
185
202
 
186
- # Broadcast the message.
187
- logging.debug("Broadcast LAN discovery message for UDP scan to all network interfaces")
188
- ipList = socket.gethostbyname_ex(socket.gethostname())
189
- logging.debug(os.path.basename(__file__) + ": Discovered the following interfaces: " + str(ipList))
190
-
191
- for ip in ipList[2]:
192
-
193
- logging.debug(os.path.basename(__file__) + ": Broadcasting on : " + ip)
194
-
195
- try:
196
-
197
- mySocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
198
- mySocket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
199
- mySocket.settimeout(lanTimeout)
200
- mySocket.bind((ip,56732))
203
+ if ipAddressLookup is not None:
204
+ # Attempts to find the device through UDP then REST
205
+ specifiedDevice = lookupDevice(str(ipAddressLookup).strip(), mySocket, lan_modules )
206
+ mySocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
207
+ mySocket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
208
+ mySocket.settimeout(lanTimeout)
201
209
 
202
- if ipAddressLookup is not None:
203
- # Attempts to find the device through UDP then REST
204
- specifiedDevice = lookupDevice(str(ipAddressLookup).strip(), mySocket, lan_modules)
205
210
 
206
- except Exception as err:
207
211
 
208
- logging.debug("Error while trying to bind to network interfaces: "+" Error: "+str(err))
212
+ # Broadcast the message.
213
+ logging.debug("Broadcast LAN discovery message for UDP scan to all network interfaces")
214
+ logging.debug("Available network interfaces before binding:")
215
+ interfaces = socket.if_nameindex()
216
+ for idx, interface in interfaces:
217
+ logging.debug(f"Interface {idx}: {interface}")
218
+ try:
219
+ # Bind to all network interfaces using '', same as '0.0.0.0'
220
+ mySocket.bind(('',56732))
221
+ except Exception as err:
222
+ logging.debug("Error while trying to bind to network interfaces: "+" Error: "+str(err))
223
+ mySocket.sendto(b'Discovery: Who is out there?\0\n', ('255.255.255.255', 30303))
224
+ #mySocket.sendto(b'Discovery: Who is out there?\0\n', ('255.255.255.255', 30303)) #56732
225
+
226
+ counter = 0
227
+
228
+ # Receive messages until timeout.
229
+ while True:
230
+ network_modules = {}
231
+ counter += 1
232
+ # Receive raw message until timeout, then break.
233
+ try:
234
+ msg_received = mySocket.recvfrom(256)
235
+ except:
236
+ # check if any a device was targeted directly and allow parse
237
+ if specifiedDevice is not None:
238
+ msg_received = specifiedDevice
239
+ specifiedDevice = None
240
+ else:
241
+ break
242
+ cont = 0
243
+
244
+ # print(msg_received)
245
+ # Used split \r\n since values of 13 or 10 were looked at as /r and /n when using splitlines
246
+ # This fixes for all cases except if 13 is followed by 10.
247
+ splits = msg_received[0].split(b"\r\n")
248
+ del splits[-1]
249
+ for lines in splits:
250
+ if cont <= 1:
251
+ index = cont
252
+ data = repr(lines).replace("'", "").replace("b", "")
253
+ cont += 1
254
+ else:
255
+ index = repr(lines[0]).replace("'", "")
256
+ data = repr(lines[1:]).replace("'", "").replace("b", "")
209
257
 
210
- mySocket.sendto(b'Discovery: Who is out there?\0\n', ('255.255.255.255', 30303))
258
+ network_modules[index] = data
211
259
 
212
- counter = 0
260
+ module_name = get_user_level_serial_number(network_modules)
261
+ logging.debug("Found UDP response: " + module_name)
213
262
 
214
- # Receive messages until timeout.
215
- while True:
216
- network_modules = {}
217
- counter += 1
218
- # Receive raw message until timeout, then break.
219
- try:
220
- msg_received = mySocket.recvfrom(256)
221
- except:
222
- # check if any a device was targeted directly and allow parse
223
- if specifiedDevice is not None:
224
- msg_received = specifiedDevice
225
- specifiedDevice = None
226
- else:
227
- break
228
- cont = 0
229
-
230
- # print(msg_received)
231
- # Used split \r\n since values of 13 or 10 were looked at as /r and /n when using splitlines
232
- # This fixes for all cases except if 13 is followed by 10.
233
- splits = msg_received[0].split(b"\r\n")
234
- del splits[-1]
235
- for lines in splits:
236
- if cont <= 1:
237
- index = cont
238
- data = repr(lines).replace("'", "").replace("b", "")
239
- cont += 1
240
- else:
241
- index = repr(lines[0]).replace("'", "")
242
- data = repr(lines[1:]).replace("'", "").replace("b", "")
243
-
244
- network_modules[index] = data
245
-
246
- module_name = get_user_level_serial_number(network_modules)
247
- logging.debug("Found UDP response: " + module_name)
248
-
249
- ip_module = msg_received[1][0].strip()
263
+ ip_module = msg_received[1][0].strip()
250
264
 
251
- try:
252
- # Add a QTL before modules without it.
253
- if "QTL" not in module_name.decode("utf-8"):
254
- module_name = "QTL" + module_name.decode("utf-8")
255
- except:
256
- # Add a QTL before modules without it.
257
- if "QTL" not in module_name:
258
- module_name = "QTL" + module_name
259
-
260
- # Checks if there's a value in the TELNET key.
261
- if (target_conn.lower() == "all" or target_conn.lower() == "telnet"):
262
- if network_modules.get("\\x8a") or network_modules.get("138"):
263
- # Append the information to the list.
264
- lan_modules["TELNET:" + ip_module] = module_name
265
- logging.debug("Found Telnet module: " + module_name)
266
-
267
- # Checks if there's a value in the REST key.
268
- if (target_conn.lower() == "all" or target_conn.lower() == "rest"):
269
- if network_modules.get("\\x84") or network_modules.get("132"):
270
- # Append the information to the list.
271
- lan_modules["REST:" + ip_module] = module_name
272
- logging.debug("Found REST module: " + module_name)
273
-
274
- # Checks if there's a value in the TCP key.
275
- if (target_conn.lower() == "all" or target_conn.lower() == "tcp"):
276
- if network_modules.get("\\x85") or network_modules.get("133"):
277
- # Append the information to the list.
278
- lan_modules["TCP:" + ip_module] = module_name
279
- logging.debug("Found TCP module: " + module_name)
280
-
281
- mySocket.close()
265
+ try:
266
+ # Add a QTL before modules without it.
267
+ if "QTL" not in module_name.decode("utf-8"):
268
+ module_name = "QTL" + module_name.decode("utf-8")
269
+ except:
270
+ # Add a QTL before modules without it.
271
+ if "QTL" not in module_name:
272
+ module_name = "QTL" + module_name
273
+
274
+ # Checks if there's a value in the TELNET key.
275
+ if (target_conn.lower() == "all" or target_conn.lower() == "telnet"):
276
+ if network_modules.get("\\x8a") or network_modules.get("138"):
277
+ # Append the information to the list.
278
+ lan_modules["TELNET:" + ip_module] = module_name
279
+ logging.debug("Found Telnet module: " + module_name)
280
+
281
+ # Checks if there's a value in the REST key.
282
+ if (target_conn.lower() == "all" or target_conn.lower() == "rest"):
283
+ if network_modules.get("\\x84") or network_modules.get("132"):
284
+ # Append the information to the list.
285
+ lan_modules["REST:" + ip_module] = module_name
286
+ logging.debug("Found REST module: " + module_name)
287
+
288
+ # Checks if there's a value in the TCP key.
289
+ if (target_conn.lower() == "all" or target_conn.lower() == "tcp"):
290
+ if network_modules.get("\\x85") or network_modules.get("133"):
291
+ # Append the information to the list.
292
+ lan_modules["TCP:" + ip_module] = module_name
293
+ logging.debug("Found TCP module: " + module_name)
294
+
295
+ mySocket.close()
282
296
  logging.debug("Finished UDP scan")
283
297
  retVal.update(lan_modules)
284
298
  return retVal
@@ -457,12 +471,6 @@ def filter_module_type(module_type_filter, found_devices):
457
471
  filtered_devices.update({key: value})
458
472
  return filtered_devices
459
473
 
460
- def scan_mDNS(mdnsListener):
461
- from zeroconf import ServiceBrowser, Zeroconf
462
- zeroconf = Zeroconf()
463
- listener = mdnsListener
464
- browser = ServiceBrowser(zeroconf, "_http._tcp.local.", listener)
465
-
466
474
 
467
475
  '''
468
476
  Scans for Quarch modules across the given interface(s). Returns a dictionary of module addresses and serial numbers
@@ -472,19 +480,12 @@ def scanDevices(target_conn="all", lanTimeout=1, scanInArray=True, favouriteOnly
472
480
  foundDevices = dict()
473
481
  scannedArrays = list()
474
482
 
475
-
476
483
  if target_conn.lower() == "all":
477
484
  foundDevices = list_USB()
478
485
  foundDevices = mergeDict(foundDevices, list_serial())
479
486
  try:
480
487
  #This will fail if the test machine is not connected to a network
481
488
  foundDevices = mergeDict(foundDevices, list_network("all", ipAddressLookup=ipAddressLookup, lanTimeout=lanTimeout))
482
- try:
483
- mdnsListener = MyListener()
484
- scan_mDNS(mdnsListener)
485
- foundDevices = mergeDict(foundDevices, mdnsListener.found_devices)
486
- except Exception as mdnsExcept:
487
- logging.debug("An error occurred while trying to use the mdns listner to scan\n" +str(mdnsExcept))
488
489
  except Exception as e:
489
490
  logging.error(e)
490
491
  logging.warning("Network scan failed, check network connection")
@@ -511,8 +512,8 @@ def scanDevices(target_conn="all", lanTimeout=1, scanInArray=True, favouriteOnly
511
512
  foundDevices = mergeDict(foundDevices, scanDevices)
512
513
  myArrayControler.closeConnection()
513
514
  except Exception as e:
514
- logging.debug(e, exc_info=True)
515
- logging.debug("Cannot get serial number. Quarch device may be in use by another program.")
515
+ logging.error(e, exc_info=True)
516
+ logging.warning("Cannot get serial number. Quarch device may be in use by another program.")
516
517
  foundDevices[k] = "DEVICE IN USE"
517
518
 
518
519
  if (favouriteOnly):
@@ -592,7 +593,7 @@ def userSelectDevice(scanDictionary=None, scanFilterStr=None,favouriteOnly=True,
592
593
 
593
594
 
594
595
  if nice: #Prepair the data for niceListSelection using displayTable().
595
- if additionalOptions is None: additionalOptions = ["Specify IP Address","Rescan","Quit"]
596
+ if additionalOptions is None: additionalOptions = ["IP Scan","Rescan","Quit"]
596
597
  tempList = []
597
598
  tempEl = []
598
599
  for k, v in scanDictionary.items():
@@ -615,7 +616,7 @@ def userSelectDevice(scanDictionary=None, scanFilterStr=None,favouriteOnly=True,
615
616
  devicesString.append(k + '=' + v + ": " + k[:charPos])
616
617
  devicesString = ','.join(devicesString)
617
618
  if additionalOptions is None :
618
- additionalOptions = "Specify IP Address=IP Scan,Rescan=Rescan,Quit=Quit"
619
+ additionalOptions = "IP Scan=IP Scan,Rescan=Rescan,Quit=Quit"
619
620
  userStr = listSelection(title=title,message=message,selectionList=devicesString, additionalOptions=additionalOptions)
620
621
 
621
622
  # Process the user response
@@ -629,7 +630,7 @@ def userSelectDevice(scanDictionary=None, scanFilterStr=None,favouriteOnly=True,
629
630
  ip_address = None
630
631
  scanDictionary = None
631
632
  favouriteOnly = False
632
- elif(userStr.lower() in 'specify ip address'):
633
+ elif(userStr.lower() in 'ip scan'):
633
634
  ip_address = requestDialog("Please input IP Address of the module you would like to connect to: ")
634
635
  scanDictionary = None
635
636
  favouriteOnly = False
@@ -637,3 +638,24 @@ def userSelectDevice(scanDictionary=None, scanFilterStr=None,favouriteOnly=True,
637
638
  # Return the address string of the selected module
638
639
  return userStr
639
640
 
641
+
642
+ #Not used but could come in usefull in near future.
643
+ # def userSelectAndReturnDevice(scanDictionary=None, scanFilterStr=None,favouriteOnly=True, message=None, title=None, nice=True, additionalOptions =["rescan","all conn types", "quit"], target_conn="all"):
644
+ # scanDictionary = scanDevices()
645
+ # connectionTarget = userSelectDevice(scanDictionary, scanFilterStr, favouriteOnly, message, title, nice,
646
+ # additionalOptions, target_conn)
647
+ # serialNumber = getSerialNumberFromConnectionTarget(connectionTarget)
648
+ #
649
+ # if connectionTarget.__contains__("<") and connectionTarget.__contains__(">"):
650
+ # connectionTarget, portNumber = connectionTarget.split("<")
651
+ # portNumber = portNumber[:-1]
652
+ # myDevice = quarchDevice(connectionTarget)
653
+ # myArrayController = quarchArray(myDevice)
654
+ # mySubDevice = myArrayController.getSubDevice(portNumber)
655
+ # myDevice = mySubDevice
656
+ # elif(serialNumber.lower().__contains__("qtl1999") or serialNumber.lower().__contains__("qtl1995") or serialNumber.lower().__contains__("qtl2312")):
657
+ # myDevice = quarchPPM(quarchDevice(connectionTarget))
658
+ #
659
+ # else:
660
+ # myDevice = quarchDevice(connectionTarget)
661
+ # return myDevice
@@ -13,9 +13,11 @@ Quarchpy
13
13
  Change Log
14
14
  ----------
15
15
 
16
- 2.1.18
16
+ 2.1.19
17
17
  ------
18
- - Minor bug fix
18
+ - Imporoved QIS streaming
19
+ - Bug fixes
20
+ - Added zeroconf, numpy and pandas as requirements
19
21
 
20
22
  2.1.17
21
23
  ------