Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dtdaq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniele Nicolodi
dtdaq
Compare revisions
8730896ffe4bd6203ae62d602b524a92fc96db9d to 1e44d5d468af5521c1a1ea6ee7ea3eb513e95046
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dnn/dtdaq
Select target project
No results found
1e44d5d468af5521c1a1ea6ee7ea3eb513e95046
Select Git revision
Branches
master
1 result
Swap
Target
dnn/dtdaq
Select target project
dnn/dtdaq
1 result
8730896ffe4bd6203ae62d602b524a92fc96db9d
Select Git revision
Branches
master
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source
2
Add DLL error codes and improve DLL function return code checks
· 1e3a35e9
Daniele Nicolodi
authored
Aug 17, 2022
1e3a35e9
Improve error reporting when no device is found
· 1e44d5d4
Daniele Nicolodi
authored
Aug 17, 2022
1e44d5d4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
dtdaq/__init__.py
+1
-1
1 addition, 1 deletion
dtdaq/__init__.py
dtdaq/__main__.py
+8
-3
8 additions, 3 deletions
dtdaq/__main__.py
dtdaq/dtdaq.py
+239
-60
239 additions, 60 deletions
dtdaq/dtdaq.py
dtdaq/enumerate.py
+8
-3
8 additions, 3 deletions
dtdaq/enumerate.py
with
256 additions
and
67 deletions
dtdaq/__init__.py
View file @
1e44d5d4
from
.dtdaq
import
DTDaq
from
.dtdaq
import
DTDaq
,
DTDaqError
,
errno
This diff is collapsed.
Click to expand it.
dtdaq/__main__.py
View file @
1e44d5d4
...
...
@@ -6,7 +6,7 @@ import time
import
click
import
colorama
from
.
dtdaq
import
DTD
aq
from
.
import
dtd
aq
@click.command
()
...
...
@@ -18,8 +18,13 @@ from .dtdaq import DTDaq
def
main
(
device
,
fsampl
,
channel
,
gain
,
filename
):
colorama
.
init
()
daq
=
DTDaq
(
device
.
encode
(
'
ascii
'
))
try
:
daq
=
dtdaq
.
DTDaq
(
device
.
encode
(
'
ascii
'
))
print
(
f
'
{
daq
.
name
}
{
daq
.
version
}
0x
{
daq
.
hwinfo
.
serial
:
X
}
'
)
except
dtdaq
.
DTDaqError
as
exc
:
if
exc
.
errno
==
dtdaq
.
errno
.
OLCANNOTOPENDRIVER
:
return
click
.
echo
(
f
'
Error:
{
exc
.
message
}
. Device
"
{
device
}
"
not found.
'
,
err
=
True
)
raise
if
len
(
gain
)
==
1
:
gain
=
list
(
gain
)
*
len
(
channel
)
...
...
This diff is collapsed.
Click to expand it.
dtdaq/dtdaq.py
View file @
1e44d5d4
This diff is collapsed.
Click to expand it.
dtdaq/enumerate.py
View file @
1e44d5d4
import
click
from
.
dtdaq
import
enum_boards
from
.
import
dtdaq
@click.command
()
def
main
():
for
board
in
enum_boards
():
try
:
for
board
in
dtdaq
.
enumerate_devices
():
print
(
board
.
name
)
except
dtdaq
.
DTDaqError
as
exc
:
if
exc
.
errno
==
dtdaq
.
errno
.
OLNOBOARDSINSTALLED
:
return
print
(
f
'
{
exc
.
message
}
.
'
)
raise
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.