Commit Graph

197 Commits

Author SHA1 Message Date
Uwe Hermann ba7dd8bbb8 Replace 'probe' with 'channel' in most places.
Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 91aea754aa Rename 'struct sr_probe' to 'struct sr_channel' everywhere.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 67bd805523 Switch to a non-recursive automake setup.
Instead of >= 44 Makefile.am's we now only have one top-level
Makefile.am, and use the 'subdir-objects' automake option to
handle the build via non-recursive (auto)make.

This has the advantage of fewer (boilerplate or other) files and less
clutter in general, as well as performance advantages since the new
setup can build many files in parallel (with 'make -j'), not only 2 or 3
files within the same (e.g. hardware/xxxx/* subdirectory) and also since
we no longer need to build intermediate libtool helper libs per subdirectory.

A quick, non-scientific test build on a quad-core laptop with 'make -j 4'
yields a build time reduction from 35s to 19s.

All autotools features that worked before are still intact without any
regressions, including the Make targets 'install', 'uninstall', 'check',
'dist', 'clean', 'distclean' and so on, as well as all the usual portability
handling (build works on any OS, with any Make implementation such as
GNU Make or BSD Make, with any shell such as sh/ksh/zsh/bash/dash, etc. etc.)
and features such as out-of-tree build support, cross-compile support,
testsuite support (also with colored output), "silent make rules", etc. etc.
2014-03-20 13:10:05 +01:00
Daniel Elstner fb9e91aed4 output/vcd: Extend output stream to last sample.
(receive): Write a dummy timestamp after the last sample
to indicate the length of the sampled stream.
2014-02-05 01:18:05 +01:00
Daniel Elstner 191c7e5f4b vcd: Remove bogus $dumpvars and $dumpoff commands.
These commands are superfluous and do not seem to make sense in
the context they were used.  Also, $dumpvars was missing an $end,
and $dumpoff was used without any content.
2014-01-30 22:11:10 +01:00
Daniel Elstner 2b6363b433 vcd: Output timestamp only once per change.
Avoid writing a new timestamp for every changed signal if multiple
signals change state simultaneously.  Also, keep signal transitions
on the same line with their timestamp to make the output easier to
inspect in a text editor.  (VCD does not care whether newlines or
spaces are used to separate tokens.)
2014-01-30 21:57:49 +01:00
Daniel Elstner 563080a8d1 vcd: Fix output for more than 8 channels.
(receive): Use probe index for sample byte selection too, not just
for bit selection.  Also simplify the indexing expressions a bit.
This fixes the problem of incorrect output for probes indices 8 to
31.
Also, use double rather than float in the timestamp calculation,
and format the result directly as floating point number rather than
converting it back to uint64_t.
Additionally, make sure that the state of all signals is written
for the very first sample in the stream.  This fixes the problem
that signals would be displayed as indeterminate until the first
change.
(context.samplecount): Make the sample counter part of the context
struct, rather than keeping it as a global static.
2014-01-30 21:23:26 +01:00
Bert Vermeulen e36aae989c output/csv: Drop last separators as needed. 2014-01-23 23:11:34 +01:00
Bert Vermeulen 54da58ca9b output/csv: Drop extra separator on every line. 2014-01-22 02:44:52 +01:00
Bert Vermeulen e96cf218c0 output/csv: Get rid of 64-probe limit. 2014-01-22 02:34:56 +01:00
Bert Vermeulen 4829d37d6a output/csv: Use new output API. 2014-01-22 01:14:26 +01:00
Aurelien Jacobs 365cca8aca gnuplot: proper error message when using gnuplot output without logic probe 2014-01-14 22:59:33 +01:00
Uwe Hermann 641d8f276c output/analog: Add missing space (consistency). 2014-01-01 17:38:05 +01:00
Bert Vermeulen 3699a8a1ff Skip analog probes in logic-only output formats. 2013-12-29 10:57:38 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Aurelien Jacobs f5027ca481 add support for AVG mqflag 2013-12-23 01:21:51 +01:00
Bert Vermeulen 3453970079 output/csv: Fix wrong cast. 2013-11-26 22:23:37 +01:00
poljar (Damir Jelić) 8c273ac57c output/text: Fix memory leak of internal state buffers.
The text output module keeps buffers for internal state, upon receiving a DF_END
packet it frees the internal context but the buffers are never freed.

This adds a text_cleanup() helper function and registers it as the cleanup
function within all the text output modules.
2013-11-20 22:03:02 +01:00
Bert Vermeulen d3c74a6fb0 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:18 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Uwe Hermann d69d26429f output/analog: SR_UNIT_REVOLUTIONS_PER_MINUTE: Add missing break. 2013-11-04 01:14:57 +01:00
Aurelien Jacobs 45315d0460 add energy meter device type and related units 2013-10-24 15:41:11 +01:00
Aurelien Jacobs 87532f23a4 output/analog: add revolutions per minute unit 2013-10-07 00:36:18 +02:00
Uwe Hermann e6523173cf output/analog: Support all known MQFLAGs. 2013-08-30 16:11:33 +02:00
Uwe Hermann adf33ecce5 csv output: Fix incorrect ordering of the probes.
The comment for the CSV output module says probes are ordered e.g.
0,1,2,3, but the actual values were in the 3,2,1,0 order.

We're fixing this by making the order of the probe values 0,1,2,3 too
for now, but this will become a configurable option later on.

Thanks Patrick Servello <patrick.servello@gmail.com> for the patch.
2013-05-22 14:58:09 +02:00
Uwe Hermann 29a27196a1 s/DRIVER_LOG_DOMAIN/LOG_PREFIX/.
This is more correct anyway, and also a bit shorter and more readable.
2013-05-03 21:59:32 +02:00
Uwe Hermann 06c45a66f7 Minor whitespace fixes. 2013-05-03 14:03:49 +02:00
Bert Vermeulen af51a7718e output: Use sr_config_get() wrapper
This obviates the need for a valid driver, and thus makes converting
from any (non-sr) input format to any output format possible; the only
thing missing is the samplerate.

Fixes bug 105.
2013-04-30 16:03:37 +02:00
Bert Vermeulen 17f63de642 Fix output API receive() function
This changes the new output API's recv() to receive(), and has it
return an integer status code. The output of the function, if any,
is stored in a new parameter as a pointer to a newly allocated GString.

All output modules using this API have been adjusted.
2013-04-27 17:29:46 +02:00
Martin Ling a1be7b6c3f vcd output: Replace fixed length array of indices with GArray. 2013-04-27 15:49:50 +02:00
Martin Ling d601c0e9b3 vcd output: Eliminate unnecessary array of probe names. 2013-04-27 15:49:50 +02:00
Martin Ling 90f680ff00 gnuplot: Eliminate fixed-size header buffer based on max probes. 2013-04-27 15:49:50 +02:00
Martin Ling deb0908338 gnuplot: Remove unnecessary array of probe names. 2013-04-27 15:49:50 +02:00
Martin Ling 1c5b099a13 csv: Remove unnecessary array of probe names. 2013-04-27 15:49:50 +02:00
Martin Ling 91a44f50f0 chronovu-l8: remove unused array of probe names. 2013-04-27 15:49:50 +02:00
Martin Ling d53e4e8d92 text: Use a GSList of enabled probe names, not an array. 2013-04-27 15:49:50 +02:00
Martin Ling b050fc481b vcd output: fix for big-endian architectures. 2013-04-27 15:49:49 +02:00
Martin Ling 9c178ffa50 gnuplot: fix for big-endian architectures. 2013-04-27 15:49:49 +02:00
Bert Vermeulen 3292535c87 output/ols: Use new API
This now properly supports samplerate changes coming in from
SR_DF_META packets, and also fixes bug 99.
2013-04-27 15:49:49 +02:00
Martin Ling 3a581560f1 ascii: fix for big-endian architectures. 2013-04-26 22:56:16 +02:00
Martin Ling ddb292571d bits: Remove unused code. 2013-04-26 22:56:16 +02:00
Martin Ling 9275d23208 hex: fix for big-endian architectures. 2013-04-26 22:56:16 +02:00
Martin Ling 542dbd185b bits: fix for big-endian architectures. 2013-04-26 22:56:16 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen ba6568c5ad output/vcd: Use selected probes, not lowest-numbered ones
Thanks to Andrew Bardsley for the patch.
2013-04-11 18:49:24 +02:00
Bert Vermeulen ec4063b83c input/output modules: Adjust to GVariant-based sr_config_* functions 2013-04-11 18:32:06 +02:00
Bert Vermeulen 13d8e03c4f Bump copyright year 2013-04-11 18:32:06 +02:00
Uwe Hermann bbe6e336b3 vcd output: Build fix for Windows/MinGW.
On Windows/MinGW 'recv' seems to be already defined in windows.h/winsock2.h.

Use 'receive' instead, for now, otherwise we get an error:

vcd.c:147:17: error: conflicting types for 'recv'
2013-04-09 18:57:20 +02:00
Bert Vermeulen d5585e32dd output/vcd: use new API 2013-03-06 23:14:00 +01:00
Uwe Hermann 07e1aad5c4 doxygen: Add more output format docs.
This is largely taken from the respective wiki page (with some updates
and improvements), which will be removed in favor of the doxygen docs.
2013-02-24 14:31:15 +01:00