Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aerobs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Gattringer
aerobs
Commits
5c01e184
Commit
5c01e184
authored
1 year ago
by
Andreas Gattringer
Browse files
Options
Downloads
Patches
Plain Diff
remove old file
parent
c94c0ae4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/test.py
+0
-22
0 additions, 22 deletions
misc/test.py
with
0 additions
and
22 deletions
misc/test.py
deleted
100644 → 0
+
0
−
22
View file @
c94c0ae4
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment