]> git.zndr.dk Git - dotfiles.git/commitdiff
Add crc.py
authorJannik Zander <jannikz@localhost.localdomain>
Tue, 21 Jun 2016 20:52:51 +0000 (22:52 +0200)
committerJannik Zander <jannikz@localhost.localdomain>
Tue, 21 Jun 2016 20:54:09 +0000 (22:54 +0200)
.config/git/ignore
.config/profile/environ.sh
work/geni/crc.py [new file with mode: 0755]
work/geni/geni.py [new file with mode: 0755]
work/geni/geni_config.py [new file with mode: 0644]
work/gf/gf.py [deleted file]
work/gf/gf_config.py [deleted file]

index b69b9e557298f475cd48b7ec8262c4aa5aa39936..5221ad5d523bf485e7444be8f61df9c8a6539a20 100644 (file)
@@ -60,3 +60,5 @@ Icon
 Network Trash Folder
 Temporary Items
 .apdisk
+
+__pycache__
index f6b2624a54fbae6c9249b5d4db1df89a69a7462b..ec177f4066750207bdbb9da0f02f1dfb6f066d6f 100644 (file)
@@ -6,15 +6,14 @@ export HOSTNAME=`hostname`
 export SHELL='bash'
 export EDITOR='vim'
 export VISUAL='vim'
-export PAGER='less -X'
-export MANPAGER="less -X"
+export PAGER='less -eFRX'
+export MANPAGER="less -eFRX"
 export BROWSER='lynx -vikeys -use_mouse'
 
 # Larger bash history (allow 32³ entries; default is 500)
 export HISTSIZE=32768;
 export HISTFILESIZE=$HISTSIZE;
 export HISTCONTROL=ignoreboth;
-# Make some commands not show up in history
 export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help";
 
 # Prefer US language and UTF-8
diff --git a/work/geni/crc.py b/work/geni/crc.py
new file mode 100755 (executable)
index 0000000..dd5187c
--- /dev/null
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3
+
+Crc_Table16 = (
+  0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7,
+  0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef,
+  0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6,
+  0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de,
+  0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485,
+  0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d,
+  0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4,
+  0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc,
+  0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823,
+  0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b,
+  0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12,
+  0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a,
+  0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41,
+  0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49,
+  0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70,
+  0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78,
+  0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f,
+  0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067,
+  0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e,
+  0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256,
+  0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d,
+  0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
+  0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c,
+  0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634,
+  0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab,
+  0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3,
+  0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a,
+  0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92,
+  0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9,
+  0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1,
+  0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8,
+  0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0
+)
+
+
+class Crc(object):
+  def __init__(self, data):
+    self.init(data)
+
+  def update(self, data):
+    data &= 0xff
+    self._accum = (((self._accum << 8) & 0xffff) ^ Crc_Table16[((self._accum >> 8) ^ data) & 0xff]) & 0xffff
+
+  def init(self, data):
+    self._accum = data
+
+  def get(self):
+    return (self._accum ^ (0xffff)) & 0xffff
+
+def calcCrc(frame):
+  crc = Crc(0xffff)
+  for idx in range(1, len(frame)):
+    crc.update(frame[idx])
+  return crc.get()
+
+def verifyCrc(frame):
+  recCrc = (frame[-2]<<8)+frame[-1]
+  calCrc = calcCrc(frame[:-2])
+#  print("received",hex(recCrc>>8),hex(recCrc&0xff),"== calculated",hex(calCrc>>8),hex(calCrc&0xff))
+  return recCrc == calCrc;
+
+
+#data=b'\x27\x0D\x22\x20\x0B\x03\x34\x35\x70\x02\x04\xBE\x71\x72\x73'
+#crc=b'\xE5\x5B'
+#calccrc=calcCrc(data)
+#print("calc crc",hex(crc[0]),hex(crc[1]), "==",hex(calccrc>>8),hex(calccrc&0xff))
+#checkcrc=verifyCrc(data+crc)
+#print("check crc",hex(crc[0]),hex(crc[1]), "==",hex(checkcrc>>8),hex(checkcrc&0xff))
diff --git a/work/geni/geni.py b/work/geni/geni.py
new file mode 100755 (executable)
index 0000000..2874452
--- /dev/null
@@ -0,0 +1,544 @@
+#!/usr/bin/env python3
+
+# section: environment {{{1
+#########
+############################################
+import geni_config as gf
+import crc
+import serial
+from serial.tools import list_ports
+import fileinput
+import matplotlib.pyplot as plt
+from datetime import datetime,time
+import string
+#import ctype
+#import logging
+
+# section: debugging {{{1
+######################################################
+
+#telegrams=[b'\x27\x0D\x22\x20\x0B\x03\x34\x35\x70\x02\x04\xBE\x71\x72\x73\xE5\x5B']
+telegrams=[b'\xb7M\x012\x00\xc1\x01\x00\x00.\x0c\x13\x00\x00\x00\x00\x00d\x00\x00\x02X\x00\x02\x00\n']
+telegrams.append(b"\x00<\x07\xd0\x00\x00\x1a,\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x15\xbd'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x013\x00\xc1\x01\x00\x00.\x0e&\x00\x00\x00\x1d\x00\x01\xb3.\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x01,\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00o\xf4'\n")
+telegrams.append(b'! \x0b\x0345p\x07\x01\x0145$\x17 !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x0bMultistage\x00\x7f\x1a&G\xf7 \n')
+telegrams.append(b'\xb7M\x014\x00\xc1\x01\x00\x00\n')
+telegrams.append(b"\x0fk\x00\x00\x00\x009\xdc\x80A\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x01,\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xf6\x9e'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf4\x00\xc3\x01\x00\x00,\x00\x00\x0c\x00X\x00\x03\x00\xa5\x00\xa6\x00\xa7\x00[\x00\xaf\x00\xbe\x00\xbf\x01\x04\x00\xd7\x019\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@ \x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x8c\x8e'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x90\x00\xc2\x01\x00\x00\x1e\x00\x11\x00!\x00\x00\x00\x04\x00\x01\xb3\x87\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x02\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xe7\xd6'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x91\x00\xc2\x01\x00\x00\x1e\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x02\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xff\xa8'\n")
+telegrams.append(b'! \x0b\x0345p\x07\x01\x11&\x04$\r !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x01\x00\x95#&G\xf7 \n')
+telegrams.append(b"\xb7M\x01\x92\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x02\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x97d'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x93\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x10\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xedk'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b'\xb7M\x01,\x00\xc1\x01\x00\x00-\x02\x01\x03\x90!\xff\x82\x1b\x00\x00\xff\xff\xff\xff\x82S\x00\x00\xfe\xff\x82\x1b\x00\x00\x00\x0f\xff\x82\x1b\x00\x00\x00\x00\x00\xff\x82\x19\x00\xfe\xff\x82\x1b\x00\x00\xff\n')
+telegrams.append(b"\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x82E'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b'\xb7M\x01-\x00\xc1\x01\x00\x00*\x02(\xaa\x82\x1e\x00d\x02\xaa\x82\x1e\x00d\xaa\x82\x1e\x00d\xff\x82\x16\x00\x00\xff\x82\x1b\x00\x00\xff\x82S\x00\x00\xfe\xff\xff\xff\x82\x1b\x00\x00\xfe\x00\x00\xff\n')
+telegrams.append(b'\x05\x8aC\x00D\x00E\x00F\x00\x05\x00U"\'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n')
+telegrams.append(b"\xb7M\x01.\x00\xc1\x01\x00\x00.\x02>\xaa\x82\x1e\x00d\xff\x00\x00\x00\x00\x00\x00\x00\x00\xff\x82\x1b\x00\x00\xaa\x82\x1e\x00d\xff\x82\x1e\x00d!\x82\x1e\x00d\xfe\xaa\x82\x1e\x00d\x00\x11\x00\x10\x05\x8aC\x00D\x00E\x00F\x00\x05\x00O\xb9'\x0c! \x0b\x0345p\x02\x03\x94\x95\x96\x9b\xab$\x0f !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x03'\x07 !\x1a&G\xf7 \n")
+telegrams.append(b"\xb7M\x01/\x00\xc1\x01\x00\x00.\x02T\x00\x11\xff\x11\xfe\x10E\xff\x82\x00\x00\x00\x00\x02\xaa\x00\x02\x00\x00\x00\x00\xff\xff\x00\x00\x00\x03\x00\x00\x00\x00\x10!\xfe\x10\x00\x00\x00\x00\x00\x00\x00\x19\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00Fq'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x010\x00\xc1\x01\x00\x00*\x04\x8a\x00\x82\x1e\x00d\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x00\x05\x00\x05\x00\x00\x012d\x1a,\xab\x84\x82\x1e\x00d\xab\x84\xab\x84\xab\x84\xff\xff\x00\x00\x19\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xd5\xf8'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x011\x00\xc1\x01\x00\x00.\x0b.!\xfd\x83k\x05\x13\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xd9\x1a'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b'\xb7M\x012\x00\xc1\x01\x00\x00.\x0c\x13\x00\x00\x00\x00\x00d\x00\x00\x02X\x00\x02\x00\n')
+telegrams.append(b"\x00<\x07\xd0\x00\x00\x1a,\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x15\xbd'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x013\x00\xc1\x01\x00\x00.\x0e&\x00\x00\x00\x1d\x00\x01\xb3.\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x01,\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00o\xf4'\n")
+telegrams.append(b'! \x0b\x0345p\x07\x01\x0145$\x17 !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x0bMultistage\x00\x7f\x1a&G\xf7 \n')
+telegrams.append(b'\xb7M\x014\x00\xc1\x01\x00\x00\n')
+telegrams.append(b"\x0fk\x00\x00\x00\x009\xdc\x80A\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x01,\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xf6\x9e'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf4\x00\xc3\x01\x00\x00,\x00\x00\x0c\x00X\x00\x03\x00\xa5\x00\xa6\x00\xa7\x00[\x00\xaf\x00\xbe\x00\xbf\x01\x04\x00\xd7\x019\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@ \x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x8c\x8e'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x90\x00\xc2\x01\x00\x00\x1e\x00\x11\x00!\x00\x00\x00\x04\x00\x01\xb3\x87\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x04\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xe72'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x91\x00\xc2\x01\x00\x00\x1e\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x04\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xffL'\n")
+telegrams.append(b'! \x0b\x0345p\x07\x01\x11&\x04$\r !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x01\x00\x95#&G\xf7 \n')
+telegrams.append(b"\xb7M\x01\x92\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x04\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x97\x80'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x93\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x0c\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1e\\'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x94\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x0c\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00ed'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x95\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x0c\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xd7'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf4\x00\xc3\x01\x00\x00,\x00\x00\x0c\x00X\x00\x03\x00\xa5\x00\xa6\x00\xa7\x00[\x00\xaf\x00\xbe\x00\xbf\x01\x04\x00\xd7\x019\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@ \x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x8c\x8e'\x0c! \x0b\x0345p\x02\x03\x94\x95\x96\x9b\xab$\x0f !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x03'\x07 !\x1a&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^\xf8&\x1c\xf7 \x07\x8cJMultistage\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xb3\x80'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&\x12\xf7 \x07\x82K\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1b7'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&\x1c\xf7 \x07\x8cLMultistage\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x01\x8a'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82M\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x10P'\x0c! \x0b\x0345p\x02\x03\x94\x95\x96\x9b\xab$\x0f !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x03'\x07 !\x1a&\x12\xf7 \x07\x82N\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x9d\xf3'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82O\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xe6\x92'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf4\x00\xc3\x01\x00\x00,\x00\x00\x0c\x00X\x00\x03\x00\xa5\x00\xa6\x00\xa7\x00[\x00\xaf\x00\xbe\x00\xbf\x01\x04\x00\xd7\x019\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@ \x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x8c\x8e'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82P\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xbb\x08'\n")
+telegrams.append(b"! \x0b\x0345p\x07\x01\x0145$\x17 !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x0bMultistage\x00\x7f\x1a&\x12\xf7 \x07\x82Q\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xc0i'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82R\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00M\xca'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&\x12\xf7 \x07\x82S\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x006\xab'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&\x12\xf7 \x07\x82T\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00F\xad'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82U\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00=\xcc'\n")
+telegrams.append(b'! \x0b\x0345p\x07\x01\x11&\x04$\r !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x01\x00\x95#&G\xf7 \n')
+telegrams.append(b"\xb7M\x01\xf4\x00\xc3\x01\x00\x00,\x00\x00\x0c\x00X\x00\x03\x00\xa5\x00\xa6\x00\xa7\x00[\x00\xaf\x00\xbe\x00\xbf\x01\x04\x00\xd7\x019\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@ \x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x8c\x8e'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b'\xb7M\x01,\x00\xc1\x01\x00\x00-\x02\x01\x03\x90!\xff\x82\x1b\x00\x00\xff\xff\xff\xff\x82S\x00\x00\xfe\xff\x82\x1b\x00\x00\x00\x0f\xff\x82\x1b\x00\x00\x00\x00\x00\xff\x82\x19\x00\xfe\xff\x82\x1b\x00\x00\xff\n')
+telegrams.append(b"\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x82E'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b'\xb7M\x01-\x00\xc1\x01\x00\x00*\x02(\xaa\x82\x1e\x00d\x02\xaa\x82\x1e\x00d\xaa\x82\x1e\x00d\xff\x82\x16\x00\x00\xff\x82\x1b\x00\x00\xff\x82S\x00\x00\xfe\xff\xff\xff\x82\x1b\x00\x00\xfe\x00\x00\xff\n')
+telegrams.append(b'\x05\x8aC\x00D\x00E\x00F\x00\x05\x00U"\'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n')
+telegrams.append(b"\xb7M\x01.\x00\xc1\x01\x00\x00.\x02>\xaa\x82\x1e\x00d\xff\x00\x00\x00\x00\x00\x00\x00\x00\xff\x82\x1b\x00\x00\xaa\x82\x1e\x00d\xff\x82\x1e\x00d!\x82\x1e\x00d\xfe\xaa\x82\x1e\x00d\x00\x11\x00\x10\x05\x8aC\x00D\x00E\x00F\x00\x05\x00O\xb9'\x0c! \x0b\x0345p\x02\x03\x94\x95\x96\x9b\xab$\x0f !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x03'\x07 !\x1a&G\xf7 \n")
+telegrams.append(b"\xb7M\x01/\x00\xc1\x01\x00\x00.\x02T\x00\x11\xff\x11\xfe\x10E\xff\x82\x00\x00\x00\x00\x02\xaa\x00\x02\x00\x00\x00\x00\xff\xff\x00\x00\x00\x03\x00\x00\x00\x00\x10!\xfe\x10\x00\x00\x00\x00\x00\x00\x00\x19\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00Fq'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x010\x00\xc1\x01\x00\x00*\x04\x8a\x00\x82\x1e\x00d\x00\x00\x00\x00\x00\x00\x00\x01\x00\x04\x00\x05\x00\x05\x00\x00\x012d\x1a,\xab\x84\x82\x1e\x00d\xab\x84\xab\x84\xab\x84\xff\xff\x00\x00\x19\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xd5\xf8'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x011\x00\xc1\x01\x00\x00.\x0b.!\xfd\x83k\x05\x13\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xd9\x1a'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x90\x00\xc2\x01\x00\x00\x1e\x00\x11\x00!\x00\x00\x00\x04\x00\x01\xb3\x87\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x07\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xe7@'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x91\x00\xc2\x01\x00\x00\x1e\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x07\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xff>'\n")
+telegrams.append(b'! \x0b\x0345p\x07\x01\x11&\x04$\r !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x01\x00\x95#&G\xf7 \n')
+telegrams.append(b"\xb7M\x01\x92\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x07\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x97\xf2'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x93\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x13\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xed\x19'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x94\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x13\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x96!'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\x95\x00\xc2\x01\x00\x00\x1e\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00~\xb8\x04\x00\x00\x00\xa0\x02\x13\x00\x00\x00\x08\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xee\x92'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf4\x00\xc3\x01\x00\x00,\x00\x00\x0c\x00X\x00\x03\x00\xa5\x00\xa6\x00\xa7\x00[\x00\xaf\x00\xbe\x00\xbf\x01\x04\x00\xd7\x019\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@ \x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x8c\x8e'\x0c! \x0b\x0345p\x02\x03\x94\x95\x96\x9b\xab$\x0f !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x03'\x07 !\x1a&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x1c\xf7 \x07\x8cJMultistage\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xb3\x80'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&\x12\xf7 \x07\x82K\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1b7'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&\x1c\xf7 \x07\x8cLMultistage\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x01\x8a'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82M\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x10P'\x0c! \x0b\x0345p\x02\x03\x94\x95\x96\x9b\xab$\x0f !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x03'\x07 !\x1a&\x12\xf7 \x07\x82N\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x9d\xf3'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82O\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xe6\x92'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf4\x00\xc3\x01\x00\x00,\x00\x00\x0c\x00X\x00\x03\x00\xa5\x00\xa6\x00\xa7\x00[\x00\xaf\x00\xbe\x00\xbf\x01\x04\x00\xd7\x019\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@ \x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x8c\x8e'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&G\xf7 \n")
+telegrams.append(b"\xb7M\x01\xf50\xb8\x04\x00\xfa\xc7\x04\x00\xac5\x04\x00\xdc\x8f\x05\x00\xa4<\xff\xff\xe6\x9a\x05\x00\x01\x00\x00\x00\x00\x00\x00\x00\xee\xe5G\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\x1d\xcb'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82P\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xbb\x08'\n")
+telegrams.append(b"! \x0b\x0345p\x07\x01\x0145$\x17 !\x0b\x06\x00\x00\xff\xff\x00\x00\x07\x0bMultistage\x00\x7f\x1a&\x12\xf7 \x07\x82Q\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00\xc0i'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82R\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00M\xca'\x0f! \x0b\x0345p\x02\x06[tu\x81\x9a\xbd\x93\xa1$\x12 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x06\x00\xff\xff\xff\x00\x00RU&\x12\xf7 \x07\x82S\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x006\xab'\x18! \x0b\x0345p\x0b\x0f3efghijklmnoqrs\xe9\x9c$* !\x0b\x06\x00\x00\xff\xff\x00\x00\x0b\x1e\xff\xff\x00\x11\x00!\x00\x00\x00\x03\x00\x00\xd2\xe6\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00e[&\x12\xf7 \x07\x82T\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00F\xad'\r! \x0b\x0345p\x02\x04\xbeqrs*\xfe$\x10 !\x0b\x06\x00\x00\xff\xff\x00\x00\x02\x04\x00\xff\xff\xff\x8b^&\x12\xf7 \x07\x82U\x00\x05\x8aC\x00D\x00E\x00F\x00\x05\x00=\xcc'\n")
+# global variable
+cl=0
+td=[]
+master=[]
+speed=[]
+speed.append([])
+speed.append([])
+speed.append([])
+speed.append([])
+
+def dbg_speed(ids5,val5,ts,sa):
+  global td
+  global master
+  global speed
+  td=td+[ts.timestamp()]
+  master=master+[1+(sa-31)/10]
+  for i in range(len(ids5)):
+    if ids5[i] in range(67,71):
+      speed[ids5[i]-67]=speed[ids5[i]-67]+[val5[i]/254]
+  return td,master,speed
+
+# section: serial_ports {{{1
+######################################################
+def serial_ports():
+  ports=list(list_ports.comports())
+  # return the port if FTDI vendor
+  result=[]
+  print("Available ports:")
+  for p in ports:
+    print(repr(p.device),repr(p.description))
+    if p.vid==0x403: # FTDI vendor
+      try:
+        s = serial.Serial(p.device)
+        s.close()
+        result.append(p)
+      except (OSError, serial.SerialException):
+        pass
+  return result
+
+# section: serial_open {{{1
+######################################################
+def serial_open( vid, pid ):
+#vid=0x403
+#pid=0x6001
+#pid=0x6015
+  ctx = usb1.USBContext()
+  logging.basicConfig(level=logging.DEBUG)
+
+  for device in ctx.getDeviceList(skip_on_error=True):
+    print(device)
+    if device.getVendorID() == vid and device.getProductID() == pid:
+      device = device
+      break
+  else:
+    raise Exception( "ERROR: USB device %04x:%04x not found." % (vid, pid))
+
+  logging.info( "Found device : ID %04x:%04x -> %s Address %d" % (device.getVendorID(), device.getProductID(), '->'.join(str(x) for x in ['Bus %03i' % (device.getBusNumber(), )] + device.getPortNumberList()), device.getDeviceAddress() ))
+
+  handle = device.open()
+  print(handle)
+  logging.info( "Device opened, got handle" )
+
+  endpoint = 0x85
+  length   = 65536
+  timeout  = 100      # ms
+  print("enter loop")
+  while True:
+    print("reading")
+    data = handle.bulkRead ( endpoint, length, timeout )
+    # do something with data
+
+# section: checkcrc {{{1
+######################################################
+def checkcrc(line):
+  ok=False
+  if len(line)>16 and not "ERR" in line.upper():
+    ok=True
+#  print("Ok:",ok)
+  return ok
+
+# section: checkglowpan {{{1
+######################################################
+def checkglowpan(line):
+  isgenidata=False
+  line=line[32:]
+  #print(repr(line))
+  mac_hi,line=readbyte(line)
+  mac_lo,line=readbyte(line)
+  #print(mac_hi,mac_lo)
+  #print(repr(line))
+  if mac_hi==8 and mac_lo==4:
+    isgenidata=True
+    #print(repr(line))
+  #print(isgenidata)
+  return isgenidata,line
+# section: readtimestamp {{{1
+######################################################
+def readtimestamp(line):
+  info=line.split(":")
+  try:
+    timestamp=int(info[1].strip())/1000
+  except:
+    timestamp=0
+  finally:
+    ts=datetime.fromtimestamp(timestamp)
+
+  if timestamp>1e9: # 2001-09-09
+    line=info[0]
+  else:
+    try:
+      h=int(info[0][-2:])
+      m=int(info[1])
+      s=int(info[2][:2])
+      u=int(info[2][3:6])*1000
+      ts=datetime.combine(date.today(),time(h,m,s,u))
+      line=''.join(line.split(":")[2:])[7:]
+    except:
+      pass
+  print(ts)
+  return ts,line
+
+
+# section: readbyte {{{1
+######################################################
+#def readbyte(line):
+#  byte=-1
+#  line=line.strip()
+#  while byte==-1 and len(line)>0:
+#    try:
+#      byte=int(line[0:2],16)
+#      line=line[1:]
+#    except:
+#      pass
+#    finally:
+#      line=line[2:]
+#  return byte,line
+
+def readbyte(line):
+  byte=line[0]
+  line=line[1:]
+  return byte,line
+
+
+# section: process_header {{{1
+######################################################
+def process_header(line):
+  sd,line=readbyte(line)
+  if sd==gf.DATA_REQUEST:
+    typ="DATA_REQUEST --->"
+  elif sd==gf.DATA_MESSAGE:
+    typ="DATA_MESSAGE --->"
+  elif sd==gf.DATA_REPLY:
+    typ="<--- DATA_REPLY"
+  else:
+    typ="**** DATA_ERROR ****"
+    print("Data Type:",typ,"Start Delimiter:",sd)
+    return typ,sd,0,0,0,line
+  le,line=readbyte(line)
+  da,line=readbyte(line)
+  sa,line=readbyte(line)
+  if sd==gf.DATA_REQUEST and da==gf.DA_BROADCAST_CONNECT:
+    typ="CONNECTION_REQUEST ===>"
+  if sd==gf.DATA_REQUEST and da==gf.DA_BROADCAST_REQUEST:
+    typ="DATA_REQUEST  ===>"
+  if sd==gf.DATA_MESSAGE and da==gf.DA_BROADCAST_MESSAGE:
+    typ="DATA_MESSAGE  ===>"
+  print(typ)
+  print("Length:",le,"Destination Addr:",da,"Source Addr:",sa)
+  return typ,sd,le,da,sa,line
+
+# section: process_apdu {{{1
+######################################################
+def process_apdu(line):
+  cl,line=readbyte(line)
+  cl=cl&0x1F
+  le,line=readbyte(line)
+  os=(le&0xC0)>>6
+  le=le&0x3F
+  print(gf.operation[os],"Cl.",cl,"Len.",le)
+#  print(gf.operation[os],"Cl. {02}",cl)
+  return cl,os,le,line
+
+# section: process_data {{{1
+######################################################
+def process_data(line,le,size1,size2):
+  num=int(le/(size1+size2))
+  ids=[0]*num
+  val=[0]*num
+  for i in range(0,num):
+    if size1>0:
+      ids[i],line=readbyte(line)
+    for j in range(0,size2):
+      tmp,line=readbyte(line)
+      val[i]=(val[i]<<8)+tmp
+    if size1>0 and size2>0:
+      print("Id:",ids[i],repr(gf.params[cl][ids[i]]),"=",val[i])
+    elif size1>0:
+      print("Id:",ids[i],repr(gf.params[cl][ids[i]]))
+    elif size2>0:
+      print("=",val[i])
+  return ids,val,line
+
+# section: process_string {{{1
+######################################################
+def process_string(line,le,size1,size2):
+  ids=[0]*size1
+  val=[0]*size2
+  if size1>0:
+    ids,line=readbyte(line)
+  for i in range(0,size2):
+    val[i],line=readbyte(line)
+  string=''.join(chr(i) for i in val)
+  string=string[:-1]
+  if size1>0 and size2>0:
+    print("Id:",ids,repr(gf.params[cl][ids]),"=",repr(string))
+  elif size1>0:
+    print("Id:",ids,repr(gf.params[cl][ids]))
+  elif size2>0:
+    print("=",repr(string))
+  return ids,val,line
+
+# section: process_object {{{1
+######################################################
+def process_object(line,le,size1,size2):
+  ids=[0]*size1
+  val=[0]*size2
+  if size1>0:
+    ids,line=readbyte(line)
+  for i in range(0,size2):
+    val[i],line=readbyte(line)
+
+  if size1>0 and size2>0:
+    print("Id:",ids,repr(gf.params[cl][ids]),"=",val)
+  elif size1>0:
+    print("Id:",ids,repr(gf.params[cl][ids]))
+  elif size2>0:
+    print("=",val)
+  return ids,val,line
+
+# section: process_crc {{{1
+######################################################
+def process_crc(line):
+  crc1,line=readbyte(line)
+  crc2,line=readbyte(line)
+  crc1=format(crc1,'02X')
+  crc2=format(crc2,'02X')
+  crc=crc1+' '+crc2
+  print("CRC:",crc)
+  return crc
+
+# section: process_telegram {{{1
+######################################################
+def process_telegram(line):
+  # section: headers {{{2
+  global cl
+  # Check if timestamp exists
+#  ts,line=readtimestamp(line)
+  # Filter non geni data if glowpan frame
+#  isgenidata,line=checkglowpan(line)
+#  if not isgenidata:
+#    return
+  # Check if line is ok
+#  iscrcok=checkcrc(line)
+#  if not iscrcok:
+#    return
+  # Process geni data
+  typ,ds,le,da,sa,line=process_header(line)
+  numbytes=le-2
+  while numbytes>0 and len(line)>=numbytes:
+    print("--------------------------------------------------------------------")
+    cl,os,ale,line=process_apdu(line)
+    numbytes=numbytes-2-ale
+    # section: classes {{{2
+    if cl==2 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids2,val2,line=process_data(line,ale,1,0)
+    elif cl==2 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids2,val2,line=process_data(line,ale,0,1)
+    elif cl==2 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids2,val2,line=process_data(line,ale,1,0)
+    elif cl==2 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids2,val2,line=process_data(line,ale,0,4)
+    elif cl==3 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids3,val3,line=process_data(line,ale,1,0)
+    elif cl==3 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids3,val3,line=process_data(line,ale,1,0)
+    elif cl==3 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids3,val3,line=process_data(line,ale,0,4)
+    elif cl==4 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids4,val4,line=process_data(line,ale,1,0)
+    elif cl==4 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids4,val4,line=process_data(line,ale,0,1)
+    elif cl==4 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids4,val4,line=process_data(line,ale,1,1)
+    elif cl==4 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids4,val4,line=process_data(line,ale,1,0)
+    elif cl==4 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids4,val4,line=process_data(line,ale,0,4)
+    elif cl==5 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids5,val5,line=process_data(line,ale,1,0)
+    elif cl==5 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids5,val5,line=process_data(line,ale,0,1)
+    elif cl==5 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids5,val5,line=process_data(line,ale,1,1)
+    elif cl==5 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids5,val5,line=process_data(line,ale,1,0)
+    elif cl==5 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids5,val5,line=process_data(line,ale,0,4)
+    elif cl==7 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids7,val7,line=process_string(line,ale,1,0)
+    elif cl==7 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids7,val7,line=process_string(line,ale,0,ale)
+    elif cl==7 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids7,val7,line=process_string(line,ale,1,ale-1)
+    elif cl==10 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids10,val10,line=process_object(line,ale,1,0)
+    elif cl==10 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids10,val10,line=process_object(line,ale,0,ale)
+    elif cl==10 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids10,val10,line=process_object(line,ale,1,ale-1)
+    elif cl==11 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids11,val11,line=process_data(line,ale,1,0)
+    elif cl==11 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids11,val11,line=process_data(line,ale,0,2)
+    elif cl==11 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids11,val11,line=process_data(line,ale,1,2)
+    elif cl==11 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids11,val11,line=process_data(line,ale,1,0)
+    elif cl==11 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids11,val11,line=process_data(line,ale,0,4)
+    elif cl==12 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids12,val12,line=process_data(line,ale,1,0)
+    elif cl==12 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids12,val12,line=process_data(line,ale,0,2)
+    elif cl==12 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids12,val12,line=process_data(line,ale,1,2)
+    elif cl==12 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids12,val12,line=process_data(line,ale,1,0)
+    elif cl==12 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids12,val12,line=process_data(line,ale,0,4)
+    elif cl==13 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids13,val13,line=process_data(line,ale,1,0)
+    elif cl==13 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids13,val13,line=process_data(line,ale,0,2)
+    elif cl==13 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids13,val13,line=process_data(line,ale,1,2)
+    elif cl==13 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids13,val13,line=process_data(line,ale,1,0)
+    elif cl==13 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids13,val13,line=process_data(line,ale,0,4)
+    elif cl==14 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids14,val14,line=process_data(line,ale,1,0)
+    elif cl==14 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids14,val14,line=process_data(line,ale,0,3)
+    elif cl==14 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids14,val14,line=process_data(line,ale,1,3)
+    elif cl==14 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids14,val14,line=process_data(line,ale,1,0)
+    elif cl==14 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids14,val14,line=process_data(line,ale,0,4)
+    elif cl==15 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids15,val15,line=process_data(line,ale,1,0)
+    elif cl==15 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids15,val15,line=process_data(line,ale,0,3)
+    elif cl==15 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids15,val15,line=process_data(line,ale,1,3)
+    elif cl==15 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids15,val15,line=process_data(line,ale,1,0)
+    elif cl==15 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids15,val15,line=process_data(line,ale,0,4)
+    elif cl==16 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
+      ids16,val16,line=process_data(line,ale,1,0)
+    elif cl==16 and ds==gf.DATA_REPLY and os==gf.OS_GET:
+      ids16,val16,line=process_data(line,ale,0,3)
+    elif cl==16 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
+      ids16,val16,line=process_data(line,ale,1,3)
+    elif cl==16 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
+      ids16,val16,line=process_data(line,ale,1,0)
+    elif cl==16 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
+      ids16,val16,line=process_data(line,ale,0,4)
+    else:
+      line=line[ale:]
+# section: filtering {{{2
+    if cl==5:
+      td,master,speed=dbg_speed(ids5,val5,ts,sa)
+#  crc=process_crc(line)
+  return
+
+# section: main {{{1
+######################################################
+
+# section: serial {{{2
+lsser=serial_ports()
+ser=serial.Serial()
+ser.port=lsser[0].device
+ser.baudrate=9600
+ser.parity=serial.PARITY_NONE
+ser.stopbits=serial.STOPBITS_ONE
+ser.bytesize=serial.EIGHTBITS
+ser.timeout=40 # msec
+ser.open()
+print("Connected to",repr(ser.portstr))
+
+
+DL_IDLE=0
+DL_SENDING=1
+DL_RECEIVING=2
+state=DL_IDLE
+frame=bytearray()
+index=0
+while True:
+    byte=ser.read()
+    frame.append(byte)
+    if index==1:
+      framelen=byte+4
+      numbytes=framelen-1
+      state=DL_RECEIVING
+    elif index==0:
+      print("START")
+      pass
+    if state==DL_RECEIVING:
+      print(numbytes)
+      numbytes=numbytes-1
+      if numbytes==0:
+        if crc.verifyCrc(frame):
+          print("CRC ok")
+          process_telegram(frame[:-2])
+        else:
+          print("CRC error")
+        state=DL_IDLE
+        index=0
+        break # frame done
+    index=index+1
+
+ser.close()
+print("Disconnected")
+
+# section: plot {{{2
+######################################################
+
+# Calculate timedelta
+if len(td)==0: exit()
+t0=td[0]
+td[:]=[x-t0 for x in td]
+
+# Make a plot
+fig=plt.figure()
+plt.xlabel('time/s')
+plt.ylabel('speed/upper')
+plt.plot(td,speed[0],'green')
+plt.plot(td,speed[1],'red')
+plt.plot(td,speed[2],'blue')
+plt.plot(td,speed[3],'magenta')
+plt.legend('1234')
+plt.plot(td,master,'black')
+plt.title('multipump')
+plt.show()
+plt.close(fig)
+
diff --git a/work/geni/geni_config.py b/work/geni/geni_config.py
new file mode 100644 (file)
index 0000000..6dcd853
--- /dev/null
@@ -0,0 +1,1038 @@
+# config file for gf.py script
+
+# section: constants {{{1
+
+DATA_REQUEST=0x27
+DATA_MESSAGE=0x26
+DATA_REPLY=0x24
+
+DA_BROADCAST_CONNECT=0xFE
+DA_BROADCAST_REQUEST=0xFF
+DA_BROADCAST_MESSAGE=0xF7
+
+OS_GET=0
+OS_SET=2
+OS_INFO=3
+operation=[""]*4
+operation[OS_GET]="GET"
+operation[OS_SET]="SET"
+operation[OS_INFO]="INFO"
+
+ACK_OK=0
+ACK_CL_UNKNOWN=1
+ACK_ID_UNKNOWN=2
+ACK_OP_UNKNOWN=3
+ack=[""]*4
+ack[ACK_OK]="ACK_OK"
+ack[ACK_CL_UNKNOWN]="ACK_CLASS_UNKNOWN"
+ack[ACK_ID_UNKNOWN]="ACK_ID_UNKNOWN"
+ack[ACK_OP_UNKNOWN]="ACK_OPERATION_UNKNOWN"
+
+class0=[""]*4
+class1=[]
+class2=[""]*256
+class3=[""]*256
+class4=[""]*256
+class5=[""]*256
+class6=[]
+class7=[""]*256
+class8=[]
+class9=[]
+class10=[""]*256
+class11=[""]*256
+class12=[""]*256
+class13=[""]*3
+class14=[""]*256
+class15=[""]*256
+class16=[""]*3
+
+params=[]
+params.append(class0)
+params.append(class1)
+params.append(class2)
+params.append(class3)
+params.append(class4)
+params.append(class5)
+params.append(class6)
+params.append(class7)
+params.append(class8)
+params.append(class9)
+params.append(class10)
+params.append(class11)
+params.append(class12)
+params.append(class13)
+params.append(class14)
+params.append(class15)
+params.append(class16)
+
+# section: class 2 {{{2
+class2[18 ]="outlet_diff"
+class2[19 ]="h_remote_diff"
+class2[20 ]="t_remote_diff"
+class2[21 ]="h_storage_tank"
+class2[22 ]="temp_att"
+class2[23 ]="h_diff"
+class2[24 ]="t_2hour_hi"
+class2[25 ]="t_2hour_lo"
+class2[26 ]="i_dc"
+class2[27 ]="v_dc"
+class2[28 ]="t_e"
+class2[30 ]="i_mo"
+class2[31 ]="h_outlet"
+class2[32 ]="f_act"
+class2[33 ]="p_hi"
+class2[34 ]="p_lo"
+class2[35 ]="speed_hi"
+class2[36 ]="speed_lo"
+class2[37 ]="h"
+class2[38 ]="h_inlet"
+class2[39 ]="q"
+class2[40 ]="ref_loc"
+class2[41 ]="p_max"
+class2[42 ]="q_kn1"
+class2[43 ]="q_max"
+class2[44 ]="h_max"
+class2[45 ]="torque_hi"
+class2[46 ]="torque_lo"
+class2[47 ]="led_contr"
+class2[48 ]="ref_act"
+class2[49 ]="ref_norm"
+class2[50 ]="q_remote"
+class2[51 ]="v_mo"
+class2[52 ]="v_line"
+class2[53 ]="h_remote_1"
+class2[54 ]="h_feed_tank"
+class2[55 ]="ref_inf"
+class2[56 ]="p2_hi"
+class2[57 ]="p2_lo"
+class2[58 ]="t_w"
+class2[59 ]="t_ambient"
+class2[60 ]="sys_fb"
+class2[61 ]="ref_att"
+class2[62 ]="sys_ref"
+class2[63 ]="t_remote_1"
+class2[64 ]="start_alarm1"
+class2[66 ]="qsd_alarm1"
+class2[68 ]="stop_alarm1"
+class2[73 ]="h_remote_2"
+class2[74 ]="ref_ctr"
+class2[75 ]="f_pid"
+class2[76 ]="r_min"
+class2[77 ]="r_max"
+class2[78 ]="f_mo"
+class2[79 ]="ref_map"
+class2[80 ]="f_cl"
+class2[81 ]="act_mode1"
+class2[82 ]="act_mode2"
+class2[83 ]="act_mode3"
+class2[84 ]="act_mode4"
+class2[85 ]="loc_setup1"
+class2[86 ]="t_remote_2"
+class2[87 ]="rem_setup1"
+class2[88 ]="prop_press_infl"
+class2[89 ]="dig_in_ctr_sig"
+class2[90 ]="contr_source"
+class2[91 ]="pump_at_limit"
+class2[92 ]="aux_sensor"
+class2[94 ]="dyn_drive_state1"
+class2[95 ]="drive_modes1"
+class2[96 ]="q_low_flow_ind"
+class2[97 ]="curve_no_ref"
+class2[98 ]="dyn_drive_state2"
+class2[99 ]="lfs_state"
+class2[100]="liqtec_dryrun_status"
+class2[101]="lfs_est_time"
+class2[102]="t_2hour_on_hi"
+class2[103]="t_2hour_on_lo"
+class2[105]="load_pct"
+class2[106]="power_up_cnt_hi"
+class2[107]="power_up_cnt_lo1"
+class2[108]="power_up_cnt_lo2"
+class2[109]="lubric_cnt"
+class2[110]="bear_change_cnt"
+class2[111]="time_to_bear_service"
+class2[112]="control_mode"
+class2[113]="ana_in_1"
+class2[114]="ana_in_2"
+class2[115]="ana_in_3"
+class2[116]="temp_in_1"
+class2[117]="temp_in_2"
+class2[119]="t_bear_de"
+class2[120]="t_bear_nde"
+class2[121]="volume_hi"
+class2[122]="volume_lo1"
+class2[123]="volume_lo2"
+class2[124]="volume_lo3"
+class2[125]="spec_energy_hi"
+class2[126]="spec_energy_lo"
+class2[127]="grf_sensor_press"
+class2[128]="grf_sensor_temp"
+class2[129]="liqtec_temp"
+class2[148]="unit_family"
+class2[149]="unit_type"
+class2[150]="unit_version"
+class2[151]="energy_hi"
+class2[152]="energy_lo1"
+class2[153]="energy_lo2"
+class2[154]="alarm_code_pump"
+class2[155]="alarm_code_disp"
+class2[156]="warn_code"
+class2[157]="warn_code_disp"
+class2[158]="alarm_code"
+class2[159]="warn_bits1"
+class2[160]="warn_bits2"
+class2[161]="warn_bits3"
+class2[162]="warn_bits4"
+class2[163]="alarm_log_1"
+class2[164]="alarm_log_2"
+class2[165]="alarm_log_3"
+class2[166]="alarm_log_4"
+class2[167]="alarm_log_5"
+class2[168]="alarm_log_1_disp"
+class2[169]="alarm_log_2_disp"
+class2[170]="alarm_log_3_disp"
+class2[171]="alarm_log_4_disp"
+class2[172]="alarm_log_5_disp"
+class2[173]="warn_log_1"
+class2[174]="warn_log_2"
+class2[175]="warn_log_3"
+class2[176]="warn_log_4"
+class2[177]="warn_log_5"
+class2[178]="warn_log_1_disp"
+class2[179]="warn_log_2_disp"
+class2[180]="warn_log_3_disp"
+class2[181]="warn_log_4_disp"
+class2[182]="warn_log_5_disp"
+class2[183]="alarm_log_change_cnt"
+class2[184]="pumps_present"
+class2[185]="pumps_running"
+class2[186]="pumps_fault"
+class2[187]="pumps_com_fault"
+class2[188]="pumps_fb_sensor"
+class2[189]="fb_sensor_status"
+class2[190]="up_down_button"
+class2[191]="off_button"
+class2[192]="add_on_actual"
+class2[193]="r100_menu_setup1_act"
+class2[194]="dig_out"
+class2[195]="dig_in"
+class2[196]="ana_out"
+class2[197]="i_mo_max"
+class2[199]="t_mo"
+class2[200]="t_w_3d"
+class2[201]="q_3d"
+class2[202]="h_3d"
+class2[203]="p_3d"
+class2[207]="functional_module"
+class2[208]="hmi_module"
+class2[209]="power_board"
+class2[220]="tps_i_mo"
+class2[221]="tps_t_2hour_hi"
+class2[222]="tps_t_2hour_lo"
+class2[223]="tps_t_w"
+class2[224]="tps_start_cnt_hi"
+class2[225]="tps_start_cnt_lo1"
+class2[226]="tps_start_cnt_lo2"
+class2[227]="tps_act_mode1"
+class2[228]="tps_act_mode3"
+class2[229]="tps_contr_source"
+class2[230]="tps_dig_in"
+class2[231]="tps_alarm_code"
+class2[234]="soft_press_status"
+class2[235]="varistor_wear_out"
+class2[236]="glowpan_radio_status"
+class2[237]="dyn_info_change_cnt"
+class2[238]="actual_pwm_type"
+# section: class 3 {{{2
+class3[1  ]="reset"
+class3[2  ]="reset_alarm"
+class3[3  ]="factory_boot"
+class3[4  ]="user_boot"
+class3[5  ]="stop"
+class3[6  ]="start"
+class3[7  ]="remote"
+class3[8  ]="local"
+class3[15 ]="forward"
+class3[16 ]="reverse"
+class3[20 ]="test"
+class3[22 ]="const_freq"
+class3[23 ]="prop_press"
+class3[24 ]="const_press"
+class3[25 ]="min"
+class3[26 ]="max"
+class3[30 ]="lock_keys"
+class3[31 ]="unlock_keys"
+class3[33 ]="ref_up"
+class3[34 ]="ref_down"
+class3[36 ]="reset_hist"
+class3[40 ]="mp_master"
+class3[41 ]="auto_restart_e"
+class3[42 ]="auto_restart_d"
+class3[47 ]="mcp_stop"
+class3[48 ]="mcp_derate"
+class3[49 ]="low_flow_stop_e"
+class3[50 ]="low_flow_stop_d"
+class3[51 ]="reset_alarm_log"
+class3[52 ]="auto_adapt"
+class3[59 ]="duty_standby_e"
+class3[61 ]="const_temp"
+class3[62 ]="cl_sensor_contr"
+class3[63 ]="const_flow"
+class3[64 ]="const_level"
+class3[65 ]="flow_adapt"
+class3[66 ]="night_reduct_e"
+class3[67 ]="night_reduct_d"
+class3[68 ]="forced_local"
+class3[69 ]="release_forced_local"
+class3[75 ]="hand"
+class3[76 ]="ds_ref_up"
+class3[77 ]="reset_auto_adapt"
+class3[79 ]="relay_1_open"
+class3[80 ]="relay_1_close"
+class3[81 ]="relay_3_open"
+class3[82 ]="relay_3_close"
+class3[83 ]="relay_4_open"
+class3[84 ]="relay_4_close"
+class3[86 ]="reset_start_cnt"
+class3[87 ]="mp_start_search"
+class3[88 ]="mp_join_req_accepted"
+class3[89 ]="mp_join_req_rejected"
+class3[90 ]="reset_heat_energy_cnt"
+class3[91 ]="reset_energy_cnt"
+class3[92 ]="mp_start_multi_pump"
+class3[93 ]="mp_end_multi_pump"
+class3[94 ]="twin_pump_master"
+class3[95 ]="twin_pump_slave"
+class3[96 ]="const_diff_press"
+class3[97 ]="const_diff_temp"
+class3[98 ]="authen_req_accepted"
+class3[99 ]="authen_req_rejected"
+class3[103]="user_def"
+class3[104]="wink_p1"
+class3[105]="wink_p2"
+class3[106]="wink_p3"
+class3[107]="wink_p4"
+class3[108]="wink_p5"
+class3[109]="wink_p6"
+class3[110]="lubrication_done"
+class3[111]="bearing_changed"
+class3[112]="varistor_changed"
+class3[113]="relay_2_open"
+class3[114]="relay_2_close"
+class3[115]="debug"
+class3[116]="update_h_max"
+class3[118]="reset_corr_hist_log"
+class3[119]="geniair_node_ping"
+class3[120]="mp_start_wired_search"
+class3[121]="wink_on"
+class3[122]="wink_off"
+# section: class 4 {{{2
+class4[0  ]="production_code_1"
+class4[1  ]="production_code_2"
+class4[2  ]="production_code_3"
+class4[3  ]="production_code_4"
+class4[4  ]="production_code_5"
+class4[5  ]="production_code_6"
+class4[6  ]="production_code_7"
+class4[7  ]="production_code_8"
+class4[8  ]="production_code_9"
+class4[9  ]="production_code_10"
+class4[10 ]="configuration_code_1"
+class4[11 ]="configuration_code_2"
+class4[12 ]="configuration_code_3"
+class4[13 ]="configuration_code_4"
+class4[14 ]="vir_conf_code_year"
+class4[15 ]="vir_conf_code_week"
+class4[16 ]="act_conf_code_year"
+class4[17 ]="act_conf_code_week"
+class4[18 ]="el_version_char_1"
+class4[19 ]="el_version_char_2"
+class4[20 ]="el_version_char_3"
+class4[21 ]="t_min_delay"
+class4[22 ]="t_standby"
+class4[23 ]="t_ramp_up_1_hi"
+class4[24 ]="t_ramp_up_1_lo"
+class4[25 ]="t_ramp_down_1_hi"
+class4[26 ]="t_ramp_down_1_lo"
+class4[27 ]="local_mode_setup"
+class4[28 ]="local_ref_setup"
+class4[29 ]="f_lower"
+class4[30 ]="f_upper"
+class4[31 ]="f_nom"
+class4[32 ]="f_min_stop"
+class4[33 ]="f_night"
+class4[34 ]="f_min"
+class4[35 ]="f_max"
+class4[36 ]="f_min_start"
+class4[37 ]="user_curve"
+class4[38 ]="r100_menu_setup_2"
+class4[39 ]="auto_restarts_per_day"
+class4[40 ]="motor_type"
+class4[41 ]="h_max_limit"
+class4[42 ]="h_max_limit_ed"
+class4[43 ]="geniair_channel"
+class4[44 ]="stator_heater_level"
+class4[45 ]="mp_master_addr"
+class4[46 ]="unit_addr"
+class4[47 ]="group_addr"
+class4[48 ]="event_action_setup1"
+class4[49 ]="event_action_setup2"
+class4[50 ]="event_action_setup3"
+class4[51 ]="event_action_setup4"
+class4[52 ]="event_action_setup5"
+class4[55 ]="bear_superv_setup"
+class4[56 ]="bear_superv_detect_del"
+class4[57 ]="bear_superv_reset_hyst"
+class4[58 ]="t_bear_de_warn_limit"
+class4[59 ]="t_bear_de_alarm_limit"
+class4[60 ]="t_bear_nde_warn_limit"
+class4[61 ]="t_bear_nde_alarm_limit"
+class4[62 ]="bear_lubric_setup"
+class4[63 ]="bear_lubric_max"
+class4[64 ]="r100_menu_setup_4"
+class4[65 ]="p_max"
+class4[66 ]="r100_menu_select"
+class4[67 ]="limit_exc_1_setup"
+class4[68 ]="limit_exc_2_setup"
+class4[69 ]="limit_exc_1_source"
+class4[70 ]="limit_exc_2_source"
+class4[71 ]="limit_exc_1_action"
+class4[72 ]="limit_exc_2_action"
+class4[78 ]="min_reply_delay_default"
+class4[79 ]="baud_rate_default"
+class4[80 ]="temp_influence_setup"
+class4[81 ]="geni_setup"
+class4[82 ]="r100_menu_setup_1"
+class4[83 ]="h_const_ref_min"
+class4[84 ]="h_const_ref_max"
+class4[85 ]="h_prop_ref_min"
+class4[86 ]="h_prop_ref_max"
+class4[87 ]="ref_steps"
+class4[88 ]="h_max"
+class4[89 ]="q_max"
+class4[90 ]="q_bezier1"
+class4[91 ]="h_bezier1"
+class4[92 ]="q_bezier2"
+class4[93 ]="h_bezier2"
+class4[94 ]="liqtec_dryrun_det_delay"
+class4[95 ]="liqtec_dryrun_limit"
+class4[96 ]="h_auto_act"
+class4[97 ]="application_type"
+class4[98 ]="h_ref_min"
+class4[99 ]="h_auto_ref_min"
+class4[100]="q_low_meas_limit"
+class4[101]="delta_h"
+class4[102]="lfs_type_select"
+class4[103]="h_max_hi"
+class4[104]="h_max_lo"
+class4[105]="q_max_hi"
+class4[106]="q_max_lo"
+class4[109]="def_direction"
+class4[110]="ext_fault_quick_rst_tim"
+class4[111]="ext_fault_quick_rst_max"
+class4[112]="ext_fault_slow_rst_tim"
+class4[113]="ext_fault_slow_rst_max"
+class4[114]="external_fault_delay"
+class4[115]="dry_run_f0"
+class4[116]="dry_run_p0"
+class4[117]="dry_run_f_min"
+class4[118]="quick_restart_max"
+class4[119]="quick_restart_time"
+class4[120]="prop_curve_select"
+class4[121]="prop_curve_reduc_pct"
+class4[122]="h_auto_set"
+class4[123]="h_auto_foot"
+class4[124]="fac_restart_setup1"
+class4[125]="fac_restart_setup2"
+class4[126]="fac_restart_setup3"
+class4[127]="dig_in_options"
+class4[128]="t_ramp_up_2_hi"
+class4[129]="t_ramp_up_2_lo"
+class4[130]="t_ramp_down_2_hi"
+class4[131]="t_ramp_down_2_lo"
+class4[132]="procent_k"
+class4[133]="h_max_def"
+class4[134]="h_max_act"
+class4[136]="prop_ctr_qmax_hi"
+class4[137]="prop_ctr_qmax_lo"
+class4[138]="ref_preset_1"
+class4[139]="ref_preset_2"
+class4[140]="ref_preset_3"
+class4[141]="ref_preset_4"
+class4[142]="ref_preset_5"
+class4[143]="ref_preset_6"
+class4[144]="ref_preset_7"
+class4[145]="ref_preset_direction"
+class4[147]="fs1_begin_hi"
+class4[148]="fs1_begin_lo"
+class4[149]="fs1_end_hi"
+class4[150]="fs1_end_lo"
+class4[151]="fs2_begin_hi"
+class4[152]="fs2_begin_lo"
+class4[153]="fs2_end_hi"
+class4[154]="fs2_end_lo"
+class4[155]="t_start_ramp"
+class4[156]="t_stop_ramp"
+class4[157]="t_skip_band_ramp"
+class4[162]="t_power_up_delay"
+class4[163]="t_fan_ctr_limit"
+class4[164]="t_alternate"
+class4[165]="alarm_setup1"
+class4[166]="alarm_setup2"
+class4[167]="restart_setup1"
+class4[168]="restart_setup2"
+class4[169]="application_setup1"
+class4[170]="application_setup2"
+class4[171]="cl_ctr_setup1"
+class4[172]="application_setup3"
+class4[173]="application_setup4"
+class4[175]="ref_inf_source"
+class4[176]="h_nom_hi"
+class4[177]="h_nom_lo"
+class4[178]="q_nom_hi"
+class4[179]="q_nom_lo"
+class4[180]="k_p"
+class4[181]="t_i_hi"
+class4[182]="t_i_lo"
+class4[183]="t_d_hi"
+class4[184]="t_d_lo"
+class4[185]="f_pid_start"
+class4[188]="pulse_cnt_setup_hi"
+class4[189]="pulse_cnt_setup_lo1"
+class4[190]="pulse_cnt_setup_lo2"
+class4[191]="dig_io_direction"
+class4[195]="dig_in_polarity"
+class4[196]="dig_in_1_func"
+class4[197]="dig_in_2_func"
+class4[198]="dig_in_3_func"
+class4[199]="dig_in_4_func"
+class4[200]="dig_out_1_func"
+class4[201]="dig_out_2_func"
+class4[202]="dig_out_3_func"
+class4[203]="dig_out_4_func"
+class4[204]="dig_out_1_delay"
+class4[205]="dig_out_2_delay"
+class4[206]="dig_out_3_delay"
+class4[207]="dig_out_4_delay"
+class4[208]="ana_in_1_unit"
+class4[209]="ana_in_1_min_hi"
+class4[210]="ana_in_1_min_lo"
+class4[211]="ana_in_1_max_hi"
+class4[212]="ana_in_1_max_lo"
+class4[213]="ana_in_2_unit"
+class4[214]="ana_in_2_min_hi"
+class4[215]="ana_in_2_min_lo"
+class4[216]="ana_in_2_max_hi"
+class4[217]="ana_in_2_max_lo"
+class4[218]="ana_in_3_unit"
+class4[219]="ana_in_3_min_hi"
+class4[220]="ana_in_3_min_lo"
+class4[221]="ana_in_3_max_hi"
+class4[222]="ana_in_3_max_lo"
+class4[223]="ana_in_1_sig_type"
+class4[224]="ana_in_2_sig_type"
+class4[225]="ana_in_3_sig_type"
+class4[226]="ana_in_1_applic"
+class4[227]="ana_in_2_applic"
+class4[228]="ana_in_3_applic"
+class4[229]="ana_in_1_func"
+class4[230]="ana_in_2_func"
+class4[231]="ana_in_3_func"
+class4[232]="temp_in_1_applic"
+class4[233]="temp_in_2_applic"
+class4[234]="temp_in_3_applic"
+class4[236]="temp_in_2_func"
+class4[237]="temp_in_3_func"
+class4[238]="grf_sensor_press_func"
+class4[239]="grf_sensor_temp_func"
+class4[240]="ana_out_parm"
+class4[241]="tp_mode"
+class4[242]="ana_out_sig_type"
+class4[243]="liqtec_temp_func"
+# section: class 5 {{{2
+class5[1  ]="ref_rem"
+class5[2  ]="ref_ir"
+class5[3  ]="sys_fb_rem"
+class5[4  ]="ref_hand"
+class5[5  ]="ref_led_indication"
+class5[27 ]="duty_standby_func_ctr"
+class5[30 ]="alarm_code_sim"
+class5[31 ]="warn_code_sim"
+class5[35 ]="alarm_sim_activate"
+class5[38 ]="set_min_reply_delay"
+class5[39 ]="set_baud_rate"
+class5[40 ]="set_lubric_cnt"
+class5[41 ]="set_bear_change_cnt"
+class5[49 ]="sim_card_status"
+class5[50 ]="signal_level_act"
+class5[51 ]="signal_level_avg"
+class5[55 ]="gsm_state"
+class5[56 ]="cim_heartbeat"
+class5[57 ]="cim_type"
+class5[58 ]="network_heartbeat"
+class5[65 ]="non_master_mode"
+class5[66 ]="mp_master_ref"
+class5[67 ]="mp_master_ref_p1"
+class5[68 ]="mp_master_ref_p2"
+class5[69 ]="mp_master_ref_p3"
+class5[70 ]="mp_master_ref_p4"
+class5[71 ]="mp_master_ref_p5"
+class5[72 ]="mp_master_ref_p6"
+# section: class 7 {{{2
+class7[1  ]="product_name"
+class7[2  ]="project_name"
+class7[3  ]="software_name1"
+class7[4  ]="compile_date"
+class7[5  ]="genipro_ver"
+class7[6  ]="hex_file_prod_no"
+class7[7  ]="developers"
+class7[8  ]="device_prod_no"
+class7[9  ]="serial_no"
+class7[14 ]="software_name2"
+class7[16 ]="data_log_ver"
+class7[17 ]="user_string1"
+class7[18 ]="user_string2"
+class7[19 ]="gsc_file_description"
+class7[20 ]="gsc_file_version"
+class7[21 ]="gsc_file_id"
+class7[50 ]="fe_sw_ver_str"
+class7[51 ]="be_sw_ver_string"
+class7[52 ]="gpds_lib_sw_ver_string"
+class7[53 ]="pdm_sw_ver_string"
+class7[54 ]="pdm_fe_sw_ver_string"
+class7[55 ]="cim_sw_ver_string"
+class7[56 ]="sensor_sw_string"
+class7[70 ]="geniair_node_name_1"
+class7[71 ]="geniair_node_name_2"
+class7[72 ]="geniair_group_name_1"
+class7[73 ]="geniair_group_name_2"
+class7[74 ]="pump_1_name_str_1"
+class7[75 ]="pump_1_name_str_2"
+class7[76 ]="pump_2_name_str_1"
+class7[77 ]="pump_2_name_str_2"
+class7[78 ]="pump_3_name_str_1"
+class7[79 ]="pump_3_name_str_2"
+class7[80 ]="pump_4_name_str_1"
+class7[81 ]="pump_4_name_str_2"
+class7[82 ]="pump_5_name_str_1"
+class7[83 ]="pump_5_name_str_2"
+class7[84 ]="pump_6_name_str_1"
+class7[85 ]="pump_6_name_str_2"
+# section: class 10 {{{2
+class10[0 ]="contents_obj"
+class10[53]="corr_hist_obj"
+class10[55]="event_back_log"
+class10[56]="mge_event_log_obj"
+class10[57]="event_connect_obj"
+class10[71]="geniair_appl_bind_tab"
+class10[72]="geniair_nwk_status_obj"
+class10[73]="twin_pump_data_exch_obj"
+class10[74]="max_power_log_records_obj"
+class10[76]="pump_setup_options_obj"
+class10[77]="multi_pump_sync_obj"
+# section: class 11 {{{2
+class11[0  ]="gpds_eeprom_alarm_cnt"
+class11[1  ]="gpds_inrush_alarm_cnt"
+class11[2  ]="gpds_dpfc_hsd_alarm_cnt"
+class11[3  ]="gpds_u_dc_max_alarm_cnt"
+class11[4  ]="gpds_low_power_alarm_cnt"
+class11[5  ]="gpds_motor_con_alarm_cnt"
+class11[6  ]="gpds_turbine_alarm_cnt"
+class11[7  ]="gpds_derate_max_alarm_cnt"
+class11[8  ]="gpds_blocked_alarm_cnt"
+class11[9  ]="gpds_hsd_in_cl_alarm_cnt"
+class11[10 ]="gpds_lost_rotor_alarm_cnt"
+class11[11 ]="gpds_supply_low_alarm_cnt"
+class11[12 ]="gpds_temp_alarm_cnt"
+class11[14 ]="gpds_adc_mux_alarm_cnt"
+class11[16 ]="gpds_api_fuffer_fault_cnt"
+class11[17 ]="gpds_api_com_fault_cnt"
+class11[18 ]="gpds_api_id_fault_cnt"
+class11[19 ]="gpds_api_obj_fault_cnt"
+class11[20 ]="gpds_api_state_fault_cnt"
+class11[21 ]="gpds_api_version_fault_cnt"
+class11[22 ]="power_24v_fault_cnt"
+class11[23 ]="power_4v75_fault_cnt"
+class11[24 ]="power_5v2_fault_cnt"
+class11[25 ]="grf_sens_nack_fault_cnt"
+class11[26 ]="grf_sens_sum_fault_cnt"
+class11[27 ]="grf_sens_timeout_1_fault_cnt"
+class11[28 ]="grf_sens_timeout_2_fault_cnt"
+class11[29 ]="grf_sens_low_press_fault_cnt"
+class11[30 ]="ana_in_1_16bits"
+class11[31 ]="ana_in_2_16bits"
+class11[32 ]="ana_in_3_16bits"
+class11[33 ]="grf_sensor_press_16bits"
+class11[34 ]="grf_sensor_temp_16bits"
+class11[35 ]="geniair_ping_result"
+class11[36 ]="geniair_signal_quality"
+class11[37 ]="mp_no_of_pumps"
+class11[38 ]="mp_pump_search_status"
+class11[39 ]="mp_search_timeout"
+class11[40 ]="ref_act_16"
+class11[41 ]="ref_loc_16"
+class11[42 ]="ref_norm_16"
+class11[43 ]="ref_ctr_16"
+class11[44 ]="sys_ref_16"
+class11[45 ]="sys_fb_16"
+class11[46 ]="r_max_abs"
+class11[47 ]="r_min_abs"
+class11[50 ]="power_16"
+class11[51 ]="t_w_16"
+class11[52 ]="diff_press_16"
+class11[53 ]="flow_16"
+class11[80 ]="tps_power_16"
+class11[81 ]="tps_ana_in_1_16bits"
+class11[82 ]="tps_ana_in_2_16bits"
+class11[83 ]="tps_ana_in_3_16bits"
+class11[101]="p0_act_mode1"
+class11[102]="p0_contr_source"
+class11[103]="p0_start_cnt_hi"
+class11[104]="p0_start_cnt_lo"
+class11[105]="p0_opr_time_hi"
+class11[106]="p0_opr_time_lo"
+class11[107]="p0_energy_hi"
+class11[108]="p0_energy_lo"
+class11[109]="p0_power"
+class11[110]="p0_i_mo"
+class11[111]="p0_speed"
+class11[112]="p0_speed_pct"
+class11[113]="p0_t_mo"
+class11[114]="p0_alarm_code"
+class11[115]="p0_warn_code"
+class11[121]="p1_act_mode1"
+class11[141]="p2_act_mode1"
+class11[161]="p3_act_mode1"
+class11[181]="p4_act_mode1"
+class11[201]="p5_act_mode1"
+class11[221]="p6_act_mode1"
+# section: class 12 {{{2
+class12[0  ]="ref_inf_setup"
+class12[1  ]="no_of_table_points"
+class12[2  ]="ref_inf_pct_value_1"
+class12[3  ]="ref_inf_pct_value_2"
+class12[4  ]="ref_inf_pct_value_3"
+class12[5  ]="ref_inf_pct_value_4"
+class12[6  ]="ref_inf_pct_value_5"
+class12[7  ]="ref_inf_pct_value_6"
+class12[8  ]="ref_inf_pct_value_7"
+class12[9  ]="ref_inf_pct_value_8"
+class12[10 ]="ref_inf_item_value_1"
+class12[11 ]="ref_inf_item_value_2"
+class12[12 ]="ref_inf_item_value_3"
+class12[13 ]="ref_inf_item_value_4"
+class12[14 ]="ref_inf_item_value_5"
+class12[15 ]="ref_inf_item_value_6"
+class12[16 ]="ref_inf_item_value_7"
+class12[17 ]="ref_inf_item_value_8"
+class12[18 ]="ref_inf_filter_time"
+class12[19 ]="ref_att_mode"
+class12[21 ]="lfs_boost_band_scale"
+class12[22 ]="lfs_t_boost_max"
+class12[23 ]="lfs_t_boost_min"
+class12[24 ]="lfs_tank_volume"
+class12[25 ]="lfs_estim_interval"
+class12[26 ]="lfs_q_lim_opt"
+class12[27 ]="lfs_max_press_drop_opt"
+class12[28 ]="lfs_q_lim_comf"
+class12[29 ]="lfs_max_press_drop_comf"
+class12[30 ]="lfs_q_lim_cust"
+class12[31 ]="lfs_max_press_drop_cust"
+class12[32 ]="lfs_feed_forward_gain"
+class12[33 ]="lfs_settling_time"
+class12[34 ]="lfs_setpoint_band"
+class12[35 ]="lfs_gradient_est_limit"
+class12[36 ]="lfs_hyst_band"
+class12[37 ]="extra_boost"
+class12[38 ]="lfs_flow_test_limit"
+class12[40 ]="dig_in_1_delay"
+class12[41 ]="dig_in_1_dur_tim"
+class12[42 ]="dig_in_1_dur_tim_mode"
+class12[43 ]="dig_in_2_delay"
+class12[44 ]="dig_in_2_dur_tim"
+class12[45 ]="dig_in_2_dur_tim_mode"
+class12[46 ]="dig_in_3_delay"
+class12[47 ]="dig_in_3_dur_tim"
+class12[48 ]="dig_in_3_dur_tim_mode"
+class12[49 ]="dig_in_4_delay"
+class12[50 ]="dig_in_4_dur_tim"
+class12[51 ]="dig_in_4_dur_tim_mode"
+class12[65 ]="relub_interval"
+class12[67 ]="setpoint_reduction_k1"
+class12[68 ]="setpoint_reduction_k2"
+class12[69 ]="pdc_ref_max"
+class12[70 ]="iq_ref_max"
+class12[71 ]="mot_contr_bits"
+class12[72 ]="hi_f6_on"
+class12[73 ]="hi_f6_off"
+class12[74 ]="hi_f12_on"
+class12[75 ]="hi_f12_off"
+class12[76 ]="hi_f24_on"
+class12[77 ]="hi_f24_off"
+class12[78 ]="hi_fx_on"
+class12[79 ]="hi_fx_off"
+class12[80 ]="hi_amp6_g"
+class12[81 ]="hi_amp6_o"
+class12[82 ]="hi_amp12"
+class12[83 ]="hi_amp24"
+class12[84 ]="hi_ampx"
+class12[85 ]="hi_ang6_g"
+class12[86 ]="hi_ang6_o"
+class12[87 ]="hi_ang12"
+class12[88 ]="hi_ang24"
+class12[89 ]="hi_angx"
+class12[90 ]="hi_hx"
+class12[171]="inlet_diameter"
+class12[172]="outlet_diameter"
+class12[173]="in_out_hight_diff"
+class12[175]="bearing_temp_nom"
+class12[176]="bearing_speed_nom"
+class12[180]="disp_misch_setup"
+class12[181]="disp_language"
+class12[183]="disp_quant_setup_1"
+class12[184]="disp_quant_setup_2"
+class12[185]="disp_quant_setup_3"
+class12[186]="disp_home_screen_parm_1"
+class12[187]="disp_home_screen_parm_2"
+class12[188]="disp_home_screen_parm_3"
+class12[189]="disp_home_screen_parm_4"
+class12[190]="spb_setup"
+class12[191]="spb_ol_max_pump_speed"
+class12[192]="spb_speed_ctr_pumps"
+class12[193]="spb_ramp"
+class12[194]="spb_ol_press_timeout"
+class12[195]="spb_release_press"
+class12[197]="t_fc_max"
+class12[198]="t_fc_max_hys"
+class12[201]="q_max_limit"
+class12[202]="local_ref_setup"
+class12[203]="q_max_limit_upper"
+class12[205]="limit_exc_1_limit"
+class12[206]="limit_exc_2_limit"
+class12[207]="limit_exc_1_reset_hyst"
+class12[208]="limit_exc_2_reset_hyst"
+class12[209]="limit_exc_1_detect_del"
+class12[210]="limit_exc_2_detect_del"
+class12[211]="limit_exc_1_reset_del"
+class12[212]="limit_exc_2_reset_del"
+class12[214]="pump_stop_speed"
+class12[215]="pump_start_speed"
+class12[216]="pump_stop_delay"
+class12[217]="ramp_up_time"
+class12[218]="ramp_down_time"
+class12[219]="cas_ctr_cut_out_hys"
+class12[220]="max_cut_in_delay"
+class12[221]="max_cut_in_delay_dev"
+class12[222]="calc_cut_in_speed_offset"
+class12[223]="pump_switch_off_period"
+class12[224]="cas_ctr_pid_preset_time"
+class12[225]="cas_ctr_cut_in_speed_2"
+class12[226]="cas_ctr_cut_out_speed_1"
+class12[227]="cas_ctr_min_speed"
+class12[228]="cas_ctr_min_no_of_pumps"
+class12[229]="cas_ctr_protect_ramp"
+class12[230]="cut_in_first_e_pump"
+class12[231]="max_starts_per_hour"
+class12[232]="pump_min_switch_delay"
+class12[233]="p1_prio"
+class12[234]="p2_prio"
+class12[235]="p3_prio"
+class12[236]="p4_prio"
+class12[237]="p5_prio"
+class12[238]="p6_prio"
+class12[239]="standby_pumps"
+class12[240]="time_based_alter"
+class12[241]="energy_based_alter"
+class12[242]="f_lower_16"
+class12[243]="f_upper_16"
+class12[244]="f_nom_16"
+# section: class 13 {{{2
+class13[1]="ref_rem_16"
+class13[2]="ref_ir_16"
+# section: class 14 {{{2
+class14[0  ]="geniair_trans_cnt"
+class14[1  ]="geniair_rec_cnt"
+class14[2  ]="geniair_trans_and_ack_cnt"
+class14[3  ]="geni_profile_version"
+class14[6  ]="disp_event_ctr"
+class14[9  ]="power_on_time"
+class14[10 ]="alarm_log_1_app_time"
+class14[11 ]="alarm_log_2_app_time"
+class14[12 ]="alarm_log_3_app_time"
+class14[13 ]="alarm_log_4_app_time"
+class14[14 ]="alarm_log_5_app_time"
+class14[15 ]="warn_log_1_app_time"
+class14[16 ]="warn_log_2_app_time"
+class14[17 ]="warn_log_3_app_time"
+class14[18 ]="warn_log_4_app_time"
+class14[19 ]="warn_log_5_app_time"
+class14[20 ]="alarm_log_1_dis_time"
+class14[21 ]="alarm_log_2_dis_time"
+class14[22 ]="alarm_log_3_dis_time"
+class14[23 ]="alarm_log_4_dis_time"
+class14[24 ]="alarm_log_5_dis_time"
+class14[25 ]="warn_log_1_dis_time"
+class14[26 ]="warn_log_2_dis_time"
+class14[27 ]="warn_log_3_dis_time"
+class14[28 ]="warn_log_4_dis_time"
+class14[29 ]="warn_log_5_dis_time"
+class14[30 ]="unix_rtc"
+class14[31 ]="volume_cnt1"
+class14[32 ]="volume_cnt1_year"
+class14[33 ]="heat_energy_cnt1"
+class14[34 ]="heat_energy_cnt1_year"
+class14[35 ]="heat_power"
+class14[36 ]="heat_temp_diff"
+class14[37 ]="power_32"
+class14[38 ]="energy_32"
+class14[40 ]="opr_time"
+class14[41 ]="mp_power"
+class14[42 ]="mp_energy"
+class14[43 ]="mp_pressure"
+class14[44 ]="mp_flow"
+class14[45 ]="mp_speed"
+class14[46 ]="mp_speed_pct"
+class14[47 ]="mp_media_temp"
+class14[51 ]="volume_cnt2"
+class14[52 ]="volume_cnt2_year"
+class14[53 ]="heat_energy_cnt2"
+class14[54 ]="heat_energy_cnt2_year"
+class14[55 ]="last_time_stamp_cnt1"
+class14[56 ]="last_time_stamp_cnt2"
+class14[57 ]="counter_status"
+class14[60 ]="flow_below_range_cnt"
+class14[61 ]="flow_above_range_cnt"
+class14[80 ]="tps_head"
+class14[81 ]="tps_flow"
+class14[82 ]="tps_energy"
+class14[83 ]="tps_speed"
+class14[84 ]="tau_est"
+class14[85 ]="dp_est"
+class14[86 ]="p_shaft"
+class14[87 ]="pm_loss"
+class14[88 ]="q_est"
+class14[89 ]="i_mo_32"
+class14[238]="sector_1_writes"
+class14[239]="sector_2_writes"
+class14[240]="sector_3_writes"
+class14[241]="sector_4_writes"
+class14[242]="sector_5_writes"
+class14[243]="sector_6_writes"
+class14[244]="sector_7_writes"
+class14[245]="sector_8_writes"
+class14[246]="sector_1_account"
+class14[247]="sector_2_account"
+class14[248]="sector_3_account"
+class14[249]="sector_4_account"
+class14[250]="sector_5_account"
+class14[251]="sector_6_account"
+class14[252]="sector_7_account"
+class14[253]="sector_8_account"
+class14[254]="persistence_lock"
+class14[255]="persistence_lock_cnt"
+# section: class 15 {{{2
+class15[0  ]="flow_est_coeff_g0"
+class15[1  ]="flow_est_coeff_g1"
+class15[2  ]="flow_est_coeff_g2"
+class15[3  ]="flow_est_coeff_g3"
+class15[4  ]="flow_est_coeff_g4"
+class15[5  ]="flow_est_coeff_g5"
+class15[6  ]="flow_est_coeff_kp"
+class15[7  ]="flow_est_coeff_kh"
+class15[8  ]="flow_est_coeff_k0"
+class15[9  ]="flow_est_q_min"
+class15[15 ]="control_mode_mask"
+class15[20 ]="geniair_mac_addr_hi"
+class15[21 ]="geniair_mac_addr_lo"
+class15[22 ]="geniair_pan_id_nwk_addr"
+class15[23 ]="geniair_nwk_key_hi"
+class15[24 ]="geniair_nwk_key_lo1"
+class15[25 ]="geniair_nwk_key_lo2"
+class15[26 ]="geniair_nwk_key_lo3"
+class15[27 ]="geniair_mode_and_mask"
+class15[28 ]="geniair_radio_ed"
+class15[29 ]="pulse_cnt_setup"
+class15[40 ]="a0m"
+class15[41 ]="a1m"
+class15[42 ]="a2m"
+class15[43 ]="a3m"
+class15[44 ]="a4m"
+class15[45 ]="a5m"
+class15[46 ]="a6m"
+class15[47 ]="k1"
+class15[48 ]="aqdp0m"
+class15[49 ]="aqdp1m"
+class15[50 ]="aqdp2m"
+class15[51 ]="aqdp3m"
+class15[52 ]="aqdp4m"
+class15[53 ]="aqdp5m"
+class15[54 ]="aqdp6m"
+class15[55 ]="aqdp7m"
+class15[56 ]="at0m"
+class15[57 ]="at1m"
+class15[58 ]="at2m"
+class15[59 ]="at3m"
+class15[60 ]="at4m"
+class15[61 ]="at5m"
+class15[62 ]="at6m"
+class15[63 ]="at7m"
+class15[64 ]="at8m"
+class15[65 ]="scale1_a"
+class15[66 ]="scale1_b"
+class15[67 ]="scale2_a"
+class15[68 ]="scale2_b"
+class15[69 ]="scale_max"
+class15[70 ]="scale_min"
+class15[71 ]="aqh0"
+class15[72 ]="aqh1"
+class15[73 ]="aqh2"
+class15[74 ]="aqh3"
+class15[75 ]="aqh4"
+class15[76 ]="aqh5"
+class15[77 ]="dp_scale"
+class15[78 ]="t_scale"
+class15[79 ]="max_curve_qh_0"
+class15[80 ]="max_curve_qh_1"
+class15[81 ]="max_curve_qh_2"
+class15[82 ]="qp_max_curve_0"
+class15[83 ]="qp_max_curve_1"
+class15[84 ]="qp_max_curve_2"
+class15[85 ]="qp_max_curve_3"
+class15[86 ]="qp_max_curve_4"
+class15[87 ]="qp_max_curve_5"
+class15[88 ]="qh_max_curve_0"
+class15[89 ]="qh_max_curve_1"
+class15[90 ]="qh_max_curve_2"
+class15[91 ]="qh_max_curve_3"
+class15[92 ]="qh_max_curve_4"
+class15[93 ]="qh_max_curve_5"
+class15[94 ]="flow_limit_kp"
+class15[95 ]="flow_limit_ti"
+class15[96 ]="pressure_limit_kp"
+class15[97 ]="pressure_limit_ti"
+class15[98 ]="kq_max"
+class15[99 ]="kq_min"
+class15[100]="pwm_1"
+class15[101]="pwm_2"
+class15[102]="n_alpha"
+class15[103]="pp_filter_const"
+class15[104]="h_max_est"
+class15[105]="tp_test_run_time"
+class15[106]="tp_switch_time"
+class15[107]="tp_switch_interval"
+class15[108]="a1"
+class15[109]="a2"
+class15[110]="b1"
+class15[111]="b2"
+class15[112]="q_const_ref_min"
+class15[113]="q_const_ref_max"
+class15[114]="t_const_ref_min"
+class15[115]="t_const_ref_max"
+class15[116]="level_const_ref_min"
+class15[117]="level_const_ref_max"
+class15[118]="p_max_32"
+class15[120]="kq_max2"
+# section: class 16 {{{2
+class16[0]="set_unix_rtc"
+class16[1]="disp_event_ctr_ack"
+class16[2]="disp_data_to_applic"
diff --git a/work/gf/gf.py b/work/gf/gf.py
deleted file mode 100644 (file)
index 8e82404..0000000
+++ /dev/null
@@ -1,452 +0,0 @@
-#!/usr/bin/env python3
-
-# section: environment {{{1
-#########
-############################################
-import gf_config as gf
-import serial
-from serial.tools import list_ports
-import fileinput
-import matplotlib.pyplot as plt
-import datetime
-import time
-#import ctype
-#import logging
-
-# section: debugging {{{1
-######################################################
-
-# global variable
-cl=0
-td=[]
-master=[]
-speed=[]
-speed.append([])
-speed.append([])
-speed.append([])
-speed.append([])
-
-def dbg_speed(ids5,val5,ts,sa):
-  global td
-  global master
-  global speed
-  td=td+[ts.timestamp()]
-  master=master+[1+(sa-31)/10]
-  for i in range(len(ids5)):
-    if ids5[i] in range(67,71):
-      speed[ids5[i]-67]=speed[ids5[i]-67]+[val5[i]/254]
-  return td,master,speed
-
-# section: serial_ports {{{1
-######################################################
-def serial_ports():
-  ports=list(list_ports.comports())
-  # return the port if FTDI vendor
-  result=[]
-  print("Available ports:")
-  for p in ports:
-    print(repr(p.device),repr(p.description))
-    if p.vid==0x403: # FTDI vendor
-      try:
-        s = serial.Serial(p.device)
-        s.close()
-        result.append(p)
-      except (OSError, serial.SerialException):
-        pass
-  return result
-
-# section: serial_open {{{1
-######################################################
-def serial_open( vid, pid ):
-#vid=0x403
-#pid=0x6001
-#pid=0x6015
-  ctx = usb1.USBContext()
-  logging.basicConfig(level=logging.DEBUG)
-
-  for device in ctx.getDeviceList(skip_on_error=True):
-    print(device)
-    if device.getVendorID() == vid and device.getProductID() == pid:
-      device = device
-      break
-  else:
-    raise Exception( "ERROR: USB device %04x:%04x not found." % (vid, pid))
-
-  logging.info( "Found device : ID %04x:%04x -> %s Address %d" % (device.getVendorID(), device.getProductID(), '->'.join(str(x) for x in ['Bus %03i' % (device.getBusNumber(), )] + device.getPortNumberList()), device.getDeviceAddress() ))
-
-  handle = device.open()
-  print(handle)
-  logging.info( "Device opened, got handle" )
-
-  endpoint = 0x85
-  length   = 65536
-  timeout  = 100      # ms
-  print("enter loop")
-  while True:
-    print("reading")
-    data = handle.bulkRead ( endpoint, length, timeout )
-    # do something with data
-
-# section: checkcrc {{{1
-######################################################
-def checkcrc(line):
-  ok=False
-  if len(line)>16 and not "ERR" in line.upper():
-    ok=True
-#  print("Ok:",ok)
-  return ok
-
-# section: checkglowpan {{{1
-######################################################
-def checkglowpan(line):
-  isgenidata=False
-  line=line[32:]
-  #print(repr(line))
-  mac_hi,line=readbyte(line)
-  mac_lo,line=readbyte(line)
-  #print(mac_hi,mac_lo)
-  #print(repr(line))
-  if mac_hi==8 and mac_lo==4:
-    isgenidata=True
-    #print(repr(line))
-  #print(isgenidata)
-  return isgenidata,line
-# section: readtimestamp {{{1
-######################################################
-def readtimestamp(line):
-  info=line.split(":")
-  try:
-    timestamp=int(info[1].strip())/1000
-  except:
-    timestamp=0
-  finally:
-    ts=datetime.fromtimestamp(timestamp)
-
-  if timestamp>1e9: # 2001-09-09
-    line=info[0]
-  else:
-    try:
-      h=int(info[0][-2:])
-      m=int(info[1])
-      s=int(info[2][:2])
-      u=int(info[2][3:6])*1000
-      ts=datetime.combine(date.today(),time(h,m,s,u))
-      line=''.join(line.split(":")[2:])[7:]
-    except:
-      pass
-  print(ts)
-  return ts,line
-
-
-# section: readbyte {{{1
-######################################################
-def readbyte(line):
-  byte=-1
-  line=line.strip()
-  while byte==-1 and len(line)>0:
-    try:
-      byte=int(line[0:2],16)
-      line=line[1:]
-    except:
-      pass
-    finally:
-      line=line[2:]
-  return byte,line
-
-# section: process_header {{{1
-######################################################
-def process_header(line):
-
-#  print(repr(line))
-
-  sd,line=readbyte(line)
-  if sd==gf.DATA_REQUEST:
-    typ="DATA_REQUEST --->"
-  elif sd==gf.DATA_MESSAGE:
-    typ="DATA_MESSAGE --->"
-  elif sd==gf.DATA_REPLY:
-    typ="<--- DATA_REPLY"
-  else:
-    typ="**** DATA_ERROR ****"
-    print("Data Type:",typ,"Start Delimiter:",sd)
-    return typ,sd,0,0,0,line
-  le,line=readbyte(line)
-  da,line=readbyte(line)
-  sa,line=readbyte(line)
-  if sd==gf.DATA_REQUEST and da==gf.DA_BROADCAST_CONNECT:
-    typ="CONNECTION_REQUEST ===>"
-  if sd==gf.DATA_REQUEST and da==gf.DA_BROADCAST_REQUEST:
-    typ="DATA_REQUEST  ===>"
-  if sd==gf.DATA_MESSAGE and da==gf.DA_BROADCAST_MESSAGE:
-    typ="DATA_MESSAGE  ===>"
-  print(typ)
-  print("Length:",le,"Destination Addr:",da,"Source Addr:",sa)
-  return typ,sd,le,da,sa,line
-
-# section: process_apdu {{{1
-######################################################
-def process_apdu(line):
-  cl,line=readbyte(line)
-  cl=cl&0x1F
-  le,line=readbyte(line)
-  os=(le&0xC0)>>6
-  le=le&0x3F
-  print(gf.operation[os],"Cl.",cl,"Len.",le)
-#  print(gf.operation[os],"Cl. {02}",cl)
-  return cl,os,le,line
-
-# section: process_data {{{1
-######################################################
-def process_data(line,le,size1,size2):
-  num=int(le/(size1+size2))
-  ids=[0]*num
-  val=[0]*num
-  for i in range(0,num):
-    if size1>0:
-      ids[i],line=readbyte(line)
-    for j in range(0,size2):
-      tmp,line=readbyte(line)
-      val[i]=(val[i]<<8)+tmp
-    if size1>0 and size2>0:
-      print("Id:",ids[i],repr(gf.params[cl][ids[i]]),"=",val[i])
-    elif size1>0:
-      print("Id:",ids[i],repr(gf.params[cl][ids[i]]))
-    elif size2>0:
-      print("=",val[i])
-  return ids,val,line
-
-# section: process_string {{{1
-######################################################
-def process_string(line,le,size1,size2):
-  ids=[0]*size1
-  val=[0]*size2
-  if size1>0:
-    ids,line=readbyte(line)
-  for i in range(0,size2):
-    val[i],line=readbyte(line)
-  string=''.join(chr(i) for i in val)
-  string=string[:-1]
-  if size1>0 and size2>0:
-    print("Id:",ids,repr(gf.params[cl][ids]),"=",repr(string))
-  elif size1>0:
-    print("Id:",ids,repr(gf.params[cl][ids]))
-  elif size2>0:
-    print("=",repr(string))
-  return ids,val,line
-
-# section: process_object {{{1
-######################################################
-def process_object(line,le,size1,size2):
-  ids=[0]*size1
-  val=[0]*size2
-  if size1>0:
-    ids,line=readbyte(line)
-  for i in range(0,size2):
-    val[i],line=readbyte(line)
-
-  if size1>0 and size2>0:
-    print("Id:",ids,repr(gf.params[cl][ids]),"=",val)
-  elif size1>0:
-    print("Id:",ids,repr(gf.params[cl][ids]))
-  elif size2>0:
-    print("=",val)
-  return ids,val,line
-
-# section: process_crc {{{1
-######################################################
-def process_crc(line):
-  crc1,line=readbyte(line)
-  crc2,line=readbyte(line)
-  crc1=format(crc1,'02X')
-  crc2=format(crc2,'02X')
-  crc=crc1+' '+crc2
-#  print("CRC:",crc)
-  return crc
-
-# section: process_telegram {{{1
-######################################################
-def process_telegram(line):
-  # section: headers {{{2
-  global cl
-  # Check if timestamp exists
-  ts,line=readtimestamp(line)
-  # Filter non geni data if glowpan frame
-  isgenidata,line=checkglowpan(line)
-  if not isgenidata: return
-  # Check if line is ok
-  iscrcok=checkcrc(line)
-  if not iscrcok: return
-  # Process geni data
-  typ,ds,le,da,sa,line=process_header(line)
-  numbytes=le-2
-  while numbytes>0 and len(line)>=2*numbytes:
-    print("--------------------------------------------------------------------")
-    cl,os,ale,line=process_apdu(line)
-    numbytes=numbytes-2-ale
-    # section: classes {{{2
-    if cl==2 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids2,val2,line=process_data(line,ale,1,0)
-    elif cl==2 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids2,val2,line=process_data(line,ale,0,1)
-    elif cl==2 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids2,val2,line=process_data(line,ale,1,0)
-    elif cl==2 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids2,val2,line=process_data(line,ale,0,4)
-    elif cl==3 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids3,val3,line=process_data(line,ale,1,0)
-    elif cl==3 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids3,val3,line=process_data(line,ale,1,0)
-    elif cl==3 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids3,val3,line=process_data(line,ale,0,4)
-    elif cl==4 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids4,val4,line=process_data(line,ale,1,0)
-    elif cl==4 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids4,val4,line=process_data(line,ale,0,1)
-    elif cl==4 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids4,val4,line=process_data(line,ale,1,1)
-    elif cl==4 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids4,val4,line=process_data(line,ale,1,0)
-    elif cl==4 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids4,val4,line=process_data(line,ale,0,4)
-    elif cl==5 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids5,val5,line=process_data(line,ale,1,0)
-    elif cl==5 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids5,val5,line=process_data(line,ale,0,1)
-    elif cl==5 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids5,val5,line=process_data(line,ale,1,1)
-    elif cl==5 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids5,val5,line=process_data(line,ale,1,0)
-    elif cl==5 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids5,val5,line=process_data(line,ale,0,4)
-    elif cl==7 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids7,val7,line=process_string(line,ale,1,0)
-    elif cl==7 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids7,val7,line=process_string(line,ale,0,ale)
-    elif cl==7 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids7,val7,line=process_string(line,ale,1,ale-1)
-    elif cl==10 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids10,val10,line=process_object(line,ale,1,0)
-    elif cl==10 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids10,val10,line=process_object(line,ale,0,ale)
-    elif cl==10 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids10,val10,line=process_object(line,ale,1,ale-1)
-    elif cl==11 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids11,val11,line=process_data(line,ale,1,0)
-    elif cl==11 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids11,val11,line=process_data(line,ale,0,2)
-    elif cl==11 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids11,val11,line=process_data(line,ale,1,2)
-    elif cl==11 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids11,val11,line=process_data(line,ale,1,0)
-    elif cl==11 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids11,val11,line=process_data(line,ale,0,4)
-    elif cl==12 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids12,val12,line=process_data(line,ale,1,0)
-    elif cl==12 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids12,val12,line=process_data(line,ale,0,2)
-    elif cl==12 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids12,val12,line=process_data(line,ale,1,2)
-    elif cl==12 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids12,val12,line=process_data(line,ale,1,0)
-    elif cl==12 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids12,val12,line=process_data(line,ale,0,4)
-    elif cl==13 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids13,val13,line=process_data(line,ale,1,0)
-    elif cl==13 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids13,val13,line=process_data(line,ale,0,2)
-    elif cl==13 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids13,val13,line=process_data(line,ale,1,2)
-    elif cl==13 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids13,val13,line=process_data(line,ale,1,0)
-    elif cl==13 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids13,val13,line=process_data(line,ale,0,4)
-    elif cl==14 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids14,val14,line=process_data(line,ale,1,0)
-    elif cl==14 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids14,val14,line=process_data(line,ale,0,3)
-    elif cl==14 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids14,val14,line=process_data(line,ale,1,3)
-    elif cl==14 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids14,val14,line=process_data(line,ale,1,0)
-    elif cl==14 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids14,val14,line=process_data(line,ale,0,4)
-    elif cl==15 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids15,val15,line=process_data(line,ale,1,0)
-    elif cl==15 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids15,val15,line=process_data(line,ale,0,3)
-    elif cl==15 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids15,val15,line=process_data(line,ale,1,3)
-    elif cl==15 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids15,val15,line=process_data(line,ale,1,0)
-    elif cl==15 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids15,val15,line=process_data(line,ale,0,4)
-    elif cl==16 and ds==gf.DATA_REQUEST and os==gf.OS_GET:
-      ids16,val16,line=process_data(line,ale,1,0)
-    elif cl==16 and ds==gf.DATA_REPLY and os==gf.OS_GET:
-      ids16,val16,line=process_data(line,ale,0,3)
-    elif cl==16 and (ds==gf.DATA_REQUEST or ds==gf.DATA_MESSAGE) and os==gf.OS_SET:
-      ids16,val16,line=process_data(line,ale,1,3)
-    elif cl==16 and ds==gf.DATA_REQUEST and os==gf.OS_INFO:
-      ids16,val16,line=process_data(line,ale,1,0)
-    elif cl==16 and ds==gf.DATA_REPLY and os==gf.OS_INFO:
-      ids16,val16,line=process_data(line,ale,0,4)
-    else:
-      line=line[ale*3:]
-# section: filtering {{{2
-    if cl==5:
-      td,master,speed=dbg_speed(ids5,val5,ts,sa)
-  crc=process_crc(line)
-  return
-
-# section: main {{{1
-######################################################
-# section: serial {{{2
-lsser=serial_ports()
-ser=serial.Serial()
-ser.port=lsser[0].device
-ser.baudrate=9600
-ser.parity=serial.PARITY_NONE
-ser.stopbits=serial.STOPBITS_ONE
-ser.bytesize=serial.EIGHTBITS
-ser.timeout=40 # msec
-ser.open()
-print("Connected to",repr(ser.portstr))
-
-while True:
-  print("====================================================================")
-  line=ser.readline()
-  print(line)
-  process_telegram(line)
-ser.close()
-
-
-
-#for line in fileinput.input():
-#  print("====================================================================")
-##  print(line)
-#  process_telegram(line)
-#
-
-
-# section: plot {{{2
-######################################################
-
-# Calculate timedelta
-if len(td)==0: exit()
-t0=td[0]
-td[:]=[x-t0 for x in td]
-
-# Make a plot
-fig=plt.figure()
-plt.xlabel('time/s')
-plt.ylabel('speed/upper')
-plt.plot(td,speed[0],'green')
-plt.plot(td,speed[1],'red')
-plt.plot(td,speed[2],'blue')
-plt.plot(td,speed[3],'magenta')
-plt.legend('1234')
-plt.plot(td,master,'black')
-plt.title('multipump')
-plt.show()
-plt.close(fig)
-
diff --git a/work/gf/gf_config.py b/work/gf/gf_config.py
deleted file mode 100644 (file)
index 6dcd853..0000000
+++ /dev/null
@@ -1,1038 +0,0 @@
-# config file for gf.py script
-
-# section: constants {{{1
-
-DATA_REQUEST=0x27
-DATA_MESSAGE=0x26
-DATA_REPLY=0x24
-
-DA_BROADCAST_CONNECT=0xFE
-DA_BROADCAST_REQUEST=0xFF
-DA_BROADCAST_MESSAGE=0xF7
-
-OS_GET=0
-OS_SET=2
-OS_INFO=3
-operation=[""]*4
-operation[OS_GET]="GET"
-operation[OS_SET]="SET"
-operation[OS_INFO]="INFO"
-
-ACK_OK=0
-ACK_CL_UNKNOWN=1
-ACK_ID_UNKNOWN=2
-ACK_OP_UNKNOWN=3
-ack=[""]*4
-ack[ACK_OK]="ACK_OK"
-ack[ACK_CL_UNKNOWN]="ACK_CLASS_UNKNOWN"
-ack[ACK_ID_UNKNOWN]="ACK_ID_UNKNOWN"
-ack[ACK_OP_UNKNOWN]="ACK_OPERATION_UNKNOWN"
-
-class0=[""]*4
-class1=[]
-class2=[""]*256
-class3=[""]*256
-class4=[""]*256
-class5=[""]*256
-class6=[]
-class7=[""]*256
-class8=[]
-class9=[]
-class10=[""]*256
-class11=[""]*256
-class12=[""]*256
-class13=[""]*3
-class14=[""]*256
-class15=[""]*256
-class16=[""]*3
-
-params=[]
-params.append(class0)
-params.append(class1)
-params.append(class2)
-params.append(class3)
-params.append(class4)
-params.append(class5)
-params.append(class6)
-params.append(class7)
-params.append(class8)
-params.append(class9)
-params.append(class10)
-params.append(class11)
-params.append(class12)
-params.append(class13)
-params.append(class14)
-params.append(class15)
-params.append(class16)
-
-# section: class 2 {{{2
-class2[18 ]="outlet_diff"
-class2[19 ]="h_remote_diff"
-class2[20 ]="t_remote_diff"
-class2[21 ]="h_storage_tank"
-class2[22 ]="temp_att"
-class2[23 ]="h_diff"
-class2[24 ]="t_2hour_hi"
-class2[25 ]="t_2hour_lo"
-class2[26 ]="i_dc"
-class2[27 ]="v_dc"
-class2[28 ]="t_e"
-class2[30 ]="i_mo"
-class2[31 ]="h_outlet"
-class2[32 ]="f_act"
-class2[33 ]="p_hi"
-class2[34 ]="p_lo"
-class2[35 ]="speed_hi"
-class2[36 ]="speed_lo"
-class2[37 ]="h"
-class2[38 ]="h_inlet"
-class2[39 ]="q"
-class2[40 ]="ref_loc"
-class2[41 ]="p_max"
-class2[42 ]="q_kn1"
-class2[43 ]="q_max"
-class2[44 ]="h_max"
-class2[45 ]="torque_hi"
-class2[46 ]="torque_lo"
-class2[47 ]="led_contr"
-class2[48 ]="ref_act"
-class2[49 ]="ref_norm"
-class2[50 ]="q_remote"
-class2[51 ]="v_mo"
-class2[52 ]="v_line"
-class2[53 ]="h_remote_1"
-class2[54 ]="h_feed_tank"
-class2[55 ]="ref_inf"
-class2[56 ]="p2_hi"
-class2[57 ]="p2_lo"
-class2[58 ]="t_w"
-class2[59 ]="t_ambient"
-class2[60 ]="sys_fb"
-class2[61 ]="ref_att"
-class2[62 ]="sys_ref"
-class2[63 ]="t_remote_1"
-class2[64 ]="start_alarm1"
-class2[66 ]="qsd_alarm1"
-class2[68 ]="stop_alarm1"
-class2[73 ]="h_remote_2"
-class2[74 ]="ref_ctr"
-class2[75 ]="f_pid"
-class2[76 ]="r_min"
-class2[77 ]="r_max"
-class2[78 ]="f_mo"
-class2[79 ]="ref_map"
-class2[80 ]="f_cl"
-class2[81 ]="act_mode1"
-class2[82 ]="act_mode2"
-class2[83 ]="act_mode3"
-class2[84 ]="act_mode4"
-class2[85 ]="loc_setup1"
-class2[86 ]="t_remote_2"
-class2[87 ]="rem_setup1"
-class2[88 ]="prop_press_infl"
-class2[89 ]="dig_in_ctr_sig"
-class2[90 ]="contr_source"
-class2[91 ]="pump_at_limit"
-class2[92 ]="aux_sensor"
-class2[94 ]="dyn_drive_state1"
-class2[95 ]="drive_modes1"
-class2[96 ]="q_low_flow_ind"
-class2[97 ]="curve_no_ref"
-class2[98 ]="dyn_drive_state2"
-class2[99 ]="lfs_state"
-class2[100]="liqtec_dryrun_status"
-class2[101]="lfs_est_time"
-class2[102]="t_2hour_on_hi"
-class2[103]="t_2hour_on_lo"
-class2[105]="load_pct"
-class2[106]="power_up_cnt_hi"
-class2[107]="power_up_cnt_lo1"
-class2[108]="power_up_cnt_lo2"
-class2[109]="lubric_cnt"
-class2[110]="bear_change_cnt"
-class2[111]="time_to_bear_service"
-class2[112]="control_mode"
-class2[113]="ana_in_1"
-class2[114]="ana_in_2"
-class2[115]="ana_in_3"
-class2[116]="temp_in_1"
-class2[117]="temp_in_2"
-class2[119]="t_bear_de"
-class2[120]="t_bear_nde"
-class2[121]="volume_hi"
-class2[122]="volume_lo1"
-class2[123]="volume_lo2"
-class2[124]="volume_lo3"
-class2[125]="spec_energy_hi"
-class2[126]="spec_energy_lo"
-class2[127]="grf_sensor_press"
-class2[128]="grf_sensor_temp"
-class2[129]="liqtec_temp"
-class2[148]="unit_family"
-class2[149]="unit_type"
-class2[150]="unit_version"
-class2[151]="energy_hi"
-class2[152]="energy_lo1"
-class2[153]="energy_lo2"
-class2[154]="alarm_code_pump"
-class2[155]="alarm_code_disp"
-class2[156]="warn_code"
-class2[157]="warn_code_disp"
-class2[158]="alarm_code"
-class2[159]="warn_bits1"
-class2[160]="warn_bits2"
-class2[161]="warn_bits3"
-class2[162]="warn_bits4"
-class2[163]="alarm_log_1"
-class2[164]="alarm_log_2"
-class2[165]="alarm_log_3"
-class2[166]="alarm_log_4"
-class2[167]="alarm_log_5"
-class2[168]="alarm_log_1_disp"
-class2[169]="alarm_log_2_disp"
-class2[170]="alarm_log_3_disp"
-class2[171]="alarm_log_4_disp"
-class2[172]="alarm_log_5_disp"
-class2[173]="warn_log_1"
-class2[174]="warn_log_2"
-class2[175]="warn_log_3"
-class2[176]="warn_log_4"
-class2[177]="warn_log_5"
-class2[178]="warn_log_1_disp"
-class2[179]="warn_log_2_disp"
-class2[180]="warn_log_3_disp"
-class2[181]="warn_log_4_disp"
-class2[182]="warn_log_5_disp"
-class2[183]="alarm_log_change_cnt"
-class2[184]="pumps_present"
-class2[185]="pumps_running"
-class2[186]="pumps_fault"
-class2[187]="pumps_com_fault"
-class2[188]="pumps_fb_sensor"
-class2[189]="fb_sensor_status"
-class2[190]="up_down_button"
-class2[191]="off_button"
-class2[192]="add_on_actual"
-class2[193]="r100_menu_setup1_act"
-class2[194]="dig_out"
-class2[195]="dig_in"
-class2[196]="ana_out"
-class2[197]="i_mo_max"
-class2[199]="t_mo"
-class2[200]="t_w_3d"
-class2[201]="q_3d"
-class2[202]="h_3d"
-class2[203]="p_3d"
-class2[207]="functional_module"
-class2[208]="hmi_module"
-class2[209]="power_board"
-class2[220]="tps_i_mo"
-class2[221]="tps_t_2hour_hi"
-class2[222]="tps_t_2hour_lo"
-class2[223]="tps_t_w"
-class2[224]="tps_start_cnt_hi"
-class2[225]="tps_start_cnt_lo1"
-class2[226]="tps_start_cnt_lo2"
-class2[227]="tps_act_mode1"
-class2[228]="tps_act_mode3"
-class2[229]="tps_contr_source"
-class2[230]="tps_dig_in"
-class2[231]="tps_alarm_code"
-class2[234]="soft_press_status"
-class2[235]="varistor_wear_out"
-class2[236]="glowpan_radio_status"
-class2[237]="dyn_info_change_cnt"
-class2[238]="actual_pwm_type"
-# section: class 3 {{{2
-class3[1  ]="reset"
-class3[2  ]="reset_alarm"
-class3[3  ]="factory_boot"
-class3[4  ]="user_boot"
-class3[5  ]="stop"
-class3[6  ]="start"
-class3[7  ]="remote"
-class3[8  ]="local"
-class3[15 ]="forward"
-class3[16 ]="reverse"
-class3[20 ]="test"
-class3[22 ]="const_freq"
-class3[23 ]="prop_press"
-class3[24 ]="const_press"
-class3[25 ]="min"
-class3[26 ]="max"
-class3[30 ]="lock_keys"
-class3[31 ]="unlock_keys"
-class3[33 ]="ref_up"
-class3[34 ]="ref_down"
-class3[36 ]="reset_hist"
-class3[40 ]="mp_master"
-class3[41 ]="auto_restart_e"
-class3[42 ]="auto_restart_d"
-class3[47 ]="mcp_stop"
-class3[48 ]="mcp_derate"
-class3[49 ]="low_flow_stop_e"
-class3[50 ]="low_flow_stop_d"
-class3[51 ]="reset_alarm_log"
-class3[52 ]="auto_adapt"
-class3[59 ]="duty_standby_e"
-class3[61 ]="const_temp"
-class3[62 ]="cl_sensor_contr"
-class3[63 ]="const_flow"
-class3[64 ]="const_level"
-class3[65 ]="flow_adapt"
-class3[66 ]="night_reduct_e"
-class3[67 ]="night_reduct_d"
-class3[68 ]="forced_local"
-class3[69 ]="release_forced_local"
-class3[75 ]="hand"
-class3[76 ]="ds_ref_up"
-class3[77 ]="reset_auto_adapt"
-class3[79 ]="relay_1_open"
-class3[80 ]="relay_1_close"
-class3[81 ]="relay_3_open"
-class3[82 ]="relay_3_close"
-class3[83 ]="relay_4_open"
-class3[84 ]="relay_4_close"
-class3[86 ]="reset_start_cnt"
-class3[87 ]="mp_start_search"
-class3[88 ]="mp_join_req_accepted"
-class3[89 ]="mp_join_req_rejected"
-class3[90 ]="reset_heat_energy_cnt"
-class3[91 ]="reset_energy_cnt"
-class3[92 ]="mp_start_multi_pump"
-class3[93 ]="mp_end_multi_pump"
-class3[94 ]="twin_pump_master"
-class3[95 ]="twin_pump_slave"
-class3[96 ]="const_diff_press"
-class3[97 ]="const_diff_temp"
-class3[98 ]="authen_req_accepted"
-class3[99 ]="authen_req_rejected"
-class3[103]="user_def"
-class3[104]="wink_p1"
-class3[105]="wink_p2"
-class3[106]="wink_p3"
-class3[107]="wink_p4"
-class3[108]="wink_p5"
-class3[109]="wink_p6"
-class3[110]="lubrication_done"
-class3[111]="bearing_changed"
-class3[112]="varistor_changed"
-class3[113]="relay_2_open"
-class3[114]="relay_2_close"
-class3[115]="debug"
-class3[116]="update_h_max"
-class3[118]="reset_corr_hist_log"
-class3[119]="geniair_node_ping"
-class3[120]="mp_start_wired_search"
-class3[121]="wink_on"
-class3[122]="wink_off"
-# section: class 4 {{{2
-class4[0  ]="production_code_1"
-class4[1  ]="production_code_2"
-class4[2  ]="production_code_3"
-class4[3  ]="production_code_4"
-class4[4  ]="production_code_5"
-class4[5  ]="production_code_6"
-class4[6  ]="production_code_7"
-class4[7  ]="production_code_8"
-class4[8  ]="production_code_9"
-class4[9  ]="production_code_10"
-class4[10 ]="configuration_code_1"
-class4[11 ]="configuration_code_2"
-class4[12 ]="configuration_code_3"
-class4[13 ]="configuration_code_4"
-class4[14 ]="vir_conf_code_year"
-class4[15 ]="vir_conf_code_week"
-class4[16 ]="act_conf_code_year"
-class4[17 ]="act_conf_code_week"
-class4[18 ]="el_version_char_1"
-class4[19 ]="el_version_char_2"
-class4[20 ]="el_version_char_3"
-class4[21 ]="t_min_delay"
-class4[22 ]="t_standby"
-class4[23 ]="t_ramp_up_1_hi"
-class4[24 ]="t_ramp_up_1_lo"
-class4[25 ]="t_ramp_down_1_hi"
-class4[26 ]="t_ramp_down_1_lo"
-class4[27 ]="local_mode_setup"
-class4[28 ]="local_ref_setup"
-class4[29 ]="f_lower"
-class4[30 ]="f_upper"
-class4[31 ]="f_nom"
-class4[32 ]="f_min_stop"
-class4[33 ]="f_night"
-class4[34 ]="f_min"
-class4[35 ]="f_max"
-class4[36 ]="f_min_start"
-class4[37 ]="user_curve"
-class4[38 ]="r100_menu_setup_2"
-class4[39 ]="auto_restarts_per_day"
-class4[40 ]="motor_type"
-class4[41 ]="h_max_limit"
-class4[42 ]="h_max_limit_ed"
-class4[43 ]="geniair_channel"
-class4[44 ]="stator_heater_level"
-class4[45 ]="mp_master_addr"
-class4[46 ]="unit_addr"
-class4[47 ]="group_addr"
-class4[48 ]="event_action_setup1"
-class4[49 ]="event_action_setup2"
-class4[50 ]="event_action_setup3"
-class4[51 ]="event_action_setup4"
-class4[52 ]="event_action_setup5"
-class4[55 ]="bear_superv_setup"
-class4[56 ]="bear_superv_detect_del"
-class4[57 ]="bear_superv_reset_hyst"
-class4[58 ]="t_bear_de_warn_limit"
-class4[59 ]="t_bear_de_alarm_limit"
-class4[60 ]="t_bear_nde_warn_limit"
-class4[61 ]="t_bear_nde_alarm_limit"
-class4[62 ]="bear_lubric_setup"
-class4[63 ]="bear_lubric_max"
-class4[64 ]="r100_menu_setup_4"
-class4[65 ]="p_max"
-class4[66 ]="r100_menu_select"
-class4[67 ]="limit_exc_1_setup"
-class4[68 ]="limit_exc_2_setup"
-class4[69 ]="limit_exc_1_source"
-class4[70 ]="limit_exc_2_source"
-class4[71 ]="limit_exc_1_action"
-class4[72 ]="limit_exc_2_action"
-class4[78 ]="min_reply_delay_default"
-class4[79 ]="baud_rate_default"
-class4[80 ]="temp_influence_setup"
-class4[81 ]="geni_setup"
-class4[82 ]="r100_menu_setup_1"
-class4[83 ]="h_const_ref_min"
-class4[84 ]="h_const_ref_max"
-class4[85 ]="h_prop_ref_min"
-class4[86 ]="h_prop_ref_max"
-class4[87 ]="ref_steps"
-class4[88 ]="h_max"
-class4[89 ]="q_max"
-class4[90 ]="q_bezier1"
-class4[91 ]="h_bezier1"
-class4[92 ]="q_bezier2"
-class4[93 ]="h_bezier2"
-class4[94 ]="liqtec_dryrun_det_delay"
-class4[95 ]="liqtec_dryrun_limit"
-class4[96 ]="h_auto_act"
-class4[97 ]="application_type"
-class4[98 ]="h_ref_min"
-class4[99 ]="h_auto_ref_min"
-class4[100]="q_low_meas_limit"
-class4[101]="delta_h"
-class4[102]="lfs_type_select"
-class4[103]="h_max_hi"
-class4[104]="h_max_lo"
-class4[105]="q_max_hi"
-class4[106]="q_max_lo"
-class4[109]="def_direction"
-class4[110]="ext_fault_quick_rst_tim"
-class4[111]="ext_fault_quick_rst_max"
-class4[112]="ext_fault_slow_rst_tim"
-class4[113]="ext_fault_slow_rst_max"
-class4[114]="external_fault_delay"
-class4[115]="dry_run_f0"
-class4[116]="dry_run_p0"
-class4[117]="dry_run_f_min"
-class4[118]="quick_restart_max"
-class4[119]="quick_restart_time"
-class4[120]="prop_curve_select"
-class4[121]="prop_curve_reduc_pct"
-class4[122]="h_auto_set"
-class4[123]="h_auto_foot"
-class4[124]="fac_restart_setup1"
-class4[125]="fac_restart_setup2"
-class4[126]="fac_restart_setup3"
-class4[127]="dig_in_options"
-class4[128]="t_ramp_up_2_hi"
-class4[129]="t_ramp_up_2_lo"
-class4[130]="t_ramp_down_2_hi"
-class4[131]="t_ramp_down_2_lo"
-class4[132]="procent_k"
-class4[133]="h_max_def"
-class4[134]="h_max_act"
-class4[136]="prop_ctr_qmax_hi"
-class4[137]="prop_ctr_qmax_lo"
-class4[138]="ref_preset_1"
-class4[139]="ref_preset_2"
-class4[140]="ref_preset_3"
-class4[141]="ref_preset_4"
-class4[142]="ref_preset_5"
-class4[143]="ref_preset_6"
-class4[144]="ref_preset_7"
-class4[145]="ref_preset_direction"
-class4[147]="fs1_begin_hi"
-class4[148]="fs1_begin_lo"
-class4[149]="fs1_end_hi"
-class4[150]="fs1_end_lo"
-class4[151]="fs2_begin_hi"
-class4[152]="fs2_begin_lo"
-class4[153]="fs2_end_hi"
-class4[154]="fs2_end_lo"
-class4[155]="t_start_ramp"
-class4[156]="t_stop_ramp"
-class4[157]="t_skip_band_ramp"
-class4[162]="t_power_up_delay"
-class4[163]="t_fan_ctr_limit"
-class4[164]="t_alternate"
-class4[165]="alarm_setup1"
-class4[166]="alarm_setup2"
-class4[167]="restart_setup1"
-class4[168]="restart_setup2"
-class4[169]="application_setup1"
-class4[170]="application_setup2"
-class4[171]="cl_ctr_setup1"
-class4[172]="application_setup3"
-class4[173]="application_setup4"
-class4[175]="ref_inf_source"
-class4[176]="h_nom_hi"
-class4[177]="h_nom_lo"
-class4[178]="q_nom_hi"
-class4[179]="q_nom_lo"
-class4[180]="k_p"
-class4[181]="t_i_hi"
-class4[182]="t_i_lo"
-class4[183]="t_d_hi"
-class4[184]="t_d_lo"
-class4[185]="f_pid_start"
-class4[188]="pulse_cnt_setup_hi"
-class4[189]="pulse_cnt_setup_lo1"
-class4[190]="pulse_cnt_setup_lo2"
-class4[191]="dig_io_direction"
-class4[195]="dig_in_polarity"
-class4[196]="dig_in_1_func"
-class4[197]="dig_in_2_func"
-class4[198]="dig_in_3_func"
-class4[199]="dig_in_4_func"
-class4[200]="dig_out_1_func"
-class4[201]="dig_out_2_func"
-class4[202]="dig_out_3_func"
-class4[203]="dig_out_4_func"
-class4[204]="dig_out_1_delay"
-class4[205]="dig_out_2_delay"
-class4[206]="dig_out_3_delay"
-class4[207]="dig_out_4_delay"
-class4[208]="ana_in_1_unit"
-class4[209]="ana_in_1_min_hi"
-class4[210]="ana_in_1_min_lo"
-class4[211]="ana_in_1_max_hi"
-class4[212]="ana_in_1_max_lo"
-class4[213]="ana_in_2_unit"
-class4[214]="ana_in_2_min_hi"
-class4[215]="ana_in_2_min_lo"
-class4[216]="ana_in_2_max_hi"
-class4[217]="ana_in_2_max_lo"
-class4[218]="ana_in_3_unit"
-class4[219]="ana_in_3_min_hi"
-class4[220]="ana_in_3_min_lo"
-class4[221]="ana_in_3_max_hi"
-class4[222]="ana_in_3_max_lo"
-class4[223]="ana_in_1_sig_type"
-class4[224]="ana_in_2_sig_type"
-class4[225]="ana_in_3_sig_type"
-class4[226]="ana_in_1_applic"
-class4[227]="ana_in_2_applic"
-class4[228]="ana_in_3_applic"
-class4[229]="ana_in_1_func"
-class4[230]="ana_in_2_func"
-class4[231]="ana_in_3_func"
-class4[232]="temp_in_1_applic"
-class4[233]="temp_in_2_applic"
-class4[234]="temp_in_3_applic"
-class4[236]="temp_in_2_func"
-class4[237]="temp_in_3_func"
-class4[238]="grf_sensor_press_func"
-class4[239]="grf_sensor_temp_func"
-class4[240]="ana_out_parm"
-class4[241]="tp_mode"
-class4[242]="ana_out_sig_type"
-class4[243]="liqtec_temp_func"
-# section: class 5 {{{2
-class5[1  ]="ref_rem"
-class5[2  ]="ref_ir"
-class5[3  ]="sys_fb_rem"
-class5[4  ]="ref_hand"
-class5[5  ]="ref_led_indication"
-class5[27 ]="duty_standby_func_ctr"
-class5[30 ]="alarm_code_sim"
-class5[31 ]="warn_code_sim"
-class5[35 ]="alarm_sim_activate"
-class5[38 ]="set_min_reply_delay"
-class5[39 ]="set_baud_rate"
-class5[40 ]="set_lubric_cnt"
-class5[41 ]="set_bear_change_cnt"
-class5[49 ]="sim_card_status"
-class5[50 ]="signal_level_act"
-class5[51 ]="signal_level_avg"
-class5[55 ]="gsm_state"
-class5[56 ]="cim_heartbeat"
-class5[57 ]="cim_type"
-class5[58 ]="network_heartbeat"
-class5[65 ]="non_master_mode"
-class5[66 ]="mp_master_ref"
-class5[67 ]="mp_master_ref_p1"
-class5[68 ]="mp_master_ref_p2"
-class5[69 ]="mp_master_ref_p3"
-class5[70 ]="mp_master_ref_p4"
-class5[71 ]="mp_master_ref_p5"
-class5[72 ]="mp_master_ref_p6"
-# section: class 7 {{{2
-class7[1  ]="product_name"
-class7[2  ]="project_name"
-class7[3  ]="software_name1"
-class7[4  ]="compile_date"
-class7[5  ]="genipro_ver"
-class7[6  ]="hex_file_prod_no"
-class7[7  ]="developers"
-class7[8  ]="device_prod_no"
-class7[9  ]="serial_no"
-class7[14 ]="software_name2"
-class7[16 ]="data_log_ver"
-class7[17 ]="user_string1"
-class7[18 ]="user_string2"
-class7[19 ]="gsc_file_description"
-class7[20 ]="gsc_file_version"
-class7[21 ]="gsc_file_id"
-class7[50 ]="fe_sw_ver_str"
-class7[51 ]="be_sw_ver_string"
-class7[52 ]="gpds_lib_sw_ver_string"
-class7[53 ]="pdm_sw_ver_string"
-class7[54 ]="pdm_fe_sw_ver_string"
-class7[55 ]="cim_sw_ver_string"
-class7[56 ]="sensor_sw_string"
-class7[70 ]="geniair_node_name_1"
-class7[71 ]="geniair_node_name_2"
-class7[72 ]="geniair_group_name_1"
-class7[73 ]="geniair_group_name_2"
-class7[74 ]="pump_1_name_str_1"
-class7[75 ]="pump_1_name_str_2"
-class7[76 ]="pump_2_name_str_1"
-class7[77 ]="pump_2_name_str_2"
-class7[78 ]="pump_3_name_str_1"
-class7[79 ]="pump_3_name_str_2"
-class7[80 ]="pump_4_name_str_1"
-class7[81 ]="pump_4_name_str_2"
-class7[82 ]="pump_5_name_str_1"
-class7[83 ]="pump_5_name_str_2"
-class7[84 ]="pump_6_name_str_1"
-class7[85 ]="pump_6_name_str_2"
-# section: class 10 {{{2
-class10[0 ]="contents_obj"
-class10[53]="corr_hist_obj"
-class10[55]="event_back_log"
-class10[56]="mge_event_log_obj"
-class10[57]="event_connect_obj"
-class10[71]="geniair_appl_bind_tab"
-class10[72]="geniair_nwk_status_obj"
-class10[73]="twin_pump_data_exch_obj"
-class10[74]="max_power_log_records_obj"
-class10[76]="pump_setup_options_obj"
-class10[77]="multi_pump_sync_obj"
-# section: class 11 {{{2
-class11[0  ]="gpds_eeprom_alarm_cnt"
-class11[1  ]="gpds_inrush_alarm_cnt"
-class11[2  ]="gpds_dpfc_hsd_alarm_cnt"
-class11[3  ]="gpds_u_dc_max_alarm_cnt"
-class11[4  ]="gpds_low_power_alarm_cnt"
-class11[5  ]="gpds_motor_con_alarm_cnt"
-class11[6  ]="gpds_turbine_alarm_cnt"
-class11[7  ]="gpds_derate_max_alarm_cnt"
-class11[8  ]="gpds_blocked_alarm_cnt"
-class11[9  ]="gpds_hsd_in_cl_alarm_cnt"
-class11[10 ]="gpds_lost_rotor_alarm_cnt"
-class11[11 ]="gpds_supply_low_alarm_cnt"
-class11[12 ]="gpds_temp_alarm_cnt"
-class11[14 ]="gpds_adc_mux_alarm_cnt"
-class11[16 ]="gpds_api_fuffer_fault_cnt"
-class11[17 ]="gpds_api_com_fault_cnt"
-class11[18 ]="gpds_api_id_fault_cnt"
-class11[19 ]="gpds_api_obj_fault_cnt"
-class11[20 ]="gpds_api_state_fault_cnt"
-class11[21 ]="gpds_api_version_fault_cnt"
-class11[22 ]="power_24v_fault_cnt"
-class11[23 ]="power_4v75_fault_cnt"
-class11[24 ]="power_5v2_fault_cnt"
-class11[25 ]="grf_sens_nack_fault_cnt"
-class11[26 ]="grf_sens_sum_fault_cnt"
-class11[27 ]="grf_sens_timeout_1_fault_cnt"
-class11[28 ]="grf_sens_timeout_2_fault_cnt"
-class11[29 ]="grf_sens_low_press_fault_cnt"
-class11[30 ]="ana_in_1_16bits"
-class11[31 ]="ana_in_2_16bits"
-class11[32 ]="ana_in_3_16bits"
-class11[33 ]="grf_sensor_press_16bits"
-class11[34 ]="grf_sensor_temp_16bits"
-class11[35 ]="geniair_ping_result"
-class11[36 ]="geniair_signal_quality"
-class11[37 ]="mp_no_of_pumps"
-class11[38 ]="mp_pump_search_status"
-class11[39 ]="mp_search_timeout"
-class11[40 ]="ref_act_16"
-class11[41 ]="ref_loc_16"
-class11[42 ]="ref_norm_16"
-class11[43 ]="ref_ctr_16"
-class11[44 ]="sys_ref_16"
-class11[45 ]="sys_fb_16"
-class11[46 ]="r_max_abs"
-class11[47 ]="r_min_abs"
-class11[50 ]="power_16"
-class11[51 ]="t_w_16"
-class11[52 ]="diff_press_16"
-class11[53 ]="flow_16"
-class11[80 ]="tps_power_16"
-class11[81 ]="tps_ana_in_1_16bits"
-class11[82 ]="tps_ana_in_2_16bits"
-class11[83 ]="tps_ana_in_3_16bits"
-class11[101]="p0_act_mode1"
-class11[102]="p0_contr_source"
-class11[103]="p0_start_cnt_hi"
-class11[104]="p0_start_cnt_lo"
-class11[105]="p0_opr_time_hi"
-class11[106]="p0_opr_time_lo"
-class11[107]="p0_energy_hi"
-class11[108]="p0_energy_lo"
-class11[109]="p0_power"
-class11[110]="p0_i_mo"
-class11[111]="p0_speed"
-class11[112]="p0_speed_pct"
-class11[113]="p0_t_mo"
-class11[114]="p0_alarm_code"
-class11[115]="p0_warn_code"
-class11[121]="p1_act_mode1"
-class11[141]="p2_act_mode1"
-class11[161]="p3_act_mode1"
-class11[181]="p4_act_mode1"
-class11[201]="p5_act_mode1"
-class11[221]="p6_act_mode1"
-# section: class 12 {{{2
-class12[0  ]="ref_inf_setup"
-class12[1  ]="no_of_table_points"
-class12[2  ]="ref_inf_pct_value_1"
-class12[3  ]="ref_inf_pct_value_2"
-class12[4  ]="ref_inf_pct_value_3"
-class12[5  ]="ref_inf_pct_value_4"
-class12[6  ]="ref_inf_pct_value_5"
-class12[7  ]="ref_inf_pct_value_6"
-class12[8  ]="ref_inf_pct_value_7"
-class12[9  ]="ref_inf_pct_value_8"
-class12[10 ]="ref_inf_item_value_1"
-class12[11 ]="ref_inf_item_value_2"
-class12[12 ]="ref_inf_item_value_3"
-class12[13 ]="ref_inf_item_value_4"
-class12[14 ]="ref_inf_item_value_5"
-class12[15 ]="ref_inf_item_value_6"
-class12[16 ]="ref_inf_item_value_7"
-class12[17 ]="ref_inf_item_value_8"
-class12[18 ]="ref_inf_filter_time"
-class12[19 ]="ref_att_mode"
-class12[21 ]="lfs_boost_band_scale"
-class12[22 ]="lfs_t_boost_max"
-class12[23 ]="lfs_t_boost_min"
-class12[24 ]="lfs_tank_volume"
-class12[25 ]="lfs_estim_interval"
-class12[26 ]="lfs_q_lim_opt"
-class12[27 ]="lfs_max_press_drop_opt"
-class12[28 ]="lfs_q_lim_comf"
-class12[29 ]="lfs_max_press_drop_comf"
-class12[30 ]="lfs_q_lim_cust"
-class12[31 ]="lfs_max_press_drop_cust"
-class12[32 ]="lfs_feed_forward_gain"
-class12[33 ]="lfs_settling_time"
-class12[34 ]="lfs_setpoint_band"
-class12[35 ]="lfs_gradient_est_limit"
-class12[36 ]="lfs_hyst_band"
-class12[37 ]="extra_boost"
-class12[38 ]="lfs_flow_test_limit"
-class12[40 ]="dig_in_1_delay"
-class12[41 ]="dig_in_1_dur_tim"
-class12[42 ]="dig_in_1_dur_tim_mode"
-class12[43 ]="dig_in_2_delay"
-class12[44 ]="dig_in_2_dur_tim"
-class12[45 ]="dig_in_2_dur_tim_mode"
-class12[46 ]="dig_in_3_delay"
-class12[47 ]="dig_in_3_dur_tim"
-class12[48 ]="dig_in_3_dur_tim_mode"
-class12[49 ]="dig_in_4_delay"
-class12[50 ]="dig_in_4_dur_tim"
-class12[51 ]="dig_in_4_dur_tim_mode"
-class12[65 ]="relub_interval"
-class12[67 ]="setpoint_reduction_k1"
-class12[68 ]="setpoint_reduction_k2"
-class12[69 ]="pdc_ref_max"
-class12[70 ]="iq_ref_max"
-class12[71 ]="mot_contr_bits"
-class12[72 ]="hi_f6_on"
-class12[73 ]="hi_f6_off"
-class12[74 ]="hi_f12_on"
-class12[75 ]="hi_f12_off"
-class12[76 ]="hi_f24_on"
-class12[77 ]="hi_f24_off"
-class12[78 ]="hi_fx_on"
-class12[79 ]="hi_fx_off"
-class12[80 ]="hi_amp6_g"
-class12[81 ]="hi_amp6_o"
-class12[82 ]="hi_amp12"
-class12[83 ]="hi_amp24"
-class12[84 ]="hi_ampx"
-class12[85 ]="hi_ang6_g"
-class12[86 ]="hi_ang6_o"
-class12[87 ]="hi_ang12"
-class12[88 ]="hi_ang24"
-class12[89 ]="hi_angx"
-class12[90 ]="hi_hx"
-class12[171]="inlet_diameter"
-class12[172]="outlet_diameter"
-class12[173]="in_out_hight_diff"
-class12[175]="bearing_temp_nom"
-class12[176]="bearing_speed_nom"
-class12[180]="disp_misch_setup"
-class12[181]="disp_language"
-class12[183]="disp_quant_setup_1"
-class12[184]="disp_quant_setup_2"
-class12[185]="disp_quant_setup_3"
-class12[186]="disp_home_screen_parm_1"
-class12[187]="disp_home_screen_parm_2"
-class12[188]="disp_home_screen_parm_3"
-class12[189]="disp_home_screen_parm_4"
-class12[190]="spb_setup"
-class12[191]="spb_ol_max_pump_speed"
-class12[192]="spb_speed_ctr_pumps"
-class12[193]="spb_ramp"
-class12[194]="spb_ol_press_timeout"
-class12[195]="spb_release_press"
-class12[197]="t_fc_max"
-class12[198]="t_fc_max_hys"
-class12[201]="q_max_limit"
-class12[202]="local_ref_setup"
-class12[203]="q_max_limit_upper"
-class12[205]="limit_exc_1_limit"
-class12[206]="limit_exc_2_limit"
-class12[207]="limit_exc_1_reset_hyst"
-class12[208]="limit_exc_2_reset_hyst"
-class12[209]="limit_exc_1_detect_del"
-class12[210]="limit_exc_2_detect_del"
-class12[211]="limit_exc_1_reset_del"
-class12[212]="limit_exc_2_reset_del"
-class12[214]="pump_stop_speed"
-class12[215]="pump_start_speed"
-class12[216]="pump_stop_delay"
-class12[217]="ramp_up_time"
-class12[218]="ramp_down_time"
-class12[219]="cas_ctr_cut_out_hys"
-class12[220]="max_cut_in_delay"
-class12[221]="max_cut_in_delay_dev"
-class12[222]="calc_cut_in_speed_offset"
-class12[223]="pump_switch_off_period"
-class12[224]="cas_ctr_pid_preset_time"
-class12[225]="cas_ctr_cut_in_speed_2"
-class12[226]="cas_ctr_cut_out_speed_1"
-class12[227]="cas_ctr_min_speed"
-class12[228]="cas_ctr_min_no_of_pumps"
-class12[229]="cas_ctr_protect_ramp"
-class12[230]="cut_in_first_e_pump"
-class12[231]="max_starts_per_hour"
-class12[232]="pump_min_switch_delay"
-class12[233]="p1_prio"
-class12[234]="p2_prio"
-class12[235]="p3_prio"
-class12[236]="p4_prio"
-class12[237]="p5_prio"
-class12[238]="p6_prio"
-class12[239]="standby_pumps"
-class12[240]="time_based_alter"
-class12[241]="energy_based_alter"
-class12[242]="f_lower_16"
-class12[243]="f_upper_16"
-class12[244]="f_nom_16"
-# section: class 13 {{{2
-class13[1]="ref_rem_16"
-class13[2]="ref_ir_16"
-# section: class 14 {{{2
-class14[0  ]="geniair_trans_cnt"
-class14[1  ]="geniair_rec_cnt"
-class14[2  ]="geniair_trans_and_ack_cnt"
-class14[3  ]="geni_profile_version"
-class14[6  ]="disp_event_ctr"
-class14[9  ]="power_on_time"
-class14[10 ]="alarm_log_1_app_time"
-class14[11 ]="alarm_log_2_app_time"
-class14[12 ]="alarm_log_3_app_time"
-class14[13 ]="alarm_log_4_app_time"
-class14[14 ]="alarm_log_5_app_time"
-class14[15 ]="warn_log_1_app_time"
-class14[16 ]="warn_log_2_app_time"
-class14[17 ]="warn_log_3_app_time"
-class14[18 ]="warn_log_4_app_time"
-class14[19 ]="warn_log_5_app_time"
-class14[20 ]="alarm_log_1_dis_time"
-class14[21 ]="alarm_log_2_dis_time"
-class14[22 ]="alarm_log_3_dis_time"
-class14[23 ]="alarm_log_4_dis_time"
-class14[24 ]="alarm_log_5_dis_time"
-class14[25 ]="warn_log_1_dis_time"
-class14[26 ]="warn_log_2_dis_time"
-class14[27 ]="warn_log_3_dis_time"
-class14[28 ]="warn_log_4_dis_time"
-class14[29 ]="warn_log_5_dis_time"
-class14[30 ]="unix_rtc"
-class14[31 ]="volume_cnt1"
-class14[32 ]="volume_cnt1_year"
-class14[33 ]="heat_energy_cnt1"
-class14[34 ]="heat_energy_cnt1_year"
-class14[35 ]="heat_power"
-class14[36 ]="heat_temp_diff"
-class14[37 ]="power_32"
-class14[38 ]="energy_32"
-class14[40 ]="opr_time"
-class14[41 ]="mp_power"
-class14[42 ]="mp_energy"
-class14[43 ]="mp_pressure"
-class14[44 ]="mp_flow"
-class14[45 ]="mp_speed"
-class14[46 ]="mp_speed_pct"
-class14[47 ]="mp_media_temp"
-class14[51 ]="volume_cnt2"
-class14[52 ]="volume_cnt2_year"
-class14[53 ]="heat_energy_cnt2"
-class14[54 ]="heat_energy_cnt2_year"
-class14[55 ]="last_time_stamp_cnt1"
-class14[56 ]="last_time_stamp_cnt2"
-class14[57 ]="counter_status"
-class14[60 ]="flow_below_range_cnt"
-class14[61 ]="flow_above_range_cnt"
-class14[80 ]="tps_head"
-class14[81 ]="tps_flow"
-class14[82 ]="tps_energy"
-class14[83 ]="tps_speed"
-class14[84 ]="tau_est"
-class14[85 ]="dp_est"
-class14[86 ]="p_shaft"
-class14[87 ]="pm_loss"
-class14[88 ]="q_est"
-class14[89 ]="i_mo_32"
-class14[238]="sector_1_writes"
-class14[239]="sector_2_writes"
-class14[240]="sector_3_writes"
-class14[241]="sector_4_writes"
-class14[242]="sector_5_writes"
-class14[243]="sector_6_writes"
-class14[244]="sector_7_writes"
-class14[245]="sector_8_writes"
-class14[246]="sector_1_account"
-class14[247]="sector_2_account"
-class14[248]="sector_3_account"
-class14[249]="sector_4_account"
-class14[250]="sector_5_account"
-class14[251]="sector_6_account"
-class14[252]="sector_7_account"
-class14[253]="sector_8_account"
-class14[254]="persistence_lock"
-class14[255]="persistence_lock_cnt"
-# section: class 15 {{{2
-class15[0  ]="flow_est_coeff_g0"
-class15[1  ]="flow_est_coeff_g1"
-class15[2  ]="flow_est_coeff_g2"
-class15[3  ]="flow_est_coeff_g3"
-class15[4  ]="flow_est_coeff_g4"
-class15[5  ]="flow_est_coeff_g5"
-class15[6  ]="flow_est_coeff_kp"
-class15[7  ]="flow_est_coeff_kh"
-class15[8  ]="flow_est_coeff_k0"
-class15[9  ]="flow_est_q_min"
-class15[15 ]="control_mode_mask"
-class15[20 ]="geniair_mac_addr_hi"
-class15[21 ]="geniair_mac_addr_lo"
-class15[22 ]="geniair_pan_id_nwk_addr"
-class15[23 ]="geniair_nwk_key_hi"
-class15[24 ]="geniair_nwk_key_lo1"
-class15[25 ]="geniair_nwk_key_lo2"
-class15[26 ]="geniair_nwk_key_lo3"
-class15[27 ]="geniair_mode_and_mask"
-class15[28 ]="geniair_radio_ed"
-class15[29 ]="pulse_cnt_setup"
-class15[40 ]="a0m"
-class15[41 ]="a1m"
-class15[42 ]="a2m"
-class15[43 ]="a3m"
-class15[44 ]="a4m"
-class15[45 ]="a5m"
-class15[46 ]="a6m"
-class15[47 ]="k1"
-class15[48 ]="aqdp0m"
-class15[49 ]="aqdp1m"
-class15[50 ]="aqdp2m"
-class15[51 ]="aqdp3m"
-class15[52 ]="aqdp4m"
-class15[53 ]="aqdp5m"
-class15[54 ]="aqdp6m"
-class15[55 ]="aqdp7m"
-class15[56 ]="at0m"
-class15[57 ]="at1m"
-class15[58 ]="at2m"
-class15[59 ]="at3m"
-class15[60 ]="at4m"
-class15[61 ]="at5m"
-class15[62 ]="at6m"
-class15[63 ]="at7m"
-class15[64 ]="at8m"
-class15[65 ]="scale1_a"
-class15[66 ]="scale1_b"
-class15[67 ]="scale2_a"
-class15[68 ]="scale2_b"
-class15[69 ]="scale_max"
-class15[70 ]="scale_min"
-class15[71 ]="aqh0"
-class15[72 ]="aqh1"
-class15[73 ]="aqh2"
-class15[74 ]="aqh3"
-class15[75 ]="aqh4"
-class15[76 ]="aqh5"
-class15[77 ]="dp_scale"
-class15[78 ]="t_scale"
-class15[79 ]="max_curve_qh_0"
-class15[80 ]="max_curve_qh_1"
-class15[81 ]="max_curve_qh_2"
-class15[82 ]="qp_max_curve_0"
-class15[83 ]="qp_max_curve_1"
-class15[84 ]="qp_max_curve_2"
-class15[85 ]="qp_max_curve_3"
-class15[86 ]="qp_max_curve_4"
-class15[87 ]="qp_max_curve_5"
-class15[88 ]="qh_max_curve_0"
-class15[89 ]="qh_max_curve_1"
-class15[90 ]="qh_max_curve_2"
-class15[91 ]="qh_max_curve_3"
-class15[92 ]="qh_max_curve_4"
-class15[93 ]="qh_max_curve_5"
-class15[94 ]="flow_limit_kp"
-class15[95 ]="flow_limit_ti"
-class15[96 ]="pressure_limit_kp"
-class15[97 ]="pressure_limit_ti"
-class15[98 ]="kq_max"
-class15[99 ]="kq_min"
-class15[100]="pwm_1"
-class15[101]="pwm_2"
-class15[102]="n_alpha"
-class15[103]="pp_filter_const"
-class15[104]="h_max_est"
-class15[105]="tp_test_run_time"
-class15[106]="tp_switch_time"
-class15[107]="tp_switch_interval"
-class15[108]="a1"
-class15[109]="a2"
-class15[110]="b1"
-class15[111]="b2"
-class15[112]="q_const_ref_min"
-class15[113]="q_const_ref_max"
-class15[114]="t_const_ref_min"
-class15[115]="t_const_ref_max"
-class15[116]="level_const_ref_min"
-class15[117]="level_const_ref_max"
-class15[118]="p_max_32"
-class15[120]="kq_max2"
-# section: class 16 {{{2
-class16[0]="set_unix_rtc"
-class16[1]="disp_event_ctr_ack"
-class16[2]="disp_data_to_applic"