quarchpy 2.2.8.dev1__py2.py3-none-any.whl → 2.2.9.dev1__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/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/__pycache__/_version.cpython-311.pyc +0 -0
- quarchpy/__pycache__/_version.cpython-313.pyc +0 -0
- quarchpy/__pycache__/connection.cpython-311.pyc +0 -0
- quarchpy/__pycache__/connection.cpython-313.pyc +0 -0
- quarchpy/_version.py +1 -1
- quarchpy/config_files/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/config_files/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/config_files/__pycache__/quarch_config_parser.cpython-311.pyc +0 -0
- quarchpy/config_files/__pycache__/quarch_config_parser.cpython-313.pyc +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/com.sun.istack-license.html +59 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/dorkbox-LICENSE.Apachev2 +218 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jSerialComm-LICENSE-APACHE-2.0 +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jSerialComm-LICENSE-LGPL-3.0 +165 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jakarta.activation-license.html +59 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jakarta.xml.bind-api-license.html +59 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/javassist-License.html +381 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jmdns-LICENSE.txt +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/jna-AL2.0 +177 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/kotlin-stdlib-LICENSE-2.0.txt +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/netty-LICENSE.txt +202 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/netty-NOTICE.txt +239 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/slf4j-LICENSE.txt +24 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/3rdPartyLicenses/usb4java-LICENSE.md +20 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/help.txt +50 -17
- quarchpy/connection_specific/QPS/win-amd64/qis/license.txt +1 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/CInterface-2.5.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/QuarchCommon-2.0.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/TorridonCommon-1.3.jar +0 -0
- quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/usb4java-1.3.1.jar +0 -0
- quarchpy/connection_specific/__pycache__/StreamChannels.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/StreamChannels.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QIS.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QIS.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QPS.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QPS.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_ReST.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_ReST.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_Serial.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_Serial.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_TCP.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_TCP.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_USB.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_USB.cpython-313.pyc +0 -0
- quarchpy/connection_specific/__pycache__/mDNS.cpython-311.pyc +0 -0
- quarchpy/connection_specific/__pycache__/mDNS.cpython-313.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-311.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/win32.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/win32.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-313.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-311.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-313.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/libusb1.cpython-311.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/usb1.cpython-311.pyc +0 -0
- quarchpy/connection_specific/usb_libs/usb1.py +2360 -2360
- quarchpy/debug/SystemTest.py +9 -2
- quarchpy/debug/__pycache__/SystemTest.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/SystemTest.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/module_debug.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/simple_terminal.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-313.pyc +0 -0
- quarchpy/debug/__pycache__/versionCompare.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/versionCompare.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/device.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/device.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/quarchArray.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/quarchArray.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/quarchPPM.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/quarchPPM.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/quarchQPS.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/quarchQPS.cpython-313.pyc +0 -0
- quarchpy/device/__pycache__/scanDevices.cpython-311.pyc +0 -0
- quarchpy/device/__pycache__/scanDevices.cpython-313.pyc +0 -0
- quarchpy/device/quarchQPS.py +96 -67
- quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-313.pyc +0 -0
- quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-313.pyc +0 -0
- quarchpy/disk_test/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-311.pyc +0 -0
- quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-313.pyc +0 -0
- quarchpy/docs/CHANGES.rst +4 -0
- quarchpy/docs/Makefile +20 -20
- quarchpy/docs/_build/html/_static/custom.css +1 -1
- quarchpy/docs/_build/html/_static/doctools.js +149 -149
- quarchpy/docs/_build/html/_static/jquery-3.4.1.js +10598 -10598
- quarchpy/docs/_build/html/_static/jquery.js +2 -2
- quarchpy/docs/_build/html/_static/searchtools.js +632 -632
- quarchpy/docs/_build/html/_static/sphinx_highlight.js +154 -154
- quarchpy/docs/_build/html/_static/underscore-1.3.1.js +999 -999
- quarchpy/docs/_build/html/_static/underscore.js +5 -5
- quarchpy/fio/__pycache__/FIO_interface.cpython-311.pyc +0 -0
- quarchpy/fio/__pycache__/FIO_interface.cpython-313.pyc +0 -0
- quarchpy/fio/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/fio/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/iometer/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/iometer/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/iometer/__pycache__/gen_iometer_template.cpython-311.pyc +0 -0
- quarchpy/iometer/__pycache__/{gen_iometer_template.cpython-312.pyc → gen_iometer_template.cpython-313.pyc} +0 -0
- quarchpy/iometer/__pycache__/iometerFuncs.cpython-311.pyc +0 -0
- quarchpy/iometer/__pycache__/iometerFuncs.cpython-313.pyc +0 -0
- quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-311.pyc +0 -0
- quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-313.pyc +0 -0
- quarchpy/qis/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/qis/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/qis/__pycache__/qisFuncs.cpython-311.pyc +0 -0
- quarchpy/qis/__pycache__/qisFuncs.cpython-313.pyc +0 -0
- quarchpy/qis/qisFuncs.py +4 -2
- quarchpy/qps/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/qps/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/qps/__pycache__/qpsFuncs.cpython-311.pyc +0 -0
- quarchpy/qps/__pycache__/qpsFuncs.cpython-313.pyc +0 -0
- quarchpy/user_interface/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/user_interface/__pycache__/__init__.cpython-313.pyc +0 -0
- quarchpy/user_interface/__pycache__/user_interface.cpython-311.pyc +0 -0
- quarchpy/user_interface/__pycache__/user_interface.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/TestCenter.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/TestCenter.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/TimeValue.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/TimeValue.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/Version.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/Version.cpython-313.pyc +0 -0
- quarchpy/utilities/__pycache__/__init__.cpython-311.pyc +0 -0
- quarchpy/utilities/__pycache__/__init__.cpython-313.pyc +0 -0
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/METADATA +5 -1
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/RECORD +152 -150
- quarchpy/.idea/.name +0 -1
- quarchpy/.idea/inspectionProfiles/Project_Default.xml +0 -50
- quarchpy/.idea/inspectionProfiles/profiles_settings.xml +0 -6
- quarchpy/.idea/misc.xml +0 -7
- quarchpy/.idea/modules.xml +0 -8
- quarchpy/.idea/quarchpy.iml +0 -12
- quarchpy/.idea/vcs.xml +0 -6
- quarchpy/.idea/workspace.xml +0 -173
- quarchpy/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/__pycache__/_version.cpython-312.pyc +0 -0
- quarchpy/__pycache__/connection.cpython-312.pyc +0 -0
- quarchpy/__pycache__/run.cpython-311.pyc +0 -0
- quarchpy/__pycache__/run.cpython-312.pyc +0 -0
- quarchpy/config_files/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/config_files/__pycache__/quarch_config_parser.cpython-312.pyc +0 -0
- quarchpy/connection_specific/QPS/win-amd64/InstallType.dat +0 -1
- quarchpy/connection_specific/QPS/win-amd64/qis/myFile.csv +0 -50
- quarchpy/connection_specific/__pycache__/StreamChannels.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QIS.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_QPS.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_ReST.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_Serial.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_TCP.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/connection_USB.cpython-312.pyc +0 -0
- quarchpy/connection_specific/__pycache__/mDNS.cpython-312.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/__pycache__/win32.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-312.pyc +0 -0
- quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-312.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/libusb1.cpython-312.pyc +0 -0
- quarchpy/connection_specific/usb_libs/__pycache__/usb1.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/SystemTest.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/module_debug.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/module_debug.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/simple_terminal.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/simple_terminal.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-311.pyc +0 -0
- quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-312.pyc +0 -0
- quarchpy/debug/__pycache__/versionCompare.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/device.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/quarchArray.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/quarchPPM.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/quarchQPS.cpython-312.pyc +0 -0
- quarchpy/device/__pycache__/scanDevices.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-312.pyc +0 -0
- quarchpy/fio/__pycache__/FIO_interface.cpython-312.pyc +0 -0
- quarchpy/fio/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/iometer/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/iometer/__pycache__/iometerFuncs.cpython-312.pyc +0 -0
- quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-312.pyc +0 -0
- quarchpy/qis/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/qis/__pycache__/qisFuncs.cpython-312.pyc +0 -0
- quarchpy/qps/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/qps/__pycache__/qpsFuncs.cpython-312.pyc +0 -0
- quarchpy/user_interface/__pycache__/__init__.cpython-312.pyc +0 -0
- quarchpy/user_interface/__pycache__/user_interface.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/TestCenter.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/TimeValue.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/Version.cpython-312.pyc +0 -0
- quarchpy/utilities/__pycache__/__init__.cpython-312.pyc +0 -0
- /quarchpy/fio/{test_performance_class.py → HIDEtest_performance_class.py} +0 -0
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/WHEEL +0 -0
- {quarchpy-2.2.8.dev1.dist-info → quarchpy-2.2.9.dev1.dist-info}/top_level.txt +0 -0
quarchpy/debug/SystemTest.py
CHANGED
@@ -108,7 +108,14 @@ def QuarchSimpleIdentify(device1):
|
|
108
108
|
print("")
|
109
109
|
# Print the module identify and version information
|
110
110
|
print("Module Identity Information: ")
|
111
|
-
|
111
|
+
idn_info = device1.sendCommand("*idn?")
|
112
|
+
print(idn_info)
|
113
|
+
if "fixture" in idn_info.lower():
|
114
|
+
print("\nFixture Identity Information: ")
|
115
|
+
|
116
|
+
fixture_info = device1.sendCommand("fix idn?")
|
117
|
+
print(fixture_info)
|
118
|
+
|
112
119
|
|
113
120
|
|
114
121
|
def get_QIS_version():
|
@@ -169,7 +176,7 @@ def get_quarchpy_version():
|
|
169
176
|
|
170
177
|
|
171
178
|
def fix_usb():
|
172
|
-
content_to_write = "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"16d0\", MODE=\"0666\"" \
|
179
|
+
content_to_write = "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"16d0\", MODE=\"0666\"\n" \
|
173
180
|
"SUBSYSTEM==\"usb_device\", ATTRS{idVendor}==\"16d0\", MODE=\"0666\""
|
174
181
|
|
175
182
|
if "centos" in str(platform.platform()).lower():
|
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
|
quarchpy/device/quarchQPS.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
from quarchpy.device import quarchDevice
|
2
2
|
from quarchpy.utilities.Version import Version
|
3
3
|
from quarchpy.user_interface.user_interface import requestDialog
|
4
|
+
#from quarchpy.utilities.utils import check_stream_stopped_status, check_export_status
|
5
|
+
|
4
6
|
import os, time, datetime, sys, logging
|
5
7
|
|
6
8
|
if sys.version_info[0] < 3:
|
@@ -29,24 +31,24 @@ class quarchQPS(quarchDevice):
|
|
29
31
|
self.IP_address = quarchDevice.connectionObj.qps.host
|
30
32
|
self.port_number = quarchDevice.connectionObj.qps.port
|
31
33
|
|
32
|
-
def startStream(self, directory, unserInput=True):
|
34
|
+
def startStream(self, directory, unserInput=True, streamDuration=""):
|
33
35
|
"""
|
34
36
|
directory - str - desired stream dir
|
35
37
|
unserInput=True - if a failure occurs userInput=True allows user to rectify problem with user input. set to False if user interaction is not available (automating).
|
36
38
|
"""
|
37
39
|
#time.sleep(1) # TODO remove this sleep once script->QPS timeing issue resolved. This works fine in the meantime
|
38
|
-
return quarchStream(self.quarchDevice, directory, unserInput)
|
40
|
+
return quarchStream(self.quarchDevice, directory, unserInput, streamDuration)
|
39
41
|
|
40
42
|
|
41
43
|
class quarchStream:
|
42
|
-
def __init__(self, quarchQPS, directory, unserInput=True):
|
44
|
+
def __init__(self, quarchQPS, directory, unserInput=True, streamDuration=""):
|
43
45
|
self.connectionObj = quarchQPS.connectionObj
|
44
46
|
self.IP_address = quarchQPS.connectionObj.qps.host
|
45
47
|
self.port_number = quarchQPS.connectionObj.qps.port
|
46
48
|
self.ConString = quarchQPS.ConString
|
47
49
|
self.ConType = quarchQPS.ConType
|
48
|
-
time.sleep(1)
|
49
|
-
response = self.startQPSStream(directory)
|
50
|
+
# time.sleep(1) # TODO Nabil - Is this required?
|
51
|
+
response = self.startQPSStream(directory, streamDuration)
|
50
52
|
if not "fail:" in response.lower():
|
51
53
|
return
|
52
54
|
else:
|
@@ -55,18 +57,19 @@ class quarchStream:
|
|
55
57
|
else:
|
56
58
|
self.failCheck(response)
|
57
59
|
|
58
|
-
def startQPSStream(self, newDirectory):
|
59
|
-
'''STARTS the stream '''
|
60
|
-
|
60
|
+
def startQPSStream(self, newDirectory, streamDuration=""):
|
61
|
+
'''STARTS the QPS stream '''
|
62
|
+
# Set the stream duration if required.
|
63
|
+
response = self.connectionObj.qps.sendCmdVerbose("$start stream \"" + str(newDirectory) + "\" " + str(streamDuration))
|
61
64
|
if "Error" in response:
|
62
|
-
response = self.connectionObj.qps.sendCmdVerbose("$start stream " + str(newDirectory))
|
65
|
+
response = self.connectionObj.qps.sendCmdVerbose("$start stream " + str(newDirectory) + " " + streamDuration)
|
63
66
|
return response
|
64
67
|
|
65
68
|
def failCheck(self, response):
|
66
69
|
''' handles failed starting of stream that requires input from user to fix.'''
|
67
70
|
while "fail:" in response.lower():
|
68
71
|
if "Fail: Directory already exists" in response:
|
69
|
-
newDir = requestDialog(message=response+" Please enter a new file name:")
|
72
|
+
newDir = requestDialog(message=response + " Please enter a new file name:")
|
70
73
|
response = self.startQPSStream(newDir)
|
71
74
|
else: # If its a failure we don't know how to handle.
|
72
75
|
raise Exception(response)
|
@@ -112,7 +115,7 @@ class quarchStream:
|
|
112
115
|
|
113
116
|
return retVal
|
114
117
|
|
115
|
-
def stats_to_CSV(self, file_name=""):
|
118
|
+
def stats_to_CSV(self, file_name="", poll_till_complete=False, check_interval=0.5):
|
116
119
|
"""
|
117
120
|
Saves the statistics grid to a csv file
|
118
121
|
|
@@ -130,43 +133,51 @@ class quarchStream:
|
|
130
133
|
command_response = self.connectionObj.qps.sendCmdVerbose("$stats to csv \"" + file_name + "\"", timeout=60)
|
131
134
|
if command_response.startswith("Fail"):
|
132
135
|
raise Exception(command_response)
|
136
|
+
|
137
|
+
#UNCOMMENT
|
138
|
+
# if poll_till_complete:
|
139
|
+
# is_exporting = check_export_status(self.get_stats_export_status())
|
140
|
+
# while is_exporting:
|
141
|
+
# is_exporting = check_export_status(self.get_stats_export_status())
|
142
|
+
# time.sleep(check_interval)
|
133
143
|
return command_response
|
134
144
|
|
135
145
|
def get_custom_stats_range(self, start_time, end_time):
|
136
146
|
"""
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
147
|
+
Returns the QPS statistics information over a specific time ignoring any set annotations.
|
148
|
+
|
149
|
+
Parameters
|
150
|
+
----------
|
151
|
+
start_time = : str
|
152
|
+
The time in seconds you would like the stats to start this can be in integer or string format.
|
153
|
+
or using the following format to specify daysDhours:minutes:seconds.milliseconds
|
154
|
+
xxxDxx:xx:xx.xxxx
|
155
|
+
end_time = : str
|
156
|
+
The time in seconds you would like the stats to stop this can be in integer or string format
|
157
|
+
or using the following format to specify daysDhours:minutes:seconds.milliseconds
|
158
|
+
xxxDxx:xx:xx.xxxx
|
159
|
+
Returns
|
160
|
+
-------
|
161
|
+
df = : dataframe
|
162
|
+
The response text from QPS. If successful "ok. Saving stats to : file_name" otherwise returns the exception thrown
|
153
163
|
"""
|
154
164
|
try:
|
155
165
|
import warnings
|
156
166
|
import pandas as pd
|
157
167
|
warnings.simplefilter(action='ignore', category=FutureWarning)
|
158
|
-
except:
|
168
|
+
except ImportError:
|
159
169
|
logging.warning("pandas not imported correctly")
|
170
|
+
|
160
171
|
command_response = self.connectionObj.qps.sendCmdVerbose(
|
161
172
|
"$get custom stats range " + str(start_time) + " " + str(end_time), timeout=60)
|
173
|
+
|
162
174
|
if command_response.startswith("Fail"):
|
163
175
|
raise Exception(command_response)
|
164
176
|
test_data = StringIO(command_response)
|
177
|
+
|
165
178
|
try:
|
166
179
|
pd.set_option('display.max_columns', None)
|
167
180
|
pd.set_option('display.width', 1024)
|
168
|
-
# df = pd.read_csv(test_data, sep=",", header=[0,1])
|
169
|
-
# pandas.read_csv() replaced error_bad_lines with on_bad_lines from v1.3.0
|
170
181
|
if Version.is_v1_ge_v2(pd.__version__, "1.3.0"):
|
171
182
|
df = pd.read_csv(test_data, sep=",", header=[0, 1], on_bad_lines="skip")
|
172
183
|
else:
|
@@ -187,9 +198,9 @@ class quarchStream:
|
|
187
198
|
|
188
199
|
def getStreamState(self):
|
189
200
|
"""
|
190
|
-
|
201
|
+
Asks QPS for the stream status.
|
191
202
|
QPS stream state != Module stream state.
|
192
|
-
This is different from "rec stream?" cmd to the module as it will return "streaming" when the module is
|
203
|
+
This is different from "rec stream?" cmd to the module as it will return "streaming" when the module is no longer streaming but QPS is still receiveing stream data from the module.
|
193
204
|
ei the module has stopped streaming but is emptying the stream buffer.
|
194
205
|
"""
|
195
206
|
command_response = self.connectionObj.qps.sendCmdVerbose("$stream state")
|
@@ -197,8 +208,8 @@ class quarchStream:
|
|
197
208
|
raise Exception(command_response)
|
198
209
|
return (command_response)
|
199
210
|
|
200
|
-
|
201
|
-
|
211
|
+
def addAnnotation(self, title, annotationTime=0, extraText="", yPos="", titleColor="", annotationColor="",
|
212
|
+
annotationType="", annotationGroup="", timeFormat="unix"):
|
202
213
|
"""
|
203
214
|
Adds a custom annotation to stream with given parameters.
|
204
215
|
|
@@ -229,14 +240,15 @@ class quarchStream:
|
|
229
240
|
annotationType = annotationType.lower()
|
230
241
|
annotationTime = str(annotationTime)
|
231
242
|
|
232
|
-
if
|
233
|
-
timeFormat="elapsed"
|
234
|
-
if annotationTime.startswith(
|
235
|
-
|
243
|
+
if annotationTime[0].isalpha() or annotationTime[-1].isalpha():
|
244
|
+
timeFormat = "elapsed"
|
245
|
+
if annotationTime.startswith(
|
246
|
+
"e"): #Old format allowed e to be used to pass elapsed time in seconds "e2" -> 2s + elapsed
|
247
|
+
annotationTime = annotationTime[1:] + "s"
|
236
248
|
|
237
|
-
elif annotationTime=="0":
|
238
|
-
annotationTime=current_milli_time()
|
239
|
-
timeFormat="unix"
|
249
|
+
elif annotationTime == "0":
|
250
|
+
annotationTime = current_milli_time()
|
251
|
+
timeFormat = "unix"
|
240
252
|
|
241
253
|
if annotationType == "" or annotationType == "annotation":
|
242
254
|
annotationType = "annotate"
|
@@ -248,24 +260,23 @@ class quarchStream:
|
|
248
260
|
# return retString
|
249
261
|
|
250
262
|
title = title.replace("\n", "\\n")
|
251
|
-
cmd="$stream annotation add "+" time="+str(annotationTime)+ " text=\""+title+"\""
|
252
|
-
if extraText!="":
|
263
|
+
cmd = "$stream annotation add " + " time=" + str(annotationTime) + " text=\"" + title + "\""
|
264
|
+
if extraText != "":
|
253
265
|
extraText = extraText.replace("\n", "\\n")
|
254
|
-
cmd+=" extraText=\"" +str(extraText)+"\""
|
255
|
-
if yPos!= "":
|
256
|
-
cmd+=" yPos="+str(yPos)
|
257
|
-
if type!="":
|
258
|
-
cmd+=" type="+ str(annotationType)
|
259
|
-
if annotationColor!="":
|
260
|
-
cmd+=" colour="+str(annotationColor)
|
261
|
-
if titleColor!="":
|
262
|
-
cmd+=" textColour="+str(titleColor)
|
263
|
-
if timeFormat!="":
|
264
|
-
cmd+=" timeFormat="+str(timeFormat)
|
266
|
+
cmd += " extraText=\"" + str(extraText) + "\""
|
267
|
+
if yPos != "":
|
268
|
+
cmd += " yPos=" + str(yPos)
|
269
|
+
if type != "":
|
270
|
+
cmd += " type=" + str(annotationType)
|
271
|
+
if annotationColor != "":
|
272
|
+
cmd += " colour=" + str(annotationColor)
|
273
|
+
if titleColor != "":
|
274
|
+
cmd += " textColour=" + str(titleColor)
|
275
|
+
if timeFormat != "":
|
276
|
+
cmd += " timeFormat=" + str(timeFormat)
|
265
277
|
|
266
278
|
return self.connectionObj.qps.sendCmdVerbose(cmd)
|
267
279
|
|
268
|
-
|
269
280
|
def addComment(self, title, commentTime=0, extraText="", yPos="", titleColor="", commentColor="", annotationType="",
|
270
281
|
annotationGroup="", timeFormat="unix"):
|
271
282
|
# Comments are just annotations that do not affect the statistics grid.
|
@@ -276,7 +287,8 @@ class quarchStream:
|
|
276
287
|
titleColor=titleColor, annotationColor=commentColor, annotationType=annotationType,
|
277
288
|
annotationGroup=annotationGroup, timeFormat=timeFormat)
|
278
289
|
|
279
|
-
def saveCSV(self, filePath, linesPerFile=None, cr=None, delimiter=None, timeout=60
|
290
|
+
def saveCSV(self, filePath, linesPerFile=None, cr=None, delimiter=None, timeout=60, pollTillComplete=False,
|
291
|
+
checkInterval=0.5):
|
280
292
|
"""
|
281
293
|
Saves the stream to csv file at specified location
|
282
294
|
|
@@ -310,6 +322,12 @@ class quarchStream:
|
|
310
322
|
if delimiter != None:
|
311
323
|
args += " -s" + delimiter
|
312
324
|
|
325
|
+
# if pollTillComplete:
|
326
|
+
# is_exporting = check_export_status(self.get_stream_export_status())
|
327
|
+
# while is_exporting:
|
328
|
+
# is_exporting = check_export_status(self.get_stream_export_status())
|
329
|
+
# time.sleep(checkInterval)
|
330
|
+
|
313
331
|
# , filePath, linesPerFile, cr, delimiter
|
314
332
|
return self.connectionObj.qps.sendCmdVerbose("$save csv \"" + filePath + "\" " + args, timeout=timeout)
|
315
333
|
|
@@ -335,17 +353,22 @@ class quarchStream:
|
|
335
353
|
def channels(self):
|
336
354
|
return self.connectionObj.qps.sendCmdVerbose("$channels").splitlines()
|
337
355
|
|
338
|
-
def stopStream(self):
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
while "running" in streamState:
|
345
|
-
logging.debug("Stream buffer still emptying: " + streamState)
|
346
|
-
time.sleep(checkInterval)
|
356
|
+
def stopStream(self, pollTillComplete=False, checkInterval=0.5):
|
357
|
+
# Stop the stream
|
358
|
+
response = self.connectionObj.qps.sendCmdVerbose("$stop stream")
|
359
|
+
# Poll till stream has completed if required
|
360
|
+
if pollTillComplete:
|
361
|
+
# Get the current stream status
|
347
362
|
streamState = self.getStreamState().lower()
|
348
|
-
|
363
|
+
# Verify the stream stopped correctly
|
364
|
+
# response = check_stream_stopped_status(streamState)
|
365
|
+
# while "running" in streamState:
|
366
|
+
# logging.debug("Stream buffer still emptying: " + streamState)
|
367
|
+
# streamState = self.getStreamState().lower()
|
368
|
+
# response = check_stream_stopped_status(streamState)
|
369
|
+
# time.sleep(checkInterval)
|
370
|
+
|
371
|
+
return response
|
349
372
|
|
350
373
|
def hideAllDefaultChannels(self):
|
351
374
|
|
@@ -386,7 +409,13 @@ class quarchStream:
|
|
386
409
|
else:
|
387
410
|
dataPointTime = int(dataPointTime)
|
388
411
|
logging.warning("$stream data add " + channelName + " " + groupName + " " + str(dataPointTime) + " " + str(
|
389
|
-
|
412
|
+
dataValue) + " " + timeFormat)
|
390
413
|
self.connectionObj.qps.sendCmdVerbose(
|
391
414
|
"$stream data add " + channelName + " " + groupName + " " + str(dataPointTime) + " " + str(
|
392
415
|
dataValue) + " " + timeFormat)
|
416
|
+
|
417
|
+
def get_stream_export_status(self):
|
418
|
+
return self.connectionObj.qps.sendCmdVerbose("$stream export status")
|
419
|
+
|
420
|
+
def get_stats_export_status(self):
|
421
|
+
return self.connectionObj.qps.sendCmdVerbose("$stream stats export status")
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
quarchpy/docs/CHANGES.rst
CHANGED
quarchpy/docs/Makefile
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
# Minimal makefile for Sphinx documentation
|
2
|
-
#
|
3
|
-
|
4
|
-
# You can set these variables from the command line, and also
|
5
|
-
# from the environment for the first two.
|
6
|
-
SPHINXOPTS ?=
|
7
|
-
SPHINXBUILD ?= sphinx-build
|
8
|
-
SOURCEDIR = .
|
9
|
-
BUILDDIR = _build
|
10
|
-
|
11
|
-
# Put it first so that "make" without argument is like "make help".
|
12
|
-
help:
|
13
|
-
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
14
|
-
|
15
|
-
.PHONY: help Makefile
|
16
|
-
|
17
|
-
# Catch-all target: route all unknown targets to Sphinx using the new
|
18
|
-
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
19
|
-
%: Makefile
|
20
|
-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
1
|
+
# Minimal makefile for Sphinx documentation
|
2
|
+
#
|
3
|
+
|
4
|
+
# You can set these variables from the command line, and also
|
5
|
+
# from the environment for the first two.
|
6
|
+
SPHINXOPTS ?=
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
8
|
+
SOURCEDIR = .
|
9
|
+
BUILDDIR = _build
|
10
|
+
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
12
|
+
help:
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
14
|
+
|
15
|
+
.PHONY: help Makefile
|
16
|
+
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
19
|
+
%: Makefile
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@@ -1 +1 @@
|
|
1
|
-
/* This file intentionally left blank. */
|
1
|
+
/* This file intentionally left blank. */
|