17 lines
407 B
Python
17 lines
407 B
Python
import time
|
|
|
|
from a_transceiver import ATransceiver
|
|
|
|
|
|
class MsgContainer:
|
|
def __init__(self, data: bytes, source: ATransceiver|None, timestamp=time.time()):
|
|
self.data: bytes = data
|
|
self.source = source
|
|
self.timestamp : float = timestamp
|
|
|
|
def __str__(self):
|
|
return f"{self.timestamp}:{self.source.name}:{self.data}"
|
|
|
|
def __repr__(self):
|
|
return f"{self.timestamp}:{self.source.name}:{self.data}"
|