quarchpy 2.1.12.dev7__py2.py3-none-any.whl → 2.1.13.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/.idea/.name +1 -1
- quarchpy/__pycache__/_version.cpython-311.pyc +0 -0
- quarchpy/_version.py +1 -1
- quarchpy/connection_specific/QPS/qis/qis.jar +0 -0
- quarchpy/connection_specific/QPS/qis/qis_lib/CInterface-1.7.03.jar +0 -0
- quarchpy/connection_specific/QPS/qis/qis_lib/QuarchCommon-0.2.5.jar +0 -0
- quarchpy/connection_specific/QPS/qps.jar +0 -0
- quarchpy/connection_specific/QPS/scriptCommands.txt +27 -4
- quarchpy/connection_specific/connection_QIS.py +33 -33
- quarchpy/connection_specific/connection_QIS.py.bak +1821 -0
- quarchpy/debug/SystemTest.py +4 -6
- quarchpy/debug/__pycache__/simple_terminal.cpython-311.pyc +0 -0
- quarchpy/debug/simple_terminal.py +1 -1
- quarchpy/debug/upgrade_quarchpy.py +7 -10
- quarchpy/debug/versionCompare.py +0 -2
- quarchpy/device/device.py +15 -2
- quarchpy/device/device.py.bak +504 -0
- quarchpy/docs/CHANGES.rst +3 -1
- quarchpy/qps/__pycache__/qpsFuncs.cpython-311.pyc +0 -0
- quarchpy/qps/qpsFuncs.py +2 -1
- quarchpy/user_interface/user_interface.py +9 -3
- {quarchpy-2.1.12.dev7.dist-info → quarchpy-2.1.13.dev1.dist-info}/METADATA +4 -2
- {quarchpy-2.1.12.dev7.dist-info → quarchpy-2.1.13.dev1.dist-info}/RECORD +25 -23
- {quarchpy-2.1.12.dev7.dist-info → quarchpy-2.1.13.dev1.dist-info}/WHEEL +0 -0
- {quarchpy-2.1.12.dev7.dist-info → quarchpy-2.1.13.dev1.dist-info}/top_level.txt +0 -0
quarchpy/.idea/.name
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
connection.py
|
Binary file
|
quarchpy/_version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "2.1.
|
1
|
+
__version__ = "2.1.13.dev1"
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
QPS Command Summary
|
2
2
|
Copyright (c) Quarch Ltd
|
3
|
-
QPS v1.
|
4
|
-
Generated:
|
3
|
+
QPS v1.35
|
4
|
+
Generated: 31-Jul-2023
|
5
5
|
|
6
6
|
|
7
7
|
*** Commands ***
|
@@ -292,7 +292,7 @@ To indicate the end marker of an interval then set the value to 'endSeq'; eg : m
|
|
292
292
|
Command: $module connect
|
293
293
|
Description: Device ID
|
294
294
|
Version: 2
|
295
|
-
See also: $connect
|
295
|
+
See also: $connect, $module disconnect
|
296
296
|
Arguments
|
297
297
|
Argument: device
|
298
298
|
Description:
|
@@ -333,6 +333,18 @@ Default value: NONE
|
|
333
333
|
Examples:
|
334
334
|
$module scan tcp::192.168.1.90
|
335
335
|
|
336
|
+
Command: $open recording
|
337
|
+
Description: Opens a recording
|
338
|
+
Version: 2
|
339
|
+
Arguments
|
340
|
+
Argument: qpsFile
|
341
|
+
Description: .qps file
|
342
|
+
Index: 0
|
343
|
+
Type: STRING
|
344
|
+
Default value: NONE
|
345
|
+
Examples:
|
346
|
+
$open recording qpsFile="C:\quarch\recordings\AC\AC_Gen_test\AC_Gen_Test.qps"
|
347
|
+
|
336
348
|
Command: $qis launch
|
337
349
|
Description: Launches new QIS instance
|
338
350
|
Version: 2
|
@@ -413,6 +425,15 @@ Command: $scan
|
|
413
425
|
Description: Scans for available devices
|
414
426
|
Version: 1
|
415
427
|
See also: $module scan
|
428
|
+
Arguments
|
429
|
+
Argument: deviceSpecifier
|
430
|
+
Description: TCP/IP address to scan for devices
|
431
|
+
Index: 0
|
432
|
+
Type: STRING
|
433
|
+
Default value: NONE
|
434
|
+
Examples:
|
435
|
+
$scan
|
436
|
+
$scan tcp::192.168.1.90
|
416
437
|
|
417
438
|
Command: $show channel
|
418
439
|
Description: Shows a channel
|
@@ -756,7 +777,7 @@ Description: Value separator; eg ,
|
|
756
777
|
Index: 3
|
757
778
|
Type: STRING
|
758
779
|
Default value: ,
|
759
|
-
Acceptable values: [
|
780
|
+
Acceptable values: ["\t", ";", ",", " "]
|
760
781
|
Argument: fileType
|
761
782
|
Description: File type; eg CSV
|
762
783
|
Index: 4
|
@@ -969,6 +990,8 @@ $module name ~ Returns the connected device ID
|
|
969
990
|
|
970
991
|
$module scan ~ Scans for available devices
|
971
992
|
|
993
|
+
$open recording ~ Opens a recording
|
994
|
+
|
972
995
|
$qis launch ~ Launches new QIS instance
|
973
996
|
|
974
997
|
$qis shutdown ~ Shuts down current QIS instance
|
@@ -351,7 +351,7 @@ class QisInterface:
|
|
351
351
|
self.sendAndReceiveCmd(self.streamSock, 'rec stop', device=module, betweenCommandDelay = 0)
|
352
352
|
streamState = self.sendAndReceiveCmd(self.streamSock, 'stream?', device=module, betweenCommandDelay=0) # use "stream?" rather than "rec stream?" as it checks both QIS AND the device.
|
353
353
|
while "stopped" not in streamState.lower():
|
354
|
-
logging.debug("waiting for stream? to
|
354
|
+
logging.debug("waiting for stream? to return stopped")
|
355
355
|
time.sleep(0.1)
|
356
356
|
streamState = self.sendAndReceiveCmd(self.streamSock, 'stream?', device=module, betweenCommandDelay=0) # use "stream?" rather than "rec stream?" as it checks both QIS AND the device.
|
357
357
|
|
@@ -504,7 +504,7 @@ class QisInterface:
|
|
504
504
|
x = newStripes[:removeChar]
|
505
505
|
y = x.decode("utf-8")
|
506
506
|
|
507
|
-
print(
|
507
|
+
print("decoded stripe : " + y)
|
508
508
|
|
509
509
|
# Writing multiple stripes
|
510
510
|
if "\r\n" in y:
|
@@ -582,7 +582,7 @@ class QisInterface:
|
|
582
582
|
if index == 0:
|
583
583
|
continue
|
584
584
|
with open(os.path.join(self.qps_record_dir_path, "data000",
|
585
|
-
|
585
|
+
"data000_00" + index - 1 + "_000000000"),
|
586
586
|
"ab") as file1:
|
587
587
|
|
588
588
|
x = struct.pack(">d", int(item))
|
@@ -605,7 +605,7 @@ class QisInterface:
|
|
605
605
|
if group.group_id == 0:
|
606
606
|
|
607
607
|
with open(os.path.join(self.qps_record_dir_path, "data000",
|
608
|
-
|
608
|
+
"data000_"+x+"_000000000"),
|
609
609
|
"ab") as file1:
|
610
610
|
x = struct.pack(">d", int(stripe[counter]))
|
611
611
|
# logging.debug(item, x)
|
@@ -613,7 +613,7 @@ class QisInterface:
|
|
613
613
|
else:
|
614
614
|
# Write all in group 1 to digital
|
615
615
|
with open(os.path.join(self.qps_record_dir_path, "data101",
|
616
|
-
|
616
|
+
"data101_"+x+"_000000000"),
|
617
617
|
"ab") as file1:
|
618
618
|
x = struct.pack(">d", int(stripe[counter]))
|
619
619
|
# logging.debug(item, x)
|
@@ -1420,7 +1420,7 @@ class QisInterface:
|
|
1420
1420
|
inner_path_analogues = os.path.join(directory, in_folder_analogue)
|
1421
1421
|
os.mkdir(inner_path_analogues)
|
1422
1422
|
except:
|
1423
|
-
logging.warning(
|
1423
|
+
logging.warning("Failed to make inner directory for analogue signals " + inner_path_analogues)
|
1424
1424
|
return False
|
1425
1425
|
|
1426
1426
|
in_folder_digitals = "data101"
|
@@ -1429,26 +1429,26 @@ class QisInterface:
|
|
1429
1429
|
inner_path_digitals = os.path.join(directory, in_folder_digitals)
|
1430
1430
|
os.mkdir(inner_path_digitals)
|
1431
1431
|
except:
|
1432
|
-
logging.warning(
|
1432
|
+
logging.warning("Failed to make inner directory for digital signals "+ inner_path_digitals)
|
1433
1433
|
return False
|
1434
1434
|
|
1435
|
-
logging.debug(
|
1435
|
+
logging.debug("Steaming to : " + self.qps_record_dir_path)
|
1436
1436
|
|
1437
1437
|
logging.debug("Creating qps data files")
|
1438
1438
|
try:
|
1439
1439
|
for i in range(non_dig_counter):
|
1440
|
-
file_name =
|
1440
|
+
file_name = "data000_00"+i+"_000000000"
|
1441
1441
|
f = open(os.path.join(inner_path_analogues, file_name), "w")
|
1442
1442
|
f.close()
|
1443
1443
|
for i in range(digital_count):
|
1444
1444
|
x = i
|
1445
1445
|
while len(str(x)) < 3:
|
1446
1446
|
x = "0" + str(x)
|
1447
|
-
file_name =
|
1447
|
+
file_name = "data101_"+x+"_000000000"
|
1448
1448
|
f = open(os.path.join(inner_path_digitals, file_name), "w")
|
1449
1449
|
f.close()
|
1450
1450
|
except:
|
1451
|
-
logging.warning(
|
1451
|
+
logging.warning("failed to create qps data files for analogue signals")
|
1452
1452
|
return False
|
1453
1453
|
|
1454
1454
|
logging.debug("Finished creating qps data files")
|
@@ -1460,7 +1460,7 @@ class QisInterface:
|
|
1460
1460
|
f = open(os.path.join(self.qps_record_dir_path, file_nome), "w")
|
1461
1461
|
f.close()
|
1462
1462
|
except Exception as err:
|
1463
|
-
logging.warning(
|
1463
|
+
logging.warning("failed to create qps upper level files, "+err)
|
1464
1464
|
return False
|
1465
1465
|
|
1466
1466
|
try:
|
@@ -1471,7 +1471,7 @@ class QisInterface:
|
|
1471
1471
|
f = open(os.path.join(self.qps_record_dir_path, "data101.idx"), "wb")
|
1472
1472
|
f.close()
|
1473
1473
|
except Exception as err:
|
1474
|
-
logging.warning(
|
1474
|
+
logging.warning("failed to create data000.idx file, "+err)
|
1475
1475
|
return False
|
1476
1476
|
|
1477
1477
|
logging.debug("Finished creating QPS dir structure")
|
@@ -1486,7 +1486,7 @@ class QisInterface:
|
|
1486
1486
|
logging.debug("No directory specified")
|
1487
1487
|
elif not os.path.isdir(directory):
|
1488
1488
|
new_dir = os.path.join(str(Path.home()), "AppData", "Local", "Quarch", "QPS", "Recordings")
|
1489
|
-
logging.warning(
|
1489
|
+
logging.warning(directory+" was not a valid directory, streaming to default location: \n"+new_dir)
|
1490
1490
|
directory = new_dir
|
1491
1491
|
else:
|
1492
1492
|
# Split the directory into a path of folders
|
@@ -1499,7 +1499,7 @@ class QisInterface:
|
|
1499
1499
|
# If no folder name for the stream was passed, then default to 'quarchpy_recording' and a timestamp
|
1500
1500
|
if not folder_name:
|
1501
1501
|
folder_name = "quarchpy_recording"
|
1502
|
-
folder_name =
|
1502
|
+
folder_name = folder_name + "-" + time.time()
|
1503
1503
|
path = os.path.join(directory, self.qps_stream_folder_name)
|
1504
1504
|
os.mkdir(path)
|
1505
1505
|
self.qps_record_dir_path = path
|
@@ -1547,15 +1547,15 @@ class QisInterface:
|
|
1547
1547
|
raise "No data written to file"
|
1548
1548
|
|
1549
1549
|
num_records = len(data) / 8
|
1550
|
-
logging.debug(
|
1550
|
+
logging.debug("num_record = " + num_records)
|
1551
1551
|
return_b_array.append(int(num_records).to_bytes(4, byteorder='big'))
|
1552
1552
|
|
1553
1553
|
start_number = 0
|
1554
|
-
logging.debug(
|
1554
|
+
logging.debug("start_record = " + start_number)
|
1555
1555
|
return_b_array.append(start_number.to_bytes(8, byteorder='big'))
|
1556
1556
|
|
1557
1557
|
num_records = num_records - 1
|
1558
|
-
logging.debug(
|
1558
|
+
logging.debug("last_Record_number = "+num_records)
|
1559
1559
|
return_b_array.append(int(num_records).to_bytes(8, byteorder='big'))
|
1560
1560
|
|
1561
1561
|
# Add names of every file in data000 dir here.
|
@@ -1611,15 +1611,15 @@ class QisInterface:
|
|
1611
1611
|
raise "No data written to file"
|
1612
1612
|
|
1613
1613
|
num_records = len(data) / 8
|
1614
|
-
logging.debug(
|
1614
|
+
logging.debug("num_record = "+ num_records)
|
1615
1615
|
return_b_array.append(int(num_records).to_bytes(4, byteorder='big'))
|
1616
1616
|
|
1617
1617
|
start_number = 0
|
1618
|
-
logging.debug(
|
1618
|
+
logging.debug("start_record = "+start_number)
|
1619
1619
|
return_b_array.append(start_number.to_bytes(8, byteorder='big'))
|
1620
1620
|
|
1621
1621
|
num_records = num_records - 1
|
1622
|
-
logging.debug(
|
1622
|
+
logging.debug("last_Record_number = "+ num_records)
|
1623
1623
|
return_b_array.append(int(num_records).to_bytes(8, byteorder='big'))
|
1624
1624
|
|
1625
1625
|
# Add names of every file in data000 dir here.
|
@@ -1735,30 +1735,30 @@ class QisInterface:
|
|
1735
1735
|
def add_header_to_buffer(self, outBuffer, return_b_array, stream_header_size, temp_dict):
|
1736
1736
|
number = 2
|
1737
1737
|
outBuffer.append(number.to_bytes(4, byteorder='big'))
|
1738
|
-
logging.debug(
|
1738
|
+
logging.debug("indexVersion : "+ number)
|
1739
1739
|
|
1740
1740
|
number = 1 if self.has_digitals else 0
|
1741
1741
|
outBuffer.append(number.to_bytes(4, byteorder='big'))
|
1742
|
-
logging.debug(
|
1742
|
+
logging.debug("value0 : "+ number)
|
1743
1743
|
number = stream_header_size
|
1744
1744
|
outBuffer.append(number.to_bytes(4, byteorder='big'))
|
1745
|
-
logging.debug(
|
1746
|
-
logging.debug(
|
1745
|
+
logging.debug("header_size : "+number)
|
1746
|
+
logging.debug("legacyVersion : "+ temp_dict['legacyVersion'])
|
1747
1747
|
outBuffer.append(int(temp_dict["legacyVersion"]).to_bytes(4, byteorder='big'))
|
1748
|
-
logging.debug(
|
1748
|
+
logging.debug("legacyAverage : " + temp_dict['legacyAverage'])
|
1749
1749
|
outBuffer.append(int(temp_dict["legacyAverage"]).to_bytes(4, byteorder='big'))
|
1750
|
-
logging.debug(
|
1750
|
+
logging.debug("legacyFormat : "+temp_dict['legacyFormat'])
|
1751
1751
|
outBuffer.append(int(temp_dict["legacyFormat"]).to_bytes(4, byteorder='big'))
|
1752
|
-
logging.debug(
|
1752
|
+
logging.debug("mainPeriod : "+temp_dict['mainPeriod'])
|
1753
1753
|
outBuffer.append(int(temp_dict["mainPeriod"]).to_bytes(4, byteorder='big'))
|
1754
|
-
logging.debug(
|
1754
|
+
logging.debug("channels : "+temp_dict['channels'])
|
1755
1755
|
outBuffer.append(int(temp_dict["channels"]).to_bytes(4, byteorder='big'))
|
1756
1756
|
return_b_array.append(int(self.qps_record_start_time).to_bytes(8, byteorder='big'))
|
1757
1757
|
index_record_state = True
|
1758
1758
|
logging.debug(int(1))
|
1759
1759
|
return_b_array.append(int(1).to_bytes(1, byteorder='big'))
|
1760
1760
|
record_type = 1
|
1761
|
-
logging.debug(
|
1761
|
+
logging.debug("record type : "+int(index_record_state))
|
1762
1762
|
return_b_array.append(int(record_type).to_bytes(1, byteorder='big'))
|
1763
1763
|
|
1764
1764
|
def write_b_array_to_idx_file(self, f, return_b_array):
|
@@ -1799,15 +1799,15 @@ class QisInterface:
|
|
1799
1799
|
x = str(x).split(".")
|
1800
1800
|
x = x[0]
|
1801
1801
|
x = x.replace("-", " ")
|
1802
|
-
f.write(
|
1803
|
-
f.write(
|
1802
|
+
f.write("Started: "+x+"\n")
|
1803
|
+
f.write("Device: " + module + "\n")
|
1804
1804
|
f.write("Fixture: \n")
|
1805
1805
|
|
1806
1806
|
x = datetime.datetime.now()
|
1807
1807
|
x = str(x).split(".")
|
1808
1808
|
x = x[0]
|
1809
1809
|
x = x.replace("-", " ")
|
1810
|
-
f.write(
|
1810
|
+
f.write("Saved: "+x+ "\n")
|
1811
1811
|
|
1812
1812
|
|
1813
1813
|
def strToBb(string_in, add_length=True):
|