2168 </xsl:text> |
2168 </xsl:text> |
2169 <xsl:text> let [new_val, old_val] = this.incoming[index]; |
2169 <xsl:text> let [new_val, old_val] = this.incoming[index]; |
2170 </xsl:text> |
2170 </xsl:text> |
2171 <xsl:text> this.incoming[index] = undefined; |
2171 <xsl:text> this.incoming[index] = undefined; |
2172 </xsl:text> |
2172 </xsl:text> |
2173 <xsl:text> // TODO: add timestamp argument to dispatch, so that defered data do not appear wrong on graphs |
|
2174 </xsl:text> |
|
2175 <xsl:text> this.lastdispatch[index] = Date.now(); |
2173 <xsl:text> this.lastdispatch[index] = Date.now(); |
2176 </xsl:text> |
2174 </xsl:text> |
2177 <xsl:text> this.do_dispatch(new_val, old_val, index); |
2175 <xsl:text> this.do_dispatch(new_val, old_val, index); |
2178 </xsl:text> |
2176 </xsl:text> |
2179 <xsl:text> } |
2177 <xsl:text> } |
9271 </xsl:text> |
9269 </xsl:text> |
9272 <xsl:text> let time = Date.now(); |
9270 <xsl:text> let time = Date.now(); |
9273 </xsl:text> |
9271 </xsl:text> |
9274 <xsl:text> |
9272 <xsl:text> |
9275 </xsl:text> |
9273 </xsl:text> |
9276 <xsl:text> console.log("dispatch(",value,oldval, index, time); |
|
9277 </xsl:text> |
|
9278 <xsl:text> // naive local buffer impl. |
9274 <xsl:text> // naive local buffer impl. |
9279 </xsl:text> |
9275 </xsl:text> |
9280 <xsl:text> // data is updated only when graph is visible |
9276 <xsl:text> // data is updated only when graph is visible |
9281 </xsl:text> |
9277 </xsl:text> |
9282 <xsl:text> // TODO: replace with separate recording |
9278 <xsl:text> // TODO: replace with separate recording |
11479 </xsl:text> |
11485 </xsl:text> |
11480 <xsl:text> |
11486 <xsl:text> |
11481 </xsl:text> |
11487 </xsl:text> |
11482 <xsl:text>const dvgetters = { |
11488 <xsl:text>const dvgetters = { |
11483 </xsl:text> |
11489 </xsl:text> |
11484 <xsl:text> INT: (dv,offset) => [dv.getInt16(offset, true), 2], |
11490 <xsl:text> SINT: (dv,offset) => [dv.getInt8(offset, true), 1], |
11485 </xsl:text> |
11491 </xsl:text> |
11486 <xsl:text> BOOL: (dv,offset) => [dv.getInt8(offset, true), 1], |
11492 <xsl:text> INT: (dv,offset) => [dv.getInt16(offset, true), 2], |
11487 </xsl:text> |
11493 </xsl:text> |
11488 <xsl:text> NODE: (dv,offset) => [dv.getInt8(offset, true), 1], |
11494 <xsl:text> DINT: (dv,offset) => [dv.getInt32(offset, true), 4], |
11489 </xsl:text> |
11495 </xsl:text> |
11490 <xsl:text> REAL: (dv,offset) => [dv.getFloat32(offset, true), 4], |
11496 <xsl:text> LINT: (dv,offset) => [dv.getBigInt64(offset, true), 8], |
|
11497 </xsl:text> |
|
11498 <xsl:text> USINT: (dv,offset) => [dv.getUint8(offset, true), 1], |
|
11499 </xsl:text> |
|
11500 <xsl:text> UINT: (dv,offset) => [dv.getUint16(offset, true), 2], |
|
11501 </xsl:text> |
|
11502 <xsl:text> UDINT: (dv,offset) => [dv.getUint32(offset, true), 4], |
|
11503 </xsl:text> |
|
11504 <xsl:text> ULINT: (dv,offset) => [dv.getBigUint64(offset, true), 8], |
|
11505 </xsl:text> |
|
11506 <xsl:text> BOOL: (dv,offset) => [dv.getInt8(offset, true), 1], |
|
11507 </xsl:text> |
|
11508 <xsl:text> NODE: (dv,offset) => [dv.getInt8(offset, true), 1], |
|
11509 </xsl:text> |
|
11510 <xsl:text> REAL: (dv,offset) => [dv.getFloat32(offset, true), 4], |
11491 </xsl:text> |
11511 </xsl:text> |
11492 <xsl:text> STRING: (dv, offset) => { |
11512 <xsl:text> STRING: (dv, offset) => { |
11493 </xsl:text> |
11513 </xsl:text> |
11494 <xsl:text> const size = dv.getInt8(offset); |
11514 <xsl:text> const size = dv.getInt8(offset); |
11495 </xsl:text> |
11515 </xsl:text> |
11715 </xsl:text> |
11735 </xsl:text> |
11716 <xsl:text> |
11736 <xsl:text> |
11717 </xsl:text> |
11737 </xsl:text> |
11718 <xsl:text>const typedarray_types = { |
11738 <xsl:text>const typedarray_types = { |
11719 </xsl:text> |
11739 </xsl:text> |
|
11740 <xsl:text> SINT: (number) => new Int8Array([number]), |
|
11741 </xsl:text> |
11720 <xsl:text> INT: (number) => new Int16Array([number]), |
11742 <xsl:text> INT: (number) => new Int16Array([number]), |
|
11743 </xsl:text> |
|
11744 <xsl:text> DINT: (number) => new Int32Array([number]), |
|
11745 </xsl:text> |
|
11746 <xsl:text> LINT: (number) => new Int64Array([number]), |
|
11747 </xsl:text> |
|
11748 <xsl:text> USINT: (number) => new Uint8Array([number]), |
|
11749 </xsl:text> |
|
11750 <xsl:text> UINT: (number) => new Uint16Array([number]), |
|
11751 </xsl:text> |
|
11752 <xsl:text> UDINT: (number) => new Uint32Array([number]), |
|
11753 </xsl:text> |
|
11754 <xsl:text> ULINT: (number) => new Uint64Array([number]), |
11721 </xsl:text> |
11755 </xsl:text> |
11722 <xsl:text> BOOL: (truth) => new Int8Array([truth]), |
11756 <xsl:text> BOOL: (truth) => new Int8Array([truth]), |
11723 </xsl:text> |
11757 </xsl:text> |
11724 <xsl:text> NODE: (truth) => new Int8Array([truth]), |
11758 <xsl:text> NODE: (truth) => new Int8Array([truth]), |
11725 </xsl:text> |
11759 </xsl:text> |