Skip to content
Snippets Groups Projects
Commit 5c01e184 authored by Andreas Gattringer's avatar Andreas Gattringer
Browse files

remove old file

parent c94c0ae4
No related branches found
No related tags found
No related merge requests found
import binascii
from umnp.microcontroller.umock.machine import SPI, Pin
from umnp.microcontroller.umock.network import WIZNET5K
from umnp.protocol.message import Message
from umnp.protocol.messagetype import MessageType
x = Message(MessageType.MSG_DEVICE_DATA, "abasdc", None)
w = WIZNET5K(SPI(), Pin(1), Pin(1), mac=b"")
print(w.config("mac"))
w.config(mac=3)
print(w.config("mac"))
encoded = x.encode()
print("====")
print(binascii.hexlify(encoded))
print("====")
# encoded = b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03abc'
print(encoded)
y = Message.from_bytes(encoded)
print(y)
print(y._data)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment