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