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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Mecina
CCS
Commits
545f7015
Commit
545f7015
authored
Jul 5, 2023
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
add IWF EGSE signal mnemonics
parent
0ad62a9d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Ccs/communication.py
+13
-1
13 additions, 1 deletion
Ccs/communication.py
Ccs/iwf_egse.py
+17
-0
17 additions, 0 deletions
Ccs/iwf_egse.py
with
30 additions
and
1 deletion
Ccs/communication.py
+
13
−
1
View file @
545f7015
#!/usr/bin/env python3
#!/usr/bin/env python3
"""
"""
General purpose socket communication utilit
y function
s
General purpose socket communication utilit
ie
s
"""
"""
import
queue
import
queue
...
@@ -12,6 +12,10 @@ import time
...
@@ -12,6 +12,10 @@ import time
class
Connector
:
class
Connector
:
"""
Utility class for bidirectional socket handling
"""
RECV_NBYTES
=
4096
RECV_NBYTES
=
4096
def
__init__
(
self
,
host
,
port
,
is_server
=
False
,
response_to
=
2
,
recv_nbytes_min
=
0
,
save_to_file
=
None
,
msgdecoding
=
'
hex
'
,
resp_decoder
=
None
):
def
__init__
(
self
,
host
,
port
,
is_server
=
False
,
response_to
=
2
,
recv_nbytes_min
=
0
,
save_to_file
=
None
,
msgdecoding
=
'
hex
'
,
resp_decoder
=
None
):
...
@@ -156,6 +160,11 @@ class Connector:
...
@@ -156,6 +160,11 @@ class Connector:
self
.
response_to
=
seconds
self
.
response_to
=
seconds
def
start_receiver
(
self
,
procfunc
=
None
):
def
start_receiver
(
self
,
procfunc
=
None
):
"""
:param procfunc: function that must return a list
:return:
"""
if
self
.
conn
is
None
:
if
self
.
conn
is
None
:
print
(
'
No connection
'
)
print
(
'
No connection
'
)
return
return
...
@@ -168,6 +177,9 @@ class Connector:
...
@@ -168,6 +177,9 @@ class Connector:
class
Receiver
:
class
Receiver
:
"""
Reads and processes data from sockets
"""
RECV_BYTES
=
4096
RECV_BYTES
=
4096
SEL_TIMEOUT
=
2
SEL_TIMEOUT
=
2
...
...
This diff is collapsed.
Click to expand it.
Ccs/iwf_egse.py
+
17
−
0
View file @
545f7015
...
@@ -303,6 +303,23 @@ def _hexasciify(value, nchars, signed=False):
...
@@ -303,6 +303,23 @@ def _hexasciify(value, nchars, signed=False):
return
value
return
value
class
Signal
:
EGSE_PSU_OK
=
1
EGSE_FEE_DIG_OK
=
2
EGSE_RSE_OK
=
3
EGSE_PIN_PULL_OK
=
4
EGSE_FEE_ANA_OK
=
5
EGSE_I_FEE
=
1
EGSE_I_PSU
=
2
EGSE_I_HEATER
=
3
EGSE_I_RSE
=
4
FEE_Thermistor
=
1
CDD_Thermistor
=
2
def
response_proc_func
(
rawdata
):
def
response_proc_func
(
rawdata
):
pkts
=
rawdata
.
split
(
EOP
)
pkts
=
rawdata
.
split
(
EOP
)
pkts
.
remove
(
b
''
)
pkts
.
remove
(
b
''
)
...
...
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