Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
16b89f80
Commit
16b89f80
authored
Sep 07, 2021
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add get_channel_enable command to cli
parent
1944f630
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
ertm-cli
libertm/ertm-cli
+19
-0
No files found.
libertm/ertm-cli
View file @
16b89f80
...
...
@@ -339,6 +339,25 @@ class ErtmTest(cmd.Cmd):
print
(
'error {} in disable_channel: {}'
.
format
(
err
,
msg
))
return
def
do_get_channel_enable
(
self
,
args
):
"display channel enable/disable status"
try
:
conn
,
channel
=
args
.
split
()
connector
=
self
.
connector_idx
[
conn
.
lower
()]
channel
=
int
(
channel
)
except
(
ValueError
,
KeyError
)
as
e
:
print
(
'usage: get_channel_enable/gce {clka|clkb|lo|ref} channel'
)
return
state
=
c_uint
(
0
)
err
=
self
.
lib
.
ertm_get_enable_state
(
self
.
handle
,
connector
,
channel
,
byref
(
state
))
if
err
:
msg
=
self
.
errmsg
(
err
)
print
(
'error {} in get_channel_enable: {}'
.
format
(
err
,
msg
))
return
st
=
state
.
value
print
(
"{:s}{:02d}: {:s} ({:d})"
.
format
(
conn
.
upper
(),
channel
,
"on"
if
st
else
"off"
,
st
))
def
do_get_level_adjust
(
self
,
args
):
"display amplification level of connector."
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment