Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Mock Turtle
Commits
a2a67870
Commit
a2a67870
authored
Apr 03, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib:py: add string representation for TrtlMessage
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
edfef5e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
PyMockTurtle.py
software/lib/PyMockTurtle/PyMockTurtle/PyMockTurtle.py
+5
-0
No files found.
software/lib/PyMockTurtle/PyMockTurtle/PyMockTurtle.py
View file @
a2a67870
...
...
@@ -110,6 +110,8 @@ class TrtlHmqHeader(Structure):
return
False
return
True
def
__str__
(
self
):
return
"rt_app_id: 0x{:x}, flags: 0x{:x}, msg_id: 0x{:x}, len: {:d}, sync_id: {:d}, seq: {:d}"
.
format
(
self
.
rt_app_id
,
self
.
flags
,
self
.
msg_id
,
self
.
len
,
self
.
sync_id
,
self
.
seq
)
class
TrtlMessage
(
Structure
):
"""
...
...
@@ -136,6 +138,9 @@ class TrtlMessage(Structure):
break
return
True
def
__str__
(
self
):
return
"{:s}, payload: ##"
.
format
(
str
(
self
.
header
))
class
TrtlFirmwareVersion
(
Structure
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment