Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CCS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor 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
Marko Mecina
CCS
Commits
4f048aef
Commit
4f048aef
authored
1 year ago
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
add getters for recv/proc data to Connector
parent
593af951
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Ccs/communication.py
+20
-1
20 additions, 1 deletion
Ccs/communication.py
with
20 additions
and
1 deletion
Ccs/communication.py
+
20
−
1
View file @
4f048aef
...
...
@@ -4,6 +4,7 @@
General purpose socket communication utilities
"""
import
io
import
queue
import
select
import
socket
...
...
@@ -191,6 +192,20 @@ class Connector:
self
.
receiver
.
stop
()
self
.
receiver
=
None
@property
def
recvd_data
(
self
):
if
self
.
receiver
is
None
:
return
return
self
.
receiver
.
recvd_data_buf
.
queue
@property
def
proc_data
(
self
):
if
self
.
receiver
is
None
:
return
return
self
.
receiver
.
proc_data
class
Receiver
:
"""
...
...
@@ -287,6 +302,9 @@ class Receiver:
self
.
proc_data_fd
.
write
(
procdata
)
else
:
self
.
proc_data_fd
.
write
(
str
(
procdata
))
except
io
.
UnsupportedOperation
as
err
:
print
(
err
)
break
except
Exception
as
err
:
self
.
proc_data_fd
.
write
(
'
# {} #
\n
'
.
format
(
err
))
continue
...
...
@@ -300,7 +318,8 @@ class Receiver:
self
.
_isrunning
=
False
print
(
'
Processing stopped
'
)
self
.
proc_data_fd
.
close
()
if
self
.
proc_data_fd
is
not
None
:
self
.
proc_data_fd
.
close
()
def
_msgdecoder
(
msg
,
fmt
,
sep
=
''
):
...
...
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