Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Programmable RF Attenuator
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Programmable RF Attenuator
Commits
bf6ef84a
Commit
bf6ef84a
authored
Nov 09, 2021
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use a more sophisticated solid fetch logic
parent
1b97efa7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
oautest
software/lib/oautest
+21
-3
No files found.
software/lib/oautest
View file @
bf6ef84a
...
...
@@ -44,14 +44,32 @@ class OauTest(cmd.Cmd):
def
__init__
(
self
):
cmd
.
Cmd
.
__init__
(
self
)
self
.
solib
=
'./liboasis-usb-att.so'
self
.
history
=
os
.
path
.
expanduser
(
'~/.oau_history'
)
self
.
api
=
CDLL
(
self
.
solib
)
self
.
lun
=
None
self
.
fd
=
None
self
.
nchannels
=
None
self
.
load_solib
()
self
.
fill_devarray
()
def
load_solib
(
self
):
"""try to load attn dyn library from script dir or ../lib."""
self
.
solib
=
'./liboasis-usb-att.so'
scriptdir
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
rootdir
=
os
.
path
.
dirname
(
scriptdir
)
libdir
=
os
.
path
.
join
(
rootdir
,
'lib'
,
self
.
solib
)
self
.
history
=
os
.
path
.
expanduser
(
'~/.oau_history'
)
try
:
self
.
api
=
CDLL
(
self
.
solib
)
except
OSError
as
e
:
pass
try
:
self
.
api
=
CDLL
(
libdir
)
except
OSError
as
e
:
print
(
'cannot load oattn solib, exiting'
)
exit
()
def
fill_devarray
(
self
):
self
.
api
.
oau_get_devarray
.
restype
=
POINTER
(
DevArray
)
self
.
devarray
=
self
.
api
.
oau_get_devarray
(
b
'1556'
,
b
'0443'
)
...
...
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