From b7646dc29e83ee9a9aec0e2e85b4fd4101b4052f Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 5 Dec 2019 16:25:43 +0100 Subject: [PATCH] Extended data type for text database --- .../database/text/TextDbLoader.groovy | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy b/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy index 1461b08..e2b2d42 100644 --- a/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy +++ b/com.minres.scviewer.database.text/src/com/minres/scviewer/database/text/TextDbLoader.groovy @@ -28,6 +28,7 @@ import com.minres.scviewer.database.IWaveform import com.minres.scviewer.database.IWaveformDb import com.minres.scviewer.database.IWaveformDbLoader import com.minres.scviewer.database.RelationType +import com.minres.scviewer.database.DataType public class TextDbLoader implements IWaveformDbLoader{ @@ -140,7 +141,7 @@ public class TextDbLoader implements IWaveformDbLoader{ BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); long lineCnt=0; reader.eachLine { line -> - def tokens = line.split(/\s+/) + def tokens = line.split(/\s+/) as ArrayList switch(tokens[0]){ case "scv_tr_stream": case "scv_tr_generator": @@ -187,7 +188,10 @@ public class TextDbLoader implements IWaveformDbLoader{ break case "tx_record_attribute"://matcher = line =~ /^tx_record_attribute\s+(\d+)\s+"([^"]+)"\s+(\S+)\s*=\s*(.+)$/ def id = Integer.parseInt(tokens[1]) - transactionsById[id].attributes<5?tokens[5..-1].join(' '):"" + transactionsById[id].attributes< stream.getMaxConcurrency() } }