percept_simulator_2023/communication/communicate_datapacket.py

21 lines
361 B
Python
Raw Permalink Normal View History

2023-07-31 15:24:40 +02:00
#%%
from dataclasses import dataclass, field
@dataclass
class DataPacket:
# data packet consists of message/command and data associated with it
data: dict = field(default_factory=dict)
message: str = field(default=None)
if __name__ == "__main__":
test = DataPacket()
print(test.data)
print(test.message)
# %%