Commit Graph

216 Commits

Author SHA1 Message Date
Bert Vermeulen 6cb45d96c8 output/vcd: Support getting samplerate from meta packets. 2014-04-30 07:40:56 -07:00
Bert Vermeulen 83023573d9 output/gnuplot: Support getting samplerate from meta packets. 2014-04-29 15:41:08 -07:00
Bert Vermeulen 0f3d8c8967 output/csv: Support getting samplerate from meta packets. 2014-04-28 19:09:32 -07:00
Bert Vermeulen 787e9bc970 output/ascii: Support getting samplerate from meta packets. 2014-04-28 15:11:17 -07:00
Bert Vermeulen 7bcbbfae3e output/hex: Support getting samplerate from meta packets. 2014-04-28 15:06:36 -07:00
Bert Vermeulen 35159a6b28 output/bits: Support getting samplerate from meta packets. 2014-04-28 14:54:47 -07:00
Bert Vermeulen bda100ec0f output/ascii/bits/hex: Remove stray g_free(). 2014-04-21 23:35:26 +02:00
Bert Vermeulen dba3e6826e output: Introduce output module API wrappers. 2014-04-21 01:50:43 +02:00
Bert Vermeulen 44559b2c3b Remove obsolete output API. 2014-04-19 13:28:17 +02:00
Bert Vermeulen 6f64ebb223 output/ascii: Rewrite for new output API. 2014-04-19 12:34:51 +02:00
Bert Vermeulen 8d3af2e868 output/hex: Rewrite for new output API. 2014-04-19 12:31:50 +02:00
Bert Vermeulen dbd0aeff35 output/bits: Rewrite for new output API.
This also fixes the performance problems in the old module.
2014-04-19 12:25:02 +02:00
Bert Vermeulen 71e16f47e3 output/binary: Use new output API. 2014-04-17 14:40:47 +02:00
Bert Vermeulen d42eb9d899 output/chronovu_la8: Use new output API.
This somewhat naively copies whatever it gets into the output, regardless
of how many channels are in there, or which ones are enabled. Not sure
what the best way to deal with that is, but for now you have to feed it
a channel setup the Chronovu software can read.
2014-04-17 14:10:49 +02:00
Bert Vermeulen 2a035e539a output/csv: Use the logic stream's unitsize.
This also fixes the channel index, instead of counting on the logic
data being arranged according to enabled channels only.
2014-04-16 20:05:43 +02:00
Bert Vermeulen 2b78ffea54 output/vcd: Use the logic stream's unitsize.
Also code cleanup and some memory leaks fixed.
2014-04-16 20:05:37 +02:00
Bert Vermeulen b240ee0856 output/gnuplot: Use new output API. 2014-04-16 20:05:09 +02:00
Uwe Hermann fca75cbb74 A few more random 'probe' to 'channel' changes.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 3f239f0803 Rename various *PROBE* macros to *CHANNEL*.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
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