frame parsing

This commit is contained in:
hg
2015-06-12 00:09:58 +02:00
parent aebbb53090
commit 53789088f2
5 changed files with 232 additions and 62 deletions

View File

@ -4,19 +4,11 @@ Created on 11.06.2015
@author: dehottgw
'''
class A(object):
def __init__(self, x):
self.x = x
def out(self):
print("X is %s" % self.x)
class B(A):
pass
import MeterbusLib
inputOkLongFrame_1phase_electric = "68 38 38 68 08 53 72 17 00 13 00 2E 19 24 02 D6 00 00 00 8C 10 04 01 02 00 00 8C 11 04 01 02 00 00 02 FD C9 FF 01 E4 00 02 FD DB FF 01 03 00 02 AC FF 01 01 00 82 40 AC FF 01 FA FF 20 16"
a = A('abc')
a.out()
b = B('xyz')
b.out()
telegram = MeterbusLib.Telegram()
telegram.fromHexString(inputOkLongFrame_1phase_electric)
telegram.parse()