--- a/svghmi/gen_index_xhtml.xslt Tue Oct 22 17:06:31 2019 +0200
+++ b/svghmi/gen_index_xhtml.xslt Tue Oct 22 22:58:55 2019 +0200
@@ -586,13 +586,13 @@
<xsl:text> subscriptions[index] = new_period;
- <xsl:text> delta.push(new Blob([
<xsl:text> new Uint8Array([2]), /* subscribe = 2 */
<xsl:text> new Uint32Array([index]),
- <xsl:text> new Uint16Array([new_period])]));
+ <xsl:text> new Uint16Array([new_period])); @@ -608,17 +608,17 @@
<xsl:text>function send_hmi_value(index, value) {
- <xsl:text> iectype = hmitree_types[index];
+ <xsl:text> let iectype = hmitree_types[index]; - <xsl:text> jstype = typedarray_types[iectype];
+ <xsl:text> let jstype = typedarray_types[iectype]; <xsl:text> new Uint8Array([0]), /* setval = 0 */
- <xsl:text> new jstype([value])
+ <xsl:text> new Uint32Array([index]),
+ <xsl:text> new jstype([value])]); --- a/svghmi/svghmi.c Tue Oct 22 17:06:31 2019 +0200
+++ b/svghmi/svghmi.c Tue Oct 22 22:58:55 2019 +0200
@@ -286,7 +286,7 @@
void *dst_p = &rbuf[dsc->buf_index];
uint32_t sz = __get_type_enum_size(dsc->type);
- if((valptr + sz) < end)
+ if((valptr + sz) <= end) // rescheduling spinlock until free
while(AtomicCompareExchange(&dsc->rlock, 0, 1)) sched_yield();
--- a/svghmi/svghmi.js Tue Oct 22 17:06:31 2019 +0200
+++ b/svghmi/svghmi.js Tue Oct 22 22:58:55 2019 +0200
@@ -129,10 +129,10 @@
if(previous_period != new_period) {
subscriptions[index] = new_period;
new Uint8Array([2]), /* subscribe = 2 */
new Uint32Array([index]),
- new Uint16Array([new_period])]));
+ new Uint16Array([new_period])); @@ -140,12 +140,12 @@
function send_hmi_value(index, value) {
- iectype = hmitree_types[index];
- jstype = typedarray_types[iectype];
+ let iectype = hmitree_types[index]; + let jstype = typedarray_types[iectype]; new Uint8Array([0]), /* setval = 0 */
+ new Uint32Array([index]),