--- a/svghmi/gen_index_xhtml.xslt Tue Oct 03 21:33:13 2023 +0200
+++ b/svghmi/gen_index_xhtml.xslt Wed Oct 04 16:24:00 2023 +0200
@@ -2170,8 +2170,6 @@
</xsl:text>
<xsl:text> this.incoming[index] = undefined;
</xsl:text>
- <xsl:text> // TODO: add timestamp argument to dispatch, so that defered data do not appear wrong on graphs
-</xsl:text>
<xsl:text> this.lastdispatch[index] = Date.now();
</xsl:text>
<xsl:text> this.do_dispatch(new_val, old_val, index);
@@ -9273,8 +9271,6 @@
</xsl:text>
<xsl:text>
</xsl:text>
- <xsl:text> console.log("dispatch(",value,oldval, index, time);
-</xsl:text>
<xsl:text> // naive local buffer impl.
</xsl:text>
<xsl:text> // data is updated only when graph is visible
@@ -10985,9 +10981,19 @@
</xsl:text>
<xsl:text>
</xsl:text>
- <xsl:text> if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {
-</xsl:text>
- <xsl:text> throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
+ <xsl:text> if (re.numeric_arg.test(ph.type)){
+</xsl:text>
+ <xsl:text> let argtype = typeof arg;
+</xsl:text>
+ <xsl:text> if ( argtype !== 'bigint') {
+</xsl:text>
+ <xsl:text> if ( argtype !== 'number' && isNaN(arg) ) {
+</xsl:text>
+ <xsl:text> throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
+</xsl:text>
+ <xsl:text> }
+</xsl:text>
+ <xsl:text> }
</xsl:text>
<xsl:text> }
</xsl:text>
@@ -11481,13 +11487,27 @@
</xsl:text>
<xsl:text>const dvgetters = {
</xsl:text>
- <xsl:text> INT: (dv,offset) => [dv.getInt16(offset, true), 2],
-</xsl:text>
- <xsl:text> BOOL: (dv,offset) => [dv.getInt8(offset, true), 1],
-</xsl:text>
- <xsl:text> NODE: (dv,offset) => [dv.getInt8(offset, true), 1],
-</xsl:text>
- <xsl:text> REAL: (dv,offset) => [dv.getFloat32(offset, true), 4],
+ <xsl:text> SINT: (dv,offset) => [dv.getInt8(offset, true), 1],
+</xsl:text>
+ <xsl:text> INT: (dv,offset) => [dv.getInt16(offset, true), 2],
+</xsl:text>
+ <xsl:text> DINT: (dv,offset) => [dv.getInt32(offset, true), 4],
+</xsl:text>
+ <xsl:text> LINT: (dv,offset) => [dv.getBigInt64(offset, true), 8],
+</xsl:text>
+ <xsl:text> USINT: (dv,offset) => [dv.getUint8(offset, true), 1],
+</xsl:text>
+ <xsl:text> UINT: (dv,offset) => [dv.getUint16(offset, true), 2],
+</xsl:text>
+ <xsl:text> UDINT: (dv,offset) => [dv.getUint32(offset, true), 4],
+</xsl:text>
+ <xsl:text> ULINT: (dv,offset) => [dv.getBigUint64(offset, true), 8],
+</xsl:text>
+ <xsl:text> BOOL: (dv,offset) => [dv.getInt8(offset, true), 1],
+</xsl:text>
+ <xsl:text> NODE: (dv,offset) => [dv.getInt8(offset, true), 1],
+</xsl:text>
+ <xsl:text> REAL: (dv,offset) => [dv.getFloat32(offset, true), 4],
</xsl:text>
<xsl:text> STRING: (dv, offset) => {
</xsl:text>
@@ -11717,8 +11737,22 @@
</xsl:text>
<xsl:text>const typedarray_types = {
</xsl:text>
+ <xsl:text> SINT: (number) => new Int8Array([number]),
+</xsl:text>
<xsl:text> INT: (number) => new Int16Array([number]),
</xsl:text>
+ <xsl:text> DINT: (number) => new Int32Array([number]),
+</xsl:text>
+ <xsl:text> LINT: (number) => new Int64Array([number]),
+</xsl:text>
+ <xsl:text> USINT: (number) => new Uint8Array([number]),
+</xsl:text>
+ <xsl:text> UINT: (number) => new Uint16Array([number]),
+</xsl:text>
+ <xsl:text> UDINT: (number) => new Uint32Array([number]),
+</xsl:text>
+ <xsl:text> ULINT: (number) => new Uint64Array([number]),
+</xsl:text>
<xsl:text> BOOL: (truth) => new Int8Array([truth]),
</xsl:text>
<xsl:text> NODE: (truth) => new Int8Array([truth]),