Skip to content

Commit

Permalink
Merge branch 'release/2.17.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
eyck committed Feb 24, 2023
2 parents 7a98eda + 31e79e4 commit cf663bc
Show file tree
Hide file tree
Showing 28 changed files with 82 additions and 86 deletions.
2 changes: 1 addition & 1 deletion doc/com.minres.scviewer.doc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion features/com.minres.scviewer.database.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<version>3.0.0-SNAPSHOT</version>
Expand Down
2 changes: 1 addition & 1 deletion features/com.minres.scviewer.e4.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>
Expand Down
2 changes: 1 addition & 1 deletion features/com.minres.scviewer.e4.help.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
Expand Down
2 changes: 1 addition & 1 deletion features/com.minres.scviewer.e4.platform.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
Expand Down
2 changes: 1 addition & 1 deletion features/com.minres.scviewer.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>
Expand Down
2 changes: 1 addition & 1 deletion features/com.minres.scviewer.ui.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<version>1.1.0-SNAPSHOT</version>
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.database.ftr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
public class FtrDbLoader implements IWaveformDbLoader {

enum FileType { NONE, PLAIN, GZIP, LZ4};

/** The max time. */
private Long maxTime = 0L;

Expand Down Expand Up @@ -243,29 +243,31 @@ public List<? extends ITxAttribute> parseAtrributes(byte[] chunk, long blockOffs
assert(sz==3);
long name_id = cborDecoder.readInt();
long type_id = cborDecoder.readInt();
DataType type = DataType.values()[(int)type_id];
String attrName = strDict.get((int)name_id);
TxAttributeType attrType = getOrAddAttributeType(tag, type_id, attrName);
switch((int)type_id) {
case 0: // BOOLEAN
TxAttributeType attrType = getOrAddAttributeType(tag, type, attrName);
switch(type) {
case BOOLEAN:
ITxAttribute b = new TxAttribute(attrType, cborDecoder.readBoolean()?"True":"False");
ret.add(b);
break;
case 2: // INTEGER
case 3: // UNSIGNED
case 10: // POINTER
case INTEGER:
case UNSIGNED:
case POINTER:
case TIME:
ITxAttribute a = new TxAttribute(attrType, String.valueOf(cborDecoder.readInt()));
ret.add(a);
break;
case 4: // FLOATING_POINT_NUMBER
case 7: // FIXED_POINT_INTEGER
case 8: // UNSIGNED_FIXED_POINT_INTEGER
case FLOATING_POINT_NUMBER:
case FIXED_POINT_INTEGER:
case UNSIGNED_FIXED_POINT_INTEGER:
ITxAttribute v = new TxAttribute(attrType, String.valueOf(cborDecoder.readFloat()));
ret.add(v);
break;
case 1: // ENUMERATION
case 5: // BIT_VECTOR
case 6: // LOGIC_VECTOR
case 12: // STRING
case ENUMERATION:
case BIT_VECTOR:
case LOGIC_VECTOR:
case STRING:
ITxAttribute s = new TxAttribute(attrType, strDict.get((int)cborDecoder.readInt()));
ret.add(s);
break;
Expand All @@ -281,9 +283,9 @@ public List<? extends ITxAttribute> parseAtrributes(byte[] chunk, long blockOffs
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)) {
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);
return attrType;
Expand Down Expand Up @@ -328,7 +330,6 @@ public CborDbParser(FtrDbLoader loader, FileInputStream inputStream) {
long array_len = readArrayLength();
assert(array_len==-1);
CborType next = peekType();
int chunk_idx=0;
while(next != null && !break_type.isEqualType(next)) {
long tag = readTag();
switch((int)tag) {
Expand Down Expand Up @@ -404,7 +405,6 @@ public CborDbParser(FtrDbLoader loader, FileInputStream inputStream) {
}
}
next = peekType();
chunk_idx++;
}
} catch(IOException e) {
long pos = 0;
Expand Down Expand Up @@ -472,7 +472,6 @@ private void parseTx(TxStream txStream, long blockId, byte[] chunk) throws IOExc
long tx_size = cborDecoder.readArrayLength();
long txId = 0;
long genId = 0;
long attr_idx=0;
for(long i = 0; i<tx_size; ++i) {
long tag = cborDecoder.readTag();
switch((int)tag) {
Expand Down Expand Up @@ -501,22 +500,23 @@ private void parseTx(TxStream txStream, long blockId, byte[] chunk) throws IOExc
default: { // skip over 7:begin attr, 8:record attr, 9:end attr
long sz = cborDecoder.readArrayLength();
assert(sz==3);
long name_id = cborDecoder.readInt();
String name = loader.strDict.get((int)name_id);
cborDecoder.readInt();
long type_id = cborDecoder.readInt();
switch((int)type_id) {
case 0: // BOOLEAN
switch(DataType.values()[(int)type_id]) {
case BOOLEAN:
cborDecoder.readBoolean();
break;
case 4: // FLOATING_POINT_NUMBER
case 7: // FIXED_POINT_INTEGER
case 8: // UNSIGNED_FIXED_POINT_INTEGER
case FLOATING_POINT_NUMBER: // FLOATING_POINT_NUMBER
case FIXED_POINT_INTEGER: // FIXED_POINT_INTEGER
case UNSIGNED_FIXED_POINT_INTEGER: // UNSIGNED_FIXED_POINT_INTEGER
cborDecoder.readFloat();
break;
case NONE: // UNSIGNED_FIXED_POINT_INTEGER
LOG.warn("Unsupported data type: "+type_id);
break;
default:
cborDecoder.readInt();
}
attr_idx++;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.database.sqlite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,18 @@ public String getName() {

@Override
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
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.database.text/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.database.ui.swt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<version>4.0.0-SNAPSHOT</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ public void paintArea(Projection proj, Rectangle area) {
int baselineY=waveCanvas.rulerHeight - 1;
int bottom=waveCanvas.rulerHeight - 2;

long safe_scale_factor = scaleFactor!=0?scaleFactor:1;
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.fillRectangle(new Rectangle(area.x, area.y, area.width, waveCanvas.rulerHeight));
Expand All @@ -75,7 +76,7 @@ public void paintArea(Projection proj, Rectangle area) {
boolean drawEvery = majorTickDist>maxTextLength;
boolean drawText=true;
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(drawEvery || drawText)
gc.drawText(waveCanvas.timeToString(tickTime), x0Pos, area.y+textY);
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.database.vcd/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.database/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,30 @@
* The Enum DataType.
*/
public enum DataType {

/** The boolean. */
BOOLEAN,
BOOLEAN, // bool
/** The enumeration. */
// bool
ENUMERATION,
ENUMERATION, // enum
/** The integer. */
// enum
INTEGER,
INTEGER, // char, short, int, long, long long, sc_int, sc_bigint
/** The unsigned. */
// char, short, int, long, long long, sc_int, sc_bigint
UNSIGNED, // unsigned { char, short, int, long, long long }, sc_uint,
UNSIGNED, // unsigned { char, short, int, long, long long }, sc_uint, sc_biguint
/** The floating point number. */
// sc_biguint
FLOATING_POINT_NUMBER,
FLOATING_POINT_NUMBER, // float, double
/** The bit vector. */
// float, double
BIT_VECTOR,
BIT_VECTOR, // sc_bit, sc_bv
/** The logic vector. */
// sc_bit, sc_bv
LOGIC_VECTOR,
LOGIC_VECTOR, // sc_logic, sc_lv
/** The fixed point integer. */
// sc_logic, sc_lv
FIXED_POINT_INTEGER,
FIXED_POINT_INTEGER, // sc_fixed
/** The unsigned fixed point integer. */
// sc_fixed
UNSIGNED_FIXED_POINT_INTEGER,
/** The record. */
// sc_ufixed
RECORD,
UNSIGNED_FIXED_POINT_INTEGER, // sc_ufixed
/** The pointer. */
// struct/class
POINTER,
/** The array. */
// T*
ARRAY,
POINTER, // T*
/** The string. */
// string, std::string
STRING,
STRING, // string, std::string
/** The time. */
// sc_time
TIME
TIME, // sc_time
/** The void type. */
NONE
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SCViewer Help
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
Automatic-Module-Name: com.minres.scviewer.e4.application.help
Bundle-RequiredExecutionEnvironment: JavaSE-11
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.e4.application.help/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
Bundle-Version: 2.17.2
Bundle-Version: 2.17.3
Bundle-Vendor: %Bundle-Vendor
Require-Bundle: javax.inject;bundle-version="1.0.0",
org.eclipse.core.runtime;bundle-version="3.11.1",
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.e4.application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion plugins/com.minres.scviewer.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.minres.scviewer</groupId>
<artifactId>com.minres.scviewer.parent</artifactId>
<version>2.17.2</version>
<version>2.17.3</version>
<relativePath>../..</relativePath>
</parent>
<packaging>eclipse-plugin</packaging>
Expand Down
Loading

0 comments on commit cf663bc

Please sign in to comment.