quarchpy 2.1.24.dev1__py2.py3-none-any.whl → 2.1.24.dev2__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.
- quarchpy/.idea/.name +1 -1
- quarchpy/.idea/modules.xml +2 -0
- quarchpy/.idea/quarchpy.iml +5 -1
- quarchpy/.idea/workspace.xml +257 -18
- quarchpy/_version.py +1 -1
- quarchpy/connection_specific/QPS/qis/qis_lib/CInterface-1.8.0.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/hs_err_pid8224.log +8905 -0
- quarchpy/debug/SystemTest.py +14 -3
- quarchpy/device/scanDevices.py +48 -22
- quarchpy/docs/_build/doctrees/CHANGES.doctree +0 -0
- quarchpy/docs/_build/doctrees/environment.pickle +0 -0
- quarchpy/docs/_build/doctrees/index.doctree +0 -0
- quarchpy/docs/_build/doctrees/readme.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/changelog.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/licenses.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/modules.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.calibration.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.config_files.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.connection_specific.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.debug.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.device.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.disk_test.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.fio.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.iometer.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.qis.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.qps.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.user_interface.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/quarchpy.utilities.doctree +0 -0
- quarchpy/docs/_build/doctrees/source/readme.doctree +0 -0
- quarchpy/docs/_build/html/CHANGES.html +119 -123
- quarchpy/docs/_build/html/_sources/CHANGES.rst.txt +0 -5
- quarchpy/docs/_build/html/genindex.html +1537 -0
- quarchpy/docs/_build/html/index.html +60 -61
- quarchpy/docs/_build/html/objects.inv +0 -0
- quarchpy/docs/_build/html/readme.html +7 -6
- quarchpy/docs/_build/html/searchindex.js +1 -1
- quarchpy/docs/_build/html/source/changelog.html +179 -184
- quarchpy/docs/_build/html/source/licenses.html +7 -6
- quarchpy/docs/_build/html/source/modules.html +43 -35
- quarchpy/docs/_build/html/source/quarchpy.config_files.html +12 -2
- quarchpy/docs/_build/html/source/quarchpy.connection_specific.html +602 -16
- quarchpy/docs/_build/html/source/quarchpy.debug.html +127 -8
- quarchpy/docs/_build/html/source/quarchpy.device.html +1003 -12
- quarchpy/docs/_build/html/source/quarchpy.disk_test.html +75 -9
- quarchpy/docs/_build/html/source/quarchpy.fio.html +67 -6
- quarchpy/docs/_build/html/source/quarchpy.html +539 -38
- quarchpy/docs/_build/html/source/quarchpy.iometer.html +156 -10
- quarchpy/docs/_build/html/source/quarchpy.qis.html +518 -4
- quarchpy/docs/_build/html/source/quarchpy.qps.html +105 -4
- quarchpy/docs/_build/html/source/quarchpy.user_interface.html +156 -4
- quarchpy/docs/_build/html/source/quarchpy.utilities.html +96 -10
- quarchpy/docs/_build/html/source/readme.html +7 -6
- quarchpy/qis/qisFuncs.py +5 -9
- quarchpy/run.py +0 -7
- {quarchpy-2.1.24.dev1.dist-info → quarchpy-2.1.24.dev2.dist-info}/METADATA +1 -1
- {quarchpy-2.1.24.dev1.dist-info → quarchpy-2.1.24.dev2.dist-info}/RECORD +59 -60
- quarchpy/.idea/inspectionProfiles/Project_Default.xml +0 -12
- quarchpy/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/__pycache__/_version.cpython-311.pyc +0 -0
- {quarchpy-2.1.24.dev1.dist-info → quarchpy-2.1.24.dev2.dist-info}/WHEEL +0 -0
- {quarchpy-2.1.24.dev1.dist-info → quarchpy-2.1.24.dev2.dist-info}/top_level.txt +0 -0
quarchpy/debug/SystemTest.py
CHANGED
@@ -1,6 +1,17 @@
|
|
1
|
-
from quarchpy import *
|
2
|
-
from quarchpy.device import *
|
3
|
-
|
1
|
+
# from quarchpy import *
|
2
|
+
# from quarchpy.device import *
|
3
|
+
try:
|
4
|
+
from importlib.metadata import distribution
|
5
|
+
except:
|
6
|
+
try:
|
7
|
+
from importlib_metadata import distribution
|
8
|
+
except Exception as e:
|
9
|
+
print("Failed to import distribution from importlib_metadata")
|
10
|
+
try:
|
11
|
+
|
12
|
+
from importlib_metadata import distribution
|
13
|
+
except:
|
14
|
+
print("here")
|
4
15
|
import os
|
5
16
|
import platform
|
6
17
|
import sys
|
quarchpy/device/scanDevices.py
CHANGED
@@ -19,7 +19,7 @@ from quarchpy.device import quarchDevice, quarchArray
|
|
19
19
|
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
|
-
from quarchpy.connection_specific import connection_ReST
|
22
|
+
from quarchpy.connection_specific import connection_ReST, connection_TCP
|
23
23
|
from quarchpy.connection_specific.connection_mDNS import MyListener
|
24
24
|
from quarchpy.utilities import TestCenter
|
25
25
|
|
@@ -306,8 +306,13 @@ def get_user_level_serial_number(network_modules):
|
|
306
306
|
''''''
|
307
307
|
def lookupDevice(ipAddressLookup, mySocket, lan_modules):
|
308
308
|
try:
|
309
|
-
|
309
|
+
specifiedDevice =None
|
310
310
|
# For future reference, 0 is the C terminator for a string
|
311
|
+
timeout = mySocket.gettimeout()
|
312
|
+
# mySocket.settimeout(20)
|
313
|
+
# timeout2 = mySocket.gettimeout()
|
314
|
+
logging.debug("Ipaddress lookup =" + ipAddressLookup+ " timeout = "+ str(timeout))
|
315
|
+
|
311
316
|
mySocket.sendto(b'Discovery: Who is out there?\0\n', (str(ipAddressLookup).strip(), 30303))
|
312
317
|
specifiedDevice = mySocket.recvfrom(256)
|
313
318
|
# Check to see if the response contains the connection protocol
|
@@ -315,26 +320,47 @@ def lookupDevice(ipAddressLookup, mySocket, lan_modules):
|
|
315
320
|
except Exception as e:
|
316
321
|
logging.warning("Error during UDP lookup of IP address "+ str(ipAddressLookup) +" Error: " + str(e))
|
317
322
|
logging.warning("No Quarch module found at this address. Please check the IP address and that you can ping it.\r\n")
|
318
|
-
|
319
|
-
#
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
323
|
+
|
324
|
+
#return None # Commented out, attempt a REST connection with IP. This is what other quarch applications do.
|
325
|
+
if specifiedDevice is None: #Only True if TCP not found or errored
|
326
|
+
try:
|
327
|
+
restCon = connection_ReST.ReSTConn(str(ipAddressLookup).replace("\r\n", ""))
|
328
|
+
restDevice = restCon.sendCommand("*enclosure?") #Try use enclosure for PPMs
|
329
|
+
if "fail" in restDevice.lower(): # This will fail nicely for other modules
|
330
|
+
restDevice = restCon.sendCommand("*serial?") # and serial number will be used in place.
|
331
|
+
if not str(restDevice).startswith("QTL"):
|
332
|
+
restDevice = "QTL" + restDevice
|
333
|
+
# Exit as device was found correctly
|
334
|
+
# Add the item to list
|
335
|
+
lan_modules["REST:" + str(ipAddressLookup).replace("\r\n", "")] = restDevice
|
336
|
+
specifiedDevice=None # Don't return rest connection, to bypass tcp parsing.
|
337
|
+
except Exception as e:
|
338
|
+
logging.warning("Error During REST scan of IP address " + str(ipAddressLookup) + " Error: " + str(e))
|
339
|
+
logging.warning("Please check the IP address and that you can ping it.\r\n")
|
340
|
+
try:
|
341
|
+
# from threading import Thread
|
342
|
+
# t = Thread(target=connection_TCP.TCPConn, args=(str(ipAddressLookup).replace("\r\n", ""),))
|
343
|
+
# t.daemon = True
|
344
|
+
# t.start()
|
345
|
+
# t.join(50)
|
346
|
+
# if t.is_alive():
|
347
|
+
# raise TimeoutError("Timeout during TCP Connection attempt.")
|
348
|
+
|
349
|
+
tcpCon= connection_TCP.TCPConn(str(ipAddressLookup).replace("\r\n", ""))
|
350
|
+
tcpDevice = tcpCon.sendCommand("*enclosure?") #Try use enclosure for PPMs
|
351
|
+
if "fail" in tcpDevice.lower(): # This will fail nicely for other modules
|
352
|
+
tcpDevice = tcpCon.sendCommand("*serial?") # and serial number will be used in place.
|
353
|
+
if not str(tcpDevice).startswith("QTL"):
|
354
|
+
tcpDevice = "QTL" + tcpDevice
|
355
|
+
# Exit as device was found correctly
|
356
|
+
# Add the item to list
|
357
|
+
lan_modules["TCP:" + str(ipAddressLookup).replace("\r\n", "")] = tcpDevice
|
358
|
+
specifiedDevice=None # Don't return tcp connection, to bypass tcp parsing.
|
359
|
+
except Exception as e:
|
360
|
+
logging.warning("Error During TCP scan of IP address " + str(ipAddressLookup) + " Error: " + str(e))
|
361
|
+
logging.warning("Please check the IP address and that you can ping it.\r\n")
|
362
|
+
# Needs to return None so previous method will not attempt another lookup.
|
363
|
+
return specifiedDevice
|
338
364
|
|
339
365
|
|
340
366
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|