Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
controlhost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
km3py
controlhost
Commits
d7df912c
Commit
d7df912c
authored
Dec 18, 2014
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Adds docstrings
parent
330b28c7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
controlhost/__init__.py
+7
-1
7 additions, 1 deletion
controlhost/__init__.py
with
7 additions
and
1 deletion
controlhost/__init__.py
+
7
−
1
View file @
d7df912c
...
...
@@ -6,7 +6,7 @@ A set of classes and tools wich uses the ControlHost protocol.
"""
from
__future__
import
absolute_import
from
controlhost.__version__
import
version
,
version_info
from
controlhost.__version__
import
version
__author__
=
"
Tamas Gal
"
__copyright__
=
(
"
Copyright 2014, Tamas Gal and the KM3NeT collaboration
"
...
...
@@ -20,17 +20,21 @@ __status__ = "Development"
class
Tag
(
object
):
"""
Represents the tag in a ControlHost Prefix.
"""
SIZE
=
8
def
__init__
(
self
,
data
=
None
):
self
.
_data
=
b
''
self
.
data
=
data
@property
def
data
(
self
):
"""
The byte data
"""
return
self
.
_data
@data.setter
def
data
(
self
,
value
):
"""
Set the byte data and fill up the bytes to fit the size.
"""
if
not
value
:
value
=
b
''
if
len
(
value
)
>
self
.
SIZE
:
...
...
@@ -47,8 +51,10 @@ class Tag(object):
class
Prefix
(
object
):
"""
The prefix of a ControlHost message.
"""
pass
class
Message
(
object
):
"""
The representation of a ControlHost message.
"""
pass
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
sign in
to comment