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
545f7015
Commit
545f7015
authored
1 year ago
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
Hide 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
"""
General purpose socket communication utilit
y function
s
General purpose socket communication utilit
ie
s
"""
import
queue
...
...
@@ -12,6 +12,10 @@ import time
class
Connector
:
"""
Utility class for bidirectional socket handling
"""
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
):
...
...
@@ -156,6 +160,11 @@ class Connector:
self
.
response_to
=
seconds
def
start_receiver
(
self
,
procfunc
=
None
):
"""
:param procfunc: function that must return a list
:return:
"""
if
self
.
conn
is
None
:
print
(
'
No connection
'
)
return
...
...
@@ -168,6 +177,9 @@ class Connector:
class
Receiver
:
"""
Reads and processes data from sockets
"""
RECV_BYTES
=
4096
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):
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
):
pkts
=
rawdata
.
split
(
EOP
)
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
register
or
sign in
to comment