To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 67d50e88 authored by Roman Trüb's avatar Roman Trüb
Browse files

handle LocalTimestampPkt with too long payload

support storing of raw datatrace files from multiple observers
parent ae7ab410
......@@ -443,8 +443,8 @@ def worker_datatrace(queueitem=None, nodeid=None, resultfile_path=None, logqueue
input_filename = "%s/%s" % (fdir, f)
loggername = "(%s.%d) " % (cur_p.name, obsid)
# # DEBUG
# shutil.copyfile(input_filename, "%s_raw" % resultfile_path)
# parse the file
# shutil.copyfile(input_filename, "{}_{}_raw".format(resultfile_path, nodeid))
## parse the file
# first line of the log file contains the variable names
varnames = ""
with open(input_filename, "r") as f:
......
......@@ -97,6 +97,8 @@ class SwoParser():
self._tc = (header >> 4) & 0b11 if not self._format2 else 0b00 ## format 2 can only occur if timestamp is synchronous (i.e. tc=0b00)
def addByte(self, byteVal):
if len(self._plBytes) >= 4:
raise Exception('ERROR: Payload of LocalTimestampPkt cannot be longer than 4 bytes! MCU probably not properly intialized...')
self._plBytes.append(byteVal)
def isComplete(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment