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
2597e522
Commit
2597e522
authored
1 year ago
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
update athena fpm interface lib
parent
a10b642e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Ccs/packet_config_ATHENA.py
+2
-0
2 additions, 0 deletions
Ccs/packet_config_ATHENA.py
Ccs/packet_config_ATHENA_DE.py
+19
-8
19 additions, 8 deletions
Ccs/packet_config_ATHENA_DE.py
Ccs/scripts/wfi_de_communication.py
+13
-4
13 additions, 4 deletions
Ccs/scripts/wfi_de_communication.py
with
34 additions
and
12 deletions
Ccs/packet_config_ATHENA.py
+
2
−
0
View file @
2597e522
...
...
@@ -174,6 +174,8 @@ def calc_timestamp(time, sync=None, return_bytes=False):
class
RawGetterSetter
:
bin
=
0
@property
def
raw
(
self
):
return
bytes
(
self
.
bin
)
...
...
This diff is collapsed.
Click to expand it.
Ccs/packet_config_ATHENA_DE.py
+
19
−
8
View file @
2597e522
...
...
@@ -85,46 +85,53 @@ class CommandBase(ctypes.Union, RawGetterSetter):
]
class
HkCmd
Send
(
CommandBase
):
class
HkCmd
Write
(
CommandBase
):
def
__init__
(
self
,
addr
,
data
):
super
(
HkCmd
Send
).
__init__
()
super
(
HkCmd
Write
).
__init__
()
self
.
items
.
ifaddr
=
IfAddr
.
HK
self
.
items
.
addr
=
addr
self
.
items
.
txrx
=
CmdDir
.
SEND
self
.
items
.
cmddata
=
data
class
HkCmdRe
cv
(
CommandBase
):
class
HkCmdRe
ad
(
CommandBase
):
def
__init__
(
self
,
addr
):
super
(
HkCmdRe
cv
).
__init__
()
super
(
HkCmdRe
ad
).
__init__
()
self
.
items
.
ifaddr
=
IfAddr
.
HK
self
.
items
.
addr
=
addr
self
.
items
.
txrx
=
CmdDir
.
RECV
self
.
items
.
cmddata
=
0
class
Cmd
Send
(
CommandBase
):
class
Cmd
Write
(
CommandBase
):
def
__init__
(
self
,
addr
,
data
):
super
(
Cmd
Send
).
__init__
()
super
(
Cmd
Write
).
__init__
()
self
.
items
.
ifaddr
=
IfAddr
.
CMD
self
.
items
.
addr
=
addr
self
.
items
.
txrx
=
CmdDir
.
SEND
self
.
items
.
cmddata
=
data
class
CmdRe
cv
(
CommandBase
):
class
CmdRe
ad
(
CommandBase
):
def
__init__
(
self
,
addr
):
super
(
CmdRe
cv
).
__init__
()
super
(
CmdRe
ad
).
__init__
()
self
.
items
.
ifaddr
=
IfAddr
.
CMD
self
.
items
.
addr
=
addr
self
.
items
.
txrx
=
CmdDir
.
RECV
self
.
items
.
cmddata
=
0
# aliases for script backwards-compatibility
CmdSend
=
CmdWrite
CmdRecv
=
CmdRead
HkCmdSend
=
HkCmdWrite
HkCmdRecv
=
HkCmdRead
class
Ack
:
def
__init__
(
self
,
raw
=
bytes
(
ACK_LEN
)):
...
...
@@ -388,6 +395,10 @@ class SciCmd:
def
raw
(
self
,
rawdata
):
self
.
_raw
=
rawdata
@property
def
hex
(
self
):
return
self
.
_raw
.
hex
(
'
'
).
upper
()
@property
def
ifaddr
(
self
):
return
self
.
_raw
[
0
]
...
...
This diff is collapsed.
Click to expand it.
Ccs/scripts/wfi_de_communication.py
+
13
−
4
View file @
2597e522
...
...
@@ -10,10 +10,19 @@ decon = com.Connector('', 12345, msgdecoding='hex')
decon
.
connect
()
# example commands
decon
.
send
(
b
'
\x20\xDE\xAD
'
)
# test echo interface (0x20)
decon
.
send
(
de
.
HkCmdRecv
(
0x1000
))
# get PCM MODE register
decon
.
send
(
de
.
CmdSend
(
0x3C00
,
1
))
# write sequencer register
decon
.
send
(
de
.
CmdSend
(
0x3C00
,
1
),
rx
=
False
)
# write sequencer register, but don't fetch cmd response from socket
# test echo interface (0x20)
decon
.
send
(
b
'
\x20\xDE\xAD
'
)
# HK interface 0x33
decon
.
send
(
de
.
HkCmdRead
(
0x1000
))
# get PCM MODE register
decon
.
send
(
de
.
HkCmdWrite
(
0x1000
,
0x0001
))
# set PCM MODE register
# CMD interface 0x34
decon
.
send
(
de
.
CmdWrite
(
0x3C00
,
0x0001
))
# write sequencer register
decon
.
send
(
de
.
CmdWrite
(
0x3C00
,
1
),
rx
=
False
)
# write sequencer register, but don't fetch cmd response from socket
decon
.
send
(
de
.
CmdRead
(
0x3C00
))
# read sequencer register
# SCI interface 0x35
decon
.
send
(
de
.
SciCmd
(
100
))
# set science data output rate
# dump cmd log (decon.log)
...
...
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