Merge branch 'release/2.17.3'

This commit is contained in:
Eyck Jentzsch 2023-02-24 09:15:23 +01:00
commit cf663bcae5
28 changed files with 82 additions and 86 deletions

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<version>3.0.0-SNAPSHOT</version> <version>3.0.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<version>1.0.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -243,29 +243,31 @@ public class FtrDbLoader implements IWaveformDbLoader {
assert(sz==3); assert(sz==3);
long name_id = cborDecoder.readInt(); long name_id = cborDecoder.readInt();
long type_id = cborDecoder.readInt(); long type_id = cborDecoder.readInt();
DataType type = DataType.values()[(int)type_id];
String attrName = strDict.get((int)name_id); String attrName = strDict.get((int)name_id);
TxAttributeType attrType = getOrAddAttributeType(tag, type_id, attrName); TxAttributeType attrType = getOrAddAttributeType(tag, type, attrName);
switch((int)type_id) { switch(type) {
case 0: // BOOLEAN case BOOLEAN:
ITxAttribute b = new TxAttribute(attrType, cborDecoder.readBoolean()?"True":"False"); ITxAttribute b = new TxAttribute(attrType, cborDecoder.readBoolean()?"True":"False");
ret.add(b); ret.add(b);
break; break;
case 2: // INTEGER case INTEGER:
case 3: // UNSIGNED case UNSIGNED:
case 10: // POINTER case POINTER:
case TIME:
ITxAttribute a = new TxAttribute(attrType, String.valueOf(cborDecoder.readInt())); ITxAttribute a = new TxAttribute(attrType, String.valueOf(cborDecoder.readInt()));
ret.add(a); ret.add(a);
break; break;
case 4: // FLOATING_POINT_NUMBER case FLOATING_POINT_NUMBER:
case 7: // FIXED_POINT_INTEGER case FIXED_POINT_INTEGER:
case 8: // UNSIGNED_FIXED_POINT_INTEGER case UNSIGNED_FIXED_POINT_INTEGER:
ITxAttribute v = new TxAttribute(attrType, String.valueOf(cborDecoder.readFloat())); ITxAttribute v = new TxAttribute(attrType, String.valueOf(cborDecoder.readFloat()));
ret.add(v); ret.add(v);
break; break;
case 1: // ENUMERATION case ENUMERATION:
case 5: // BIT_VECTOR case BIT_VECTOR:
case 6: // LOGIC_VECTOR case LOGIC_VECTOR:
case 12: // STRING case STRING:
ITxAttribute s = new TxAttribute(attrType, strDict.get((int)cborDecoder.readInt())); ITxAttribute s = new TxAttribute(attrType, strDict.get((int)cborDecoder.readInt()));
ret.add(s); ret.add(s);
break; break;
@ -281,9 +283,9 @@ public class FtrDbLoader implements IWaveformDbLoader {
return ret; return ret;
} }
private synchronized TxAttributeType getOrAddAttributeType(long tag, long type_id, String attrName) { private synchronized TxAttributeType getOrAddAttributeType(long tag, DataType type, String attrName) {
if(!attributeTypes.containsKey(attrName)) { if(!attributeTypes.containsKey(attrName)) {
attributeTypes.put(attrName, new TxAttributeType(attrName, DataType.values()[(int)type_id], AssociationType.values()[(int)tag-7])); attributeTypes.put(attrName, new TxAttributeType(attrName, type, AssociationType.values()[(int)tag-7]));
} }
TxAttributeType attrType = attributeTypes.get(attrName); TxAttributeType attrType = attributeTypes.get(attrName);
return attrType; return attrType;
@ -328,7 +330,6 @@ public class FtrDbLoader implements IWaveformDbLoader {
long array_len = readArrayLength(); long array_len = readArrayLength();
assert(array_len==-1); assert(array_len==-1);
CborType next = peekType(); CborType next = peekType();
int chunk_idx=0;
while(next != null && !break_type.isEqualType(next)) { while(next != null && !break_type.isEqualType(next)) {
long tag = readTag(); long tag = readTag();
switch((int)tag) { switch((int)tag) {
@ -404,7 +405,6 @@ public class FtrDbLoader implements IWaveformDbLoader {
} }
} }
next = peekType(); next = peekType();
chunk_idx++;
} }
} catch(IOException e) { } catch(IOException e) {
long pos = 0; long pos = 0;
@ -472,7 +472,6 @@ public class FtrDbLoader implements IWaveformDbLoader {
long tx_size = cborDecoder.readArrayLength(); long tx_size = cborDecoder.readArrayLength();
long txId = 0; long txId = 0;
long genId = 0; long genId = 0;
long attr_idx=0;
for(long i = 0; i<tx_size; ++i) { for(long i = 0; i<tx_size; ++i) {
long tag = cborDecoder.readTag(); long tag = cborDecoder.readTag();
switch((int)tag) { switch((int)tag) {
@ -501,22 +500,23 @@ public class FtrDbLoader implements IWaveformDbLoader {
default: { // skip over 7:begin attr, 8:record attr, 9:end attr default: { // skip over 7:begin attr, 8:record attr, 9:end attr
long sz = cborDecoder.readArrayLength(); long sz = cborDecoder.readArrayLength();
assert(sz==3); assert(sz==3);
long name_id = cborDecoder.readInt(); cborDecoder.readInt();
String name = loader.strDict.get((int)name_id);
long type_id = cborDecoder.readInt(); long type_id = cborDecoder.readInt();
switch((int)type_id) { switch(DataType.values()[(int)type_id]) {
case 0: // BOOLEAN case BOOLEAN:
cborDecoder.readBoolean(); cborDecoder.readBoolean();
break; break;
case 4: // FLOATING_POINT_NUMBER case FLOATING_POINT_NUMBER: // FLOATING_POINT_NUMBER
case 7: // FIXED_POINT_INTEGER case FIXED_POINT_INTEGER: // FIXED_POINT_INTEGER
case 8: // UNSIGNED_FIXED_POINT_INTEGER case UNSIGNED_FIXED_POINT_INTEGER: // UNSIGNED_FIXED_POINT_INTEGER
cborDecoder.readFloat(); cborDecoder.readFloat();
break; break;
case NONE: // UNSIGNED_FIXED_POINT_INTEGER
LOG.warn("Unsupported data type: "+type_id);
break;
default: default:
cborDecoder.readInt(); cborDecoder.readInt();
} }
attr_idx++;
} }
} }
} }

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -32,7 +32,18 @@ public class TxAttribute implements ITxAttribute{
@Override @Override
public DataType getDataType() { public DataType getDataType() {
return DataType.values()[scvAttribute.getData_type()]; int dt = scvAttribute.getData_type();
switch(dt) {
case 12:
return DataType.STRING;
case 10:
return DataType.POINTER;
default:
if(dt<9)
return DataType.values()[dt];
else
return DataType.NONE;
}
} }
@Override @Override

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<version>4.0.0-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>

View File

@ -56,8 +56,9 @@ public class RulerPainter implements IPainter {
int baselineY=waveCanvas.rulerHeight - 1; int baselineY=waveCanvas.rulerHeight - 1;
int bottom=waveCanvas.rulerHeight - 2; int bottom=waveCanvas.rulerHeight - 2;
long safe_scale_factor = scaleFactor!=0?scaleFactor:1;
long startTickTime = startTime+rulerTickMinor-(startTime % rulerTickMinor); long startTickTime = startTime+rulerTickMinor-(startTime % rulerTickMinor);
long majorTickDist = rulerTickMajor/scaleFactor; long majorTickDist = rulerTickMajor/safe_scale_factor;
gc.setBackground(waveCanvas.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); gc.setBackground(waveCanvas.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
gc.fillRectangle(new Rectangle(area.x, area.y, area.width, waveCanvas.rulerHeight)); gc.fillRectangle(new Rectangle(area.x, area.y, area.width, waveCanvas.rulerHeight));
@ -75,7 +76,7 @@ public class RulerPainter implements IPainter {
boolean drawEvery = majorTickDist>maxTextLength; boolean drawEvery = majorTickDist>maxTextLength;
boolean drawText=true; boolean drawText=true;
for (long tickTime = startTickTime; tickTime < endTime; tickTime+= rulerTickMinor) { for (long tickTime = startTickTime; tickTime < endTime; tickTime+= rulerTickMinor) {
int x0Pos = (int) (tickTime/scaleFactor) + proj.getTranslation().x; int x0Pos = (int) (tickTime/safe_scale_factor) + proj.getTranslation().x;
if ((tickTime % rulerTickMajor) == 0) { if ((tickTime % rulerTickMajor) == 0) {
if(drawEvery || drawText) if(drawEvery || drawText)
gc.drawText(waveCanvas.timeToString(tickTime), x0Pos, area.y+textY); gc.drawText(waveCanvas.timeToString(tickTime), x0Pos, area.y+textY);

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -14,46 +14,30 @@ package com.minres.scviewer.database;
* The Enum DataType. * The Enum DataType.
*/ */
public enum DataType { public enum DataType {
/** The boolean. */ /** The boolean. */
BOOLEAN, BOOLEAN, // bool
/** The enumeration. */ /** The enumeration. */
// bool ENUMERATION, // enum
ENUMERATION,
/** The integer. */ /** The integer. */
// enum INTEGER, // char, short, int, long, long long, sc_int, sc_bigint
INTEGER,
/** The unsigned. */ /** The unsigned. */
// char, short, int, long, long long, sc_int, sc_bigint UNSIGNED, // unsigned { char, short, int, long, long long }, sc_uint, sc_biguint
UNSIGNED, // unsigned { char, short, int, long, long long }, sc_uint,
/** The floating point number. */ /** The floating point number. */
// sc_biguint FLOATING_POINT_NUMBER, // float, double
FLOATING_POINT_NUMBER,
/** The bit vector. */ /** The bit vector. */
// float, double BIT_VECTOR, // sc_bit, sc_bv
BIT_VECTOR,
/** The logic vector. */ /** The logic vector. */
// sc_bit, sc_bv LOGIC_VECTOR, // sc_logic, sc_lv
LOGIC_VECTOR,
/** The fixed point integer. */ /** The fixed point integer. */
// sc_logic, sc_lv FIXED_POINT_INTEGER, // sc_fixed
FIXED_POINT_INTEGER,
/** The unsigned fixed point integer. */ /** The unsigned fixed point integer. */
// sc_fixed UNSIGNED_FIXED_POINT_INTEGER, // sc_ufixed
UNSIGNED_FIXED_POINT_INTEGER,
/** The record. */
// sc_ufixed
RECORD,
/** The pointer. */ /** The pointer. */
// struct/class POINTER, // T*
POINTER,
/** The array. */
// T*
ARRAY,
/** The string. */ /** The string. */
// string, std::string STRING, // string, std::string
STRING,
/** The time. */ /** The time. */
// sc_time TIME, // sc_time
TIME /** The void type. */
NONE
} }

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: SCViewer Help Bundle-Name: SCViewer Help
Bundle-SymbolicName: com.minres.scviewer.e4.application.help;singleton:=true Bundle-SymbolicName: com.minres.scviewer.e4.application.help;singleton:=true
Bundle-Version: 2.17.2 Bundle-Version: 2.17.3
Bundle-Vendor: MINRES Technologies GmbH Bundle-Vendor: MINRES Technologies GmbH
Automatic-Module-Name: com.minres.scviewer.e4.application.help Automatic-Module-Name: com.minres.scviewer.e4.application.help
Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-RequiredExecutionEnvironment: JavaSE-11

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
Bundle-Version: 2.17.2 Bundle-Version: 2.17.3
Bundle-Vendor: %Bundle-Vendor Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0", Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1", org.eclipse.core.runtime;bundle-version="3.11.1",

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>releng/com.minres.scviewer.target</module> <module>releng/com.minres.scviewer.target</module>
@ -70,7 +70,7 @@
<artifact> <artifact>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.target</artifactId> <artifactId>com.minres.scviewer.target</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
</artifact> </artifact>
</target> </target>
<executionEnvironment>org.eclipse.justj.openjdk.hotspot.jre.minimal-15</executionEnvironment> <executionEnvironment>org.eclipse.justj.openjdk.hotspot.jre.minimal-15</executionEnvironment>

View File

@ -6,11 +6,11 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<artifactId>com.minres.scviewer.e4.product</artifactId> <artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<packaging>eclipse-repository</packaging> <packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<build> <build>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?> <?pde version="3.5"?>
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.17.2" useFeatures="true" includeLaunchers="true"> <product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.17.3" useFeatures="true" includeLaunchers="true">
<configIni use="default"> <configIni use="default">
</configIni> </configIni>

View File

@ -12,7 +12,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>

View File

@ -7,7 +7,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<build> <build>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.minres.scviewer</groupId> <groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId> <artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version> <version>2.17.3</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<packaging>eclipse-test-plugin</packaging> <packaging>eclipse-test-plugin</packaging>