Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Raptor Engineering Public Development
dsview
Commits
5f852de0
Commit
5f852de0
authored
May 09, 2014
by
DreamSourceLab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.21
parent
8baccbd8
Changes
49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
733 additions
and
467 deletions
+733
-467
DSLogic-gui/CMakeLists.txt
DSLogic-gui/CMakeLists.txt
+1
-2
DSLogic-gui/main.cpp
DSLogic-gui/main.cpp
+8
-8
DSLogic-gui/pv/data/analog.cpp
DSLogic-gui/pv/data/analog.cpp
+2
-2
DSLogic-gui/pv/data/analogsnapshot.cpp
DSLogic-gui/pv/data/analogsnapshot.cpp
+5
-5
DSLogic-gui/pv/data/dso.cpp
DSLogic-gui/pv/data/dso.cpp
+2
-2
DSLogic-gui/pv/data/dsosnapshot.cpp
DSLogic-gui/pv/data/dsosnapshot.cpp
+5
-5
DSLogic-gui/pv/data/group.cpp
DSLogic-gui/pv/data/group.cpp
+2
-2
DSLogic-gui/pv/data/groupsnapshot.cpp
DSLogic-gui/pv/data/groupsnapshot.cpp
+7
-7
DSLogic-gui/pv/data/logic.cpp
DSLogic-gui/pv/data/logic.cpp
+2
-2
DSLogic-gui/pv/data/logicsnapshot.cpp
DSLogic-gui/pv/data/logicsnapshot.cpp
+7
-7
DSLogic-gui/pv/data/snapshot.cpp
DSLogic-gui/pv/data/snapshot.cpp
+7
-7
DSLogic-gui/pv/decoder/ds1wire.cpp
DSLogic-gui/pv/decoder/ds1wire.cpp
+5
-5
DSLogic-gui/pv/decoder/dsdmx512.cpp
DSLogic-gui/pv/decoder/dsdmx512.cpp
+5
-5
DSLogic-gui/pv/decoder/dsi2c.cpp
DSLogic-gui/pv/decoder/dsi2c.cpp
+6
-6
DSLogic-gui/pv/decoder/dsserial.cpp
DSLogic-gui/pv/decoder/dsserial.cpp
+6
-6
DSLogic-gui/pv/decoder/dsspi.cpp
DSLogic-gui/pv/decoder/dsspi.cpp
+6
-6
DSLogic-gui/pv/dialogs/deviceoptions.cpp
DSLogic-gui/pv/dialogs/deviceoptions.cpp
+17
-5
DSLogic-gui/pv/dialogs/deviceoptions.h
DSLogic-gui/pv/dialogs/deviceoptions.h
+2
-0
DSLogic-gui/pv/dialogs/search.cpp
DSLogic-gui/pv/dialogs/search.cpp
+32
-10
DSLogic-gui/pv/dialogs/search.h
DSLogic-gui/pv/dialogs/search.h
+5
-5
DSLogic-gui/pv/dock/triggerdock.cpp
DSLogic-gui/pv/dock/triggerdock.cpp
+11
-11
DSLogic-gui/pv/prop/binding/binding_deviceoptions.cpp
DSLogic-gui/pv/prop/binding/binding_deviceoptions.cpp
+5
-5
DSLogic-gui/pv/sigsession.cpp
DSLogic-gui/pv/sigsession.cpp
+57
-54
DSLogic-gui/pv/toolbars/devicebar.cpp
DSLogic-gui/pv/toolbars/devicebar.cpp
+4
-4
DSLogic-gui/pv/toolbars/samplingbar.cpp
DSLogic-gui/pv/toolbars/samplingbar.cpp
+1
-1
DSLogic-gui/pv/view/analogsignal.cpp
DSLogic-gui/pv/view/analogsignal.cpp
+5
-5
DSLogic-gui/pv/view/dsosignal.cpp
DSLogic-gui/pv/view/dsosignal.cpp
+5
-5
DSLogic-gui/pv/view/groupsignal.cpp
DSLogic-gui/pv/view/groupsignal.cpp
+6
-6
DSLogic-gui/pv/view/header.cpp
DSLogic-gui/pv/view/header.cpp
+16
-16
DSLogic-gui/pv/view/logicsignal.cpp
DSLogic-gui/pv/view/logicsignal.cpp
+3
-3
DSLogic-gui/pv/view/protocolsignal.cpp
DSLogic-gui/pv/view/protocolsignal.cpp
+3
-3
DSLogic-gui/pv/view/ruler.cpp
DSLogic-gui/pv/view/ruler.cpp
+3
-3
DSLogic-gui/pv/view/view.cpp
DSLogic-gui/pv/view/view.cpp
+13
-7
DSLogic-gui/pv/view/viewport.cpp
DSLogic-gui/pv/view/viewport.cpp
+10
-10
DSLogic-gui/res/DSLogic.bin
DSLogic-gui/res/DSLogic.bin
+0
-0
DSLogic-gui/stylesheet.qss
DSLogic-gui/stylesheet.qss
+1
-1
NEWS
NEWS
+8
-0
libsigrok4DSLogic/Makefile.in
libsigrok4DSLogic/Makefile.in
+38
-12
libsigrok4DSLogic/aclocal.m4
libsigrok4DSLogic/aclocal.m4
+20
-30
libsigrok4DSLogic/configure
libsigrok4DSLogic/configure
+160
-160
libsigrok4DSLogic/hardware/DSLogic/Makefile.in
libsigrok4DSLogic/hardware/DSLogic/Makefile.in
+23
-1
libsigrok4DSLogic/hardware/DSLogic/dslogic.c
libsigrok4DSLogic/hardware/DSLogic/dslogic.c
+40
-12
libsigrok4DSLogic/hardware/Makefile.in
libsigrok4DSLogic/hardware/Makefile.in
+27
-8
libsigrok4DSLogic/hardware/common/Makefile.in
libsigrok4DSLogic/hardware/common/Makefile.in
+23
-1
libsigrok4DSLogic/hardware/demo/Makefile.in
libsigrok4DSLogic/hardware/demo/Makefile.in
+23
-1
libsigrok4DSLogic/input/Makefile.in
libsigrok4DSLogic/input/Makefile.in
+23
-1
libsigrok4DSLogic/output/Makefile.in
libsigrok4DSLogic/output/Makefile.in
+27
-8
libsigrok4DSLogic/output/text/Makefile.in
libsigrok4DSLogic/output/text/Makefile.in
+23
-1
libsigrok4DSLogic/tests/Makefile.in
libsigrok4DSLogic/tests/Makefile.in
+23
-1
No files found.
DSLogic-gui/CMakeLists.txt
View file @
5f852de0
...
...
@@ -86,7 +86,7 @@ set(DS_DESCRIPTION "A GUI for DSLogic")
set
(
DS_VERSION_MAJOR 0
)
set
(
DS_VERSION_MINOR 2
)
set
(
DS_VERSION_MICRO
0
)
set
(
DS_VERSION_MICRO
1
)
set
(
DS_VERSION_STRING
${
DS_VERSION_MAJOR
}
.
${
DS_VERSION_MINOR
}
.
${
DS_VERSION_MICRO
}
)
...
...
@@ -191,7 +191,6 @@ set(DSLogic_HEADERS
set
(
DSLogic_FORMS
pv/dialogs/about.ui
pv/dialogs/search.ui
pv/decoder/dmx512config.ui
pv/decoder/i2cconfig.ui
pv/decoder/serialconfig.ui
...
...
DSLogic-gui/main.cpp
View file @
5f852de0
...
...
@@ -61,9 +61,9 @@ int main(int argc, char *argv[])
QApplication
a
(
argc
,
argv
);
// Set some application metadata
QApplication
::
setApplicationVersion
(
DS_VERSION_STRING
);
QApplication
::
setApplicationName
(
"DSLogic(Beta)"
);
QApplication
::
setOrganizationDomain
(
"http://www.DreamSourceLab.com"
);
QApplication
::
setApplicationVersion
(
DS_VERSION_STRING
);
QApplication
::
setApplicationName
(
"DSLogic(Beta)"
);
QApplication
::
setOrganizationDomain
(
"http://www.DreamSourceLab.com"
);
// Parse arguments
while
(
1
)
{
...
...
@@ -134,11 +134,11 @@ int main(int argc, char *argv[])
pv
::
DeviceManager
device_manager
(
sr_ctx
);
// Initialise the main window
pv
::
MainWindow
w
(
device_manager
,
open_file
);
QFile
qss
(
":/stylesheet.qss"
);
qss
.
open
(
QFile
::
ReadOnly
);
a
.
setStyleSheet
(
qss
.
readAll
());
qss
.
close
();
pv
::
MainWindow
w
(
device_manager
,
open_file
);
QFile
qss
(
":/stylesheet.qss"
);
qss
.
open
(
QFile
::
ReadOnly
);
a
.
setStyleSheet
(
qss
.
readAll
());
qss
.
close
();
w
.
show
();
// Run the application
...
...
DSLogic-gui/pv/data/analog.cpp
View file @
5f852de0
...
...
@@ -35,12 +35,12 @@ Analog::Analog(unsigned int num_probes, uint64_t samplerate) :
{
}
void
Analog
::
push_snapshot
(
shared_ptr
<
AnalogSnapshot
>
&
snapshot
)
void
Analog
::
push_snapshot
(
boost
::
shared_ptr
<
AnalogSnapshot
>
&
snapshot
)
{
_snapshots
.
push_front
(
snapshot
);
}
deque
<
shared_ptr
<
AnalogSnapshot
>
>&
Analog
::
get_snapshots
()
deque
<
boost
::
shared_ptr
<
AnalogSnapshot
>
>&
Analog
::
get_snapshots
()
{
return
_snapshots
;
}
...
...
DSLogic-gui/pv/data/analogsnapshot.cpp
View file @
5f852de0
...
...
@@ -49,7 +49,7 @@ const uint64_t AnalogSnapshot::EnvelopeDataUnit = 64*1024; // bytes
AnalogSnapshot
::
AnalogSnapshot
(
const
sr_datafeed_analog
&
analog
,
uint64_t
_total_sample_len
,
unsigned
int
channel_num
)
:
Snapshot
(
sizeof
(
uint16_t
),
_total_sample_len
,
channel_num
)
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
memset
(
_envelope_levels
,
0
,
sizeof
(
_envelope_levels
));
init
(
_total_sample_len
*
channel_num
);
append_payload
(
analog
);
...
...
@@ -57,7 +57,7 @@ AnalogSnapshot::AnalogSnapshot(const sr_datafeed_analog &analog, uint64_t _total
AnalogSnapshot
::~
AnalogSnapshot
()
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
BOOST_FOREACH
(
Envelope
&
e
,
_envelope_levels
[
0
])
free
(
e
.
samples
);
}
...
...
@@ -65,7 +65,7 @@ AnalogSnapshot::~AnalogSnapshot()
void
AnalogSnapshot
::
append_payload
(
const
sr_datafeed_analog
&
analog
)
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
append_data
(
analog
.
data
,
analog
.
num_samples
);
// Generate the first mip-map from the data
...
...
@@ -81,7 +81,7 @@ const uint16_t* AnalogSnapshot::get_samples(
assert
(
end_sample
<
(
int64_t
)
get_sample_count
());
assert
(
start_sample
<=
end_sample
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
// uint16_t *const data = new uint16_t[end_sample - start_sample];
// memcpy(data, (uint16_t*)_data + start_sample, sizeof(uint16_t) *
...
...
@@ -97,7 +97,7 @@ void AnalogSnapshot::get_envelope_section(EnvelopeSection &s,
assert
(
start
<=
end
);
assert
(
min_length
>
0
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
const
unsigned
int
min_level
=
max
((
int
)
floorf
(
logf
(
min_length
)
/
LogEnvelopeScaleFactor
)
-
1
,
0
);
...
...
DSLogic-gui/pv/data/dso.cpp
View file @
5f852de0
...
...
@@ -34,12 +34,12 @@ Dso::Dso(unsigned int num_probes, uint64_t samplerate) :
{
}
void
Dso
::
push_snapshot
(
shared_ptr
<
DsoSnapshot
>
&
snapshot
)
void
Dso
::
push_snapshot
(
boost
::
shared_ptr
<
DsoSnapshot
>
&
snapshot
)
{
_snapshots
.
push_front
(
snapshot
);
}
deque
<
shared_ptr
<
DsoSnapshot
>
>&
Dso
::
get_snapshots
()
deque
<
boost
::
shared_ptr
<
DsoSnapshot
>
>&
Dso
::
get_snapshots
()
{
return
_snapshots
;
}
...
...
DSLogic-gui/pv/data/dsosnapshot.cpp
View file @
5f852de0
...
...
@@ -48,7 +48,7 @@ const uint64_t DsoSnapshot::EnvelopeDataUnit = 64*1024; // bytes
DsoSnapshot
::
DsoSnapshot
(
const
sr_datafeed_dso
&
dso
,
uint64_t
_total_sample_len
,
unsigned
int
channel_num
)
:
Snapshot
(
sizeof
(
uint16_t
),
_total_sample_len
,
channel_num
)
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
memset
(
_envelope_levels
,
0
,
sizeof
(
_envelope_levels
));
init
(
_total_sample_len
*
channel_num
);
append_payload
(
dso
);
...
...
@@ -56,14 +56,14 @@ DsoSnapshot::DsoSnapshot(const sr_datafeed_dso &dso, uint64_t _total_sample_len,
DsoSnapshot
::~
DsoSnapshot
()
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
BOOST_FOREACH
(
Envelope
&
e
,
_envelope_levels
[
0
])
free
(
e
.
samples
);
}
void
DsoSnapshot
::
append_payload
(
const
sr_datafeed_dso
&
dso
)
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
append_data
(
dso
.
data
,
dso
.
num_samples
);
// Generate the first mip-map from the data
...
...
@@ -79,7 +79,7 @@ const uint16_t* DsoSnapshot::get_samples(
assert
(
end_sample
<
(
int64_t
)
get_sample_count
());
assert
(
start_sample
<=
end_sample
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
// uint16_t *const data = new uint16_t[end_sample - start_sample];
// memcpy(data, (uint16_t*)_data + start_sample, sizeof(uint16_t) *
...
...
@@ -95,7 +95,7 @@ void DsoSnapshot::get_envelope_section(EnvelopeSection &s,
assert
(
start
<=
end
);
assert
(
min_length
>
0
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
const
unsigned
int
min_level
=
max
((
int
)
floorf
(
logf
(
min_length
)
/
LogEnvelopeScaleFactor
)
-
1
,
0
);
...
...
DSLogic-gui/pv/data/group.cpp
View file @
5f852de0
...
...
@@ -35,12 +35,12 @@ Group::Group(unsigned int num_probes, uint64_t samplerate) :
{
}
void
Group
::
push_snapshot
(
shared_ptr
<
GroupSnapshot
>
&
snapshot
)
void
Group
::
push_snapshot
(
boost
::
shared_ptr
<
GroupSnapshot
>
&
snapshot
)
{
_snapshots
.
push_back
(
snapshot
);
}
deque
<
shared_ptr
<
GroupSnapshot
>
>&
Group
::
get_snapshots
()
deque
<
boost
::
shared_ptr
<
GroupSnapshot
>
>&
Group
::
get_snapshots
()
{
return
_snapshots
;
}
...
...
DSLogic-gui/pv/data/groupsnapshot.cpp
View file @
5f852de0
...
...
@@ -51,11 +51,11 @@ const uint16_t GroupSnapshot::value_mask[16] = {0x1, 0x2, 0x4, 0x8,
0x100
,
0x200
,
0x400
,
0x800
,
0x1000
,
0x2000
,
0x4000
,
0x8000
};
GroupSnapshot
::
GroupSnapshot
(
const
shared_ptr
<
LogicSnapshot
>
&
_logic_snapshot
,
std
::
list
<
int
>
index_list
)
GroupSnapshot
::
GroupSnapshot
(
const
boost
::
shared_ptr
<
LogicSnapshot
>
&
_logic_snapshot
,
std
::
list
<
int
>
index_list
)
{
assert
(
_logic_snapshot
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
memset
(
_envelope_levels
,
0
,
sizeof
(
_envelope_levels
));
_data
=
_logic_snapshot
->
get_data
();
_sample_count
=
_logic_snapshot
->
get_sample_count
();
...
...
@@ -66,20 +66,20 @@ GroupSnapshot::GroupSnapshot(const shared_ptr<LogicSnapshot> &_logic_snapshot, s
GroupSnapshot
::~
GroupSnapshot
()
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
BOOST_FOREACH
(
Envelope
&
e
,
_envelope_levels
)
free
(
e
.
samples
);
}
uint64_t
GroupSnapshot
::
get_sample_count
()
const
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
return
_sample_count
;
}
void
GroupSnapshot
::
append_payload
()
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
// Generate the first mip-map from the data
append_payload_to_envelope_levels
();
...
...
@@ -96,7 +96,7 @@ const uint16_t* GroupSnapshot::get_samples(
int64_t
i
;
uint64_t
pow
;
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
uint16_t
*
const
data
=
new
uint16_t
[
end_sample
-
start_sample
];
// memcpy(data, (uint16_t*)_data + start_sample, sizeof(uint16_t) *
...
...
@@ -121,7 +121,7 @@ void GroupSnapshot::get_envelope_section(EnvelopeSection &s,
assert
(
start
<=
end
);
assert
(
min_length
>
0
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
const
unsigned
int
min_level
=
max
((
int
)
floorf
(
logf
(
min_length
)
/
LogEnvelopeScaleFactor
)
-
1
,
0
);
...
...
DSLogic-gui/pv/data/logic.cpp
View file @
5f852de0
...
...
@@ -37,12 +37,12 @@ Logic::Logic(unsigned int num_probes, uint64_t samplerate) :
}
void
Logic
::
push_snapshot
(
shared_ptr
<
LogicSnapshot
>
&
snapshot
)
boost
::
shared_ptr
<
LogicSnapshot
>
&
snapshot
)
{
_snapshots
.
push_front
(
snapshot
);
}
deque
<
shared_ptr
<
LogicSnapshot
>
>&
Logic
::
get_snapshots
()
deque
<
boost
::
shared_ptr
<
LogicSnapshot
>
>&
Logic
::
get_snapshots
()
{
return
_snapshots
;
}
...
...
DSLogic-gui/pv/data/logicsnapshot.cpp
View file @
5f852de0
...
...
@@ -47,7 +47,7 @@ LogicSnapshot::LogicSnapshot(const sr_datafeed_logic &logic, uint64_t _total_sam
Snapshot
(
logic
.
unitsize
,
_total_sample_len
,
channel_num
),
_last_append_sample
(
0
)
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
memset
(
_mip_map
,
0
,
sizeof
(
_mip_map
));
if
(
init
(
_total_sample_len
*
channel_num
)
==
SR_OK
)
append_payload
(
logic
);
...
...
@@ -55,7 +55,7 @@ LogicSnapshot::LogicSnapshot(const sr_datafeed_logic &logic, uint64_t _total_sam
LogicSnapshot
::~
LogicSnapshot
()
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
BOOST_FOREACH
(
MipMapLevel
&
l
,
_mip_map
)
free
(
l
.
data
);
}
...
...
@@ -66,7 +66,7 @@ void LogicSnapshot::append_payload(
assert
(
_unit_size
==
logic
.
unitsize
);
assert
((
logic
.
length
%
_unit_size
)
==
0
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
append_data
(
logic
.
data
,
logic
.
length
/
_unit_size
);
...
...
@@ -194,7 +194,7 @@ void LogicSnapshot::get_subsampled_edges(
assert
(
sig_index
>=
0
);
assert
(
sig_index
<
64
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
const
uint64_t
block_length
=
(
uint64_t
)
max
(
min_length
,
1.0
f
);
const
unsigned
int
min_level
=
max
((
int
)
floorf
(
logf
(
min_length
)
/
...
...
@@ -378,7 +378,7 @@ int LogicSnapshot::get_first_edge(
assert
(
sig_index
>=
0
);
assert
(
sig_index
<
64
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
const
uint64_t
block_length
=
1
;
const
unsigned
int
min_level
=
0
;
...
...
@@ -550,7 +550,7 @@ void LogicSnapshot::get_edges(
assert
(
sig_index
>=
0
);
assert
(
sig_index
<
64
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
const
uint64_t
block_length
=
1
;
const
unsigned
int
min_level
=
0
;
...
...
@@ -706,7 +706,7 @@ uint64_t LogicSnapshot::get_min_pulse(uint64_t start, uint64_t end, int sig_inde
assert
(
sig_index
>=
0
);
assert
(
sig_index
<
64
);
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
const
uint64_t
block_length
=
1
;
const
unsigned
int
min_level
=
0
;
...
...
DSLogic-gui/pv/data/snapshot.cpp
View file @
5f852de0
...
...
@@ -40,13 +40,13 @@ Snapshot::Snapshot(int unit_size, uint64_t total_sample_count, unsigned int chan
_ring_sample_count
(
0
),
_unit_size
(
unit_size
)
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
assert
(
_unit_size
>
0
);
}
Snapshot
::~
Snapshot
()
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
if
(
_data
!=
NULL
)
free
(
_data
);
_data
=
NULL
;
...
...
@@ -73,31 +73,31 @@ bool Snapshot::buf_null() const
uint64_t
Snapshot
::
get_sample_count
()
const
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
return
_sample_count
/
_channel_num
;
}
void
*
Snapshot
::
get_data
()
const
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
return
_data
;
}
int
Snapshot
::
get_unit_size
()
const
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
return
_unit_size
;
}
unsigned
int
Snapshot
::
get_channel_num
()
const
{
lock_guard
<
recursive_mutex
>
lock
(
_mutex
);
boost
::
lock_guard
<
boost
::
recursive_mutex
>
lock
(
_mutex
);
return
_channel_num
;
}
void
Snapshot
::
append_data
(
void
*
data
,
uint64_t
samples
)
{
//
lock_guard<
recursive_mutex> lock(_mutex);
//
boost::lock_guard<boost::
recursive_mutex> lock(_mutex);
// _data = realloc(_data, (_sample_count + samples) * _unit_size +
// sizeof(uint64_t));
if
(
_sample_count
+
samples
<
_total_sample_count
)
...
...
DSLogic-gui/pv/decoder/ds1wire.cpp
View file @
5f852de0
...
...
@@ -53,7 +53,7 @@ const QString ds1Wire::StateTable[TableSize] = {
"DATA"
};
ds1Wire
::
ds1Wire
(
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
ds1Wire
::
ds1Wire
(
boost
::
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
Decoder
(
data
,
_sel_probes
,
_options_index
)
{
(
void
)
_options
;
...
...
@@ -91,12 +91,12 @@ void ds1Wire::decode()
_max_width
=
0
;
uint8_t
cur_state
=
Unknown
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
uint64_t
flag_index1
;
...
...
@@ -336,11 +336,11 @@ void ds1Wire::get_subsampled_states(std::vector<struct ds_view_state> &states,
{
ds_view_state
view_state
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
assert
(
end
<=
snapshot
->
get_sample_count
());
...
...
DSLogic-gui/pv/decoder/dsdmx512.cpp
View file @
5f852de0
...
...
@@ -53,7 +53,7 @@ const QString dsDmx512::StateTable[TableSize] = {
"SLOT"
};
dsDmx512
::
dsDmx512
(
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
dsDmx512
::
dsDmx512
(
boost
::
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
Decoder
(
data
,
_sel_probes
,
_options_index
)
{
(
void
)
_options
;
...
...
@@ -91,12 +91,12 @@ void dsDmx512::decode()
_max_width
=
0
;
uint8_t
cur_state
=
Unknown
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
//uint64_t flag_index;
...
...
@@ -261,11 +261,11 @@ void dsDmx512::get_subsampled_states(std::vector<struct ds_view_state> &states,
{
ds_view_state
view_state
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
assert
(
end
<=
snapshot
->
get_sample_count
());
...
...
DSLogic-gui/pv/decoder/dsi2c.cpp
View file @
5f852de0
...
...
@@ -52,7 +52,7 @@ const QString dsI2c::StateTable[TableSize] = {
"DATA"
};
dsI2c
::
dsI2c
(
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
dsI2c
::
dsI2c
(
boost
::
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
Decoder
(
data
,
_sel_probes
,
_options_index
)
{
(
void
)
_options
;
...
...
@@ -91,12 +91,12 @@ void dsI2c::decode()
_max_width
=
0
;
uint8_t
cur_state
=
Unknown
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
uint64_t
flag_index
;
...
...
@@ -185,7 +185,7 @@ void dsI2c::cmd_decode(const boost::shared_ptr<data::LogicSnapshot> &snapshot)
}
}
void
dsI2c
::
data_decode
(
const
shared_ptr
<
data
::
LogicSnapshot
>
&
snapshot
)
void
dsI2c
::
data_decode
(
const
boost
::
shared_ptr
<
data
::
LogicSnapshot
>
&
snapshot
)
{
uint8_t
cur_state
;
const
uint8_t
*
src_ptr
;
...
...
@@ -246,11 +246,11 @@ void dsI2c::get_subsampled_states(std::vector<struct ds_view_state> &states,
{
ds_view_state
view_state
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
assert
(
end
<=
snapshot
->
get_sample_count
());
...
...
DSLogic-gui/pv/decoder/dsserial.cpp
View file @
5f852de0
...
...
@@ -53,7 +53,7 @@ const QString dsSerial::StateTable[TableSize] = {
"DATA"
};
dsSerial
::
dsSerial
(
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
dsSerial
::
dsSerial
(
boost
::
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
Decoder
(
data
,
_sel_probes
,
_options_index
)
{
assert
(
_sel_probes
.
size
()
==
1
);
...
...
@@ -102,12 +102,12 @@ void dsSerial::decode()
assert
(
_data
);
uint8_t
cur_state
=
Unknown
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
uint64_t
flag_index
;
...
...
@@ -174,7 +174,7 @@ void dsSerial::decode()
}
void
dsSerial
::
data_decode
(
const
shared_ptr
<
data
::
LogicSnapshot
>
&
snapshot
,
uint64_t
start
,
uint64_t
stop
,
float
samplesPerBit
)
void
dsSerial
::
data_decode
(
const
boost
::
shared_ptr
<
data
::
LogicSnapshot
>
&
snapshot
,
uint64_t
start
,
uint64_t
stop
,
float
samplesPerBit
)
{
(
void
)
stop
;
...
...
@@ -238,11 +238,11 @@ void dsSerial::get_subsampled_states(std::vector<struct ds_view_state> &states,
{
ds_view_state
view_state
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
assert
(
end
<=
snapshot
->
get_sample_count
());
...
...
DSLogic-gui/pv/decoder/dsspi.cpp
View file @
5f852de0
...
...
@@ -45,7 +45,7 @@ const QString dsSpi::StateTable[TableSize] = {
"DATA"
};
dsSpi
::
dsSpi
(
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
dsSpi
::
dsSpi
(
boost
::
shared_ptr
<
data
::
Logic
>
data
,
std
::
list
<
int
>
_sel_probes
,
QMap
<
QString
,
QVariant
>
&
_options
,
QMap
<
QString
,
int
>
_options_index
)
:
Decoder
(
data
,
_sel_probes
,
_options_index
)
{
_cpol
=
_options
.
value
(
"cpol"
).
toBool
();
...
...
@@ -125,12 +125,12 @@ void dsSpi::decode()
_max_width
=
0
;
uint8_t
cur_state
=
Unknown
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
const
uint64_t
ssn_mask
=
1ULL
<<
_ssn_index
;
...
...
@@ -191,7 +191,7 @@ void dsSpi::decode()
}
}
void
dsSpi
::
data_decode
(
const
shared_ptr
<
data
::
LogicSnapshot
>
&
snapshot
)
void
dsSpi
::
data_decode
(
const
boost
::
shared_ptr
<
data
::
LogicSnapshot
>
&
snapshot
)
{
uint8_t
cur_state
;
const
uint8_t
*
src_ptr
;
...
...
@@ -256,11 +256,11 @@ void dsSpi::get_subsampled_states(std::vector<struct ds_view_state> &states,
{
ds_view_state
view_state
;
const
deque
<
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
const
deque
<
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
>
&
snapshots
=
_data
->
get_snapshots
();
if
(
snapshots
.
empty
())
return
;
const
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
const
boost
::
shared_ptr
<
pv
::
data
::
LogicSnapshot
>
&
snapshot
=
snapshots
.
front
();
assert
(
end
<=
snapshot
->
get_sample_count
());
...
...
DSLogic-gui/pv/dialogs/deviceoptions.cpp
View file @
5f852de0
...
...
@@ -50,6 +50,7 @@ DeviceOptions::DeviceOptions(QWidget *parent, struct sr_dev_inst *sdi) :
setWindowTitle
(
tr
(
"Configure Device"
));
setLayout
(
&
_layout
);
_last_mode
=
sdi
->
mode
;
_mode_comboBox
.
addItem
(
mode_strings
[
LOGIC
]);
_mode_comboBox
.
addItem
(
mode_strings
[
DSO
]);
_mode_comboBox
.
addItem
(
mode_strings
[
ANALOG
]);
...
...
@@ -78,10 +79,11 @@ void DeviceOptions::accept()
QDialog
::
accept
();
_last_mode
=
_sdi
->
mode
;
// Commit the properties
const
vector
<
shared_ptr
<
pv
::
prop
::
Property
>
>
&
properties
=
const
vector
<
boost
::
shared_ptr
<
pv
::
prop
::
Property
>
>
&
properties
=
_device_options_binding
.
properties
();
BOOST_FOREACH
(
shared_ptr
<
pv
::
prop
::
Property
>
p
,
properties
)
{
BOOST_FOREACH
(
boost
::
shared_ptr
<
pv
::
prop
::
Property
>
p
,
properties
)
{
assert
(
p
);
p
->
commit
();
}
...
...
@@ -97,6 +99,15 @@ void DeviceOptions::accept()
}
}
void
DeviceOptions
::
reject
()
{
using
namespace
Qt
;
QDialog
::
reject
();
// Mode Recovery
sr_config_set
(
_sdi
,
SR_CONF_DEVICE_MODE
,
g_variant_new_string
(
_mode_comboBox
.
itemText
(
_last_mode
).
toLocal8Bit
()));
}
QWidget
*
DeviceOptions
::
get_property_form
()
{
QWidget
*
const
form
=
new
QWidget
(
this
);
...
...
@@ -104,9 +115,9 @@ QWidget* DeviceOptions::get_property_form()
form
->
setLayout
(
layout
);
layout
->
addRow
(
"Device Mode"
,
&
_mode_comboBox
);
const
vector
<
shared_ptr
<
pv
::
prop
::
Property
>
>
&
properties
=
const
vector
<
boost
::
shared_ptr
<
pv
::
prop
::
Property
>
>
&
properties
=
_device_options_binding
.
properties
();
BOOST_FOREACH
(
shared_ptr
<
pv
::
prop
::
Property
>
p
,
properties
)
BOOST_FOREACH
(
boost
::
shared_ptr
<
pv
::
prop
::
Property
>
p
,
properties
)
{
assert
(
p
);
const
QString
label
=
p
->
labeled_widget
()
?
QString
()
:
p
->
name
();
...
...
@@ -183,7 +194,8 @@ void DeviceOptions::disable_all_probes()
void
DeviceOptions
::
mode_changed
(
QString
mode
)
{
sr_config_set
(
_sdi
,
SR_CONF_DEVICE_MODE
,
g_variant_new_string
(
mode
.
toLocal8Bit
()));
// Commit mode
sr_config_set
(
_sdi
,
SR_CONF_DEVICE_MODE
,
g_variant_new_string
(
_mode_comboBox
.
currentText
().
toLocal8Bit
()));
setup_probes
();
}
...
...
DSLogic-gui/pv/dialogs/deviceoptions.h
View file @
5f852de0
...
...
@@ -51,6 +51,7 @@ public:
protected:
void
accept
();
void
reject
();
private:
...
...
@@ -67,6 +68,7 @@ private slots:
private:
struct
sr_dev_inst
*
const
_sdi
;
int
_last_mode
;
QVBoxLayout
_layout
;
...
...
DSLogic-gui/pv/dialogs/search.cpp
View file @
5f852de0
...
...
@@ -22,33 +22,55 @@
#include "search.h"
#include "ui_search.h"
#include <assert.h>
#include <QRegExpValidator>
namespace
pv
{
namespace
dialogs
{
Search
::
Search
(
QWidget
*
parent
,
struct
sr_dev_inst
*
sdi
,
QString
pattern
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
Search
),
_sdi
(
sdi
)
{
assert
(
_sdi
);
ui
->
setupUi
(
this
);
QFont
font
(
"Monaco"
);
font
.
setStyleHint
(
QFont
::
Monospace
);
font
.
setFixedPitch
(
true
);
QRegExp
value_rx
(
"[10XRFCxrfc ]+"
);
QValidator
*
value_validator
=
new
QRegExpValidator
(
value_rx
,
this
);
//ui->_value_lineEdit->setText("X X X X X X X X X X X X X X X X");
ui
->
_value_lineEdit
->
setText
(
pattern
);
ui
->
_value_lineEdit
->
setValidator
(
value_validator
);