doublebuf
Ondřej Hruška 7 years ago
parent 7676e8a22b
commit eb4b4016a9
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 42
      gex/TinyFrame.py

@ -1,18 +1,3 @@
class TF_Msg:
def __init__(self, id=0, type=0, data=None):
self.data = data if data is not None else bytearray()
self.type = type
self.id = id
def __str__(self):
return f"ID {self.id:X}h, type {self.type:X}h, body: {self.data}"
class TF:
STAY = 'STAY'
RENEW = 'RENEW'
CLOSE = 'CLOSE'
NEXT = 'NEXT'
class TinyFrame:
def __init__(self, peer=1):
self.write = None # the writer function should be attached here
@ -348,19 +333,18 @@ class TinyFrame:
'fn': lst,
}
class TF_Msg:
def __init__(self):
self.data = bytearray()
self.len = 0
self.type = 0
self.id = 0
def __str__(self):
return f"ID {self.id:X}h, type {self.type:X}h, len {self.len:d}, body: {self.data}"
class TF:
STAY = 'STAY'
RENEW = 'RENEW'
CLOSE = 'CLOSE'
NEXT = 'NEXT'

Loading…
Cancel
Save