libsigrokdecode.git
8 years agotests/pdtest: Add missing license header.
Uwe Hermann [Wed, 22 Jan 2014 22:03:02 +0000 (23:03 +0100)]
tests/pdtest: Add missing license header.

8 years agotests/pdtest: Fix shebang line.
Uwe Hermann [Wed, 22 Jan 2014 22:01:52 +0000 (23:01 +0100)]
tests/pdtest: Fix shebang line.

8 years agoAll PDs: Consistent naming/case for annotation shortnames/IDs.
Uwe Hermann [Wed, 22 Jan 2014 21:56:08 +0000 (22:56 +0100)]
All PDs: Consistent naming/case for annotation shortnames/IDs.

8 years agoAll PDs: Drop unneeded comments.
Uwe Hermann [Wed, 22 Jan 2014 21:47:18 +0000 (22:47 +0100)]
All PDs: Drop unneeded comments.

The single comment re-stating the PD's name / description / purpose in
each pd.py file is not really needed, that info is available in the
Decoder class' attributes already.

8 years agoAll PDs: Improve/fix descriptions.
Uwe Hermann [Wed, 22 Jan 2014 21:43:21 +0000 (22:43 +0100)]
All PDs: Improve/fix descriptions.

8 years agotransitioncounter: Drop PD (obsolete).
Uwe Hermann [Mon, 20 Jan 2014 20:52:15 +0000 (21:52 +0100)]
transitioncounter: Drop PD (obsolete).

This decoder was just a simple test case for early libsigrokdecode
development and testing, it is neither useful nor properly working
currently, so drop it.

8 years agouart: Add binaryout/dump support, drop obsolete 'uart_dump' PD.
Uwe Hermann [Mon, 20 Jan 2014 16:43:01 +0000 (17:43 +0100)]
uart: Add binaryout/dump support, drop obsolete 'uart_dump' PD.

The functionality of the preliminary 'uart_dump' PD is now available
in the proper 'uart' PD, via the OUTPUT_BINARY mechanism that frontends
can use to dump decoded data (in various formats) to a file, or pipe it
into other applications, and so on.

Old sigrok-cli example usage:

 $ sigrok-cli -i foo.sr -P uart:rx=0:tx=1,uart_dump:filename=bootlog.txt

New sigrok-cli example usage:

 $ sigrok-cli -i foo.sr -P uart:rx=0:tx=1 -B uart=rxtx > bootlog.txt

New sigrok-cli example usage (piping into other applications):

 $ sigrok-cli -i foo.sr -P uart:rx=0:tx=1 -B uart=rxtx | grep "whatever"

8 years agoi2s: Add WAV dump support, drop obsolete 'i2s_dump' PD.
Uwe Hermann [Sat, 18 Jan 2014 18:15:41 +0000 (19:15 +0100)]
i2s: Add WAV dump support, drop obsolete 'i2s_dump' PD.

The functionality of the preliminary 'i2s_dump' PD is now available
in the proper 'i2s' PD, via the OUTPUT_BINARY mechanism that frontends
can use to dump decoded data (in various formats) to a file, or pipe it
into other applications, and so on.

Old sigrok-cli example usage:

 $ sigrok-cli -i 2ch-16bit-16khz.sr \
-P i2s:sck=0:ws=1:sd=2,i2s_dump:filename=foo.wav
 $ aplay foo.wav

New sigrok-cli example usage:

 $ sigrok-cli -i 2ch-16bit-16khz.sr \
-P i2s:sck=0:ws=1:sd=2 -B i2s=wav > foo.wav
 $ aplay foo.wav

New sigrok-cli example usage (piping into other applications):

 $ sigrok-cli -i 2ch-16bit-16khz.sr \
-P i2s:sck=0:ws=1:sd=2 -B i2s=wav | aplay -

8 years agoconfigure.ac: Drop obsolete MinGW Python3 workaround.
Uwe Hermann [Fri, 17 Jan 2014 16:56:26 +0000 (17:56 +0100)]
configure.ac: Drop obsolete MinGW Python3 workaround.

We just use dummy/fake python3.pc files on Windows so that the usual
pkg-config mechanism works there as well.

8 years agoconfigure.ac: Check for all known Python3 pkg-config names.
Uwe Hermann [Fri, 17 Jan 2014 16:56:08 +0000 (17:56 +0100)]
configure.ac: Check for all known Python3 pkg-config names.

Even when using pkg-config not all distro/platform specific issues are
transparent, unfortunately. On some systems the pkg-config file is
named "python3.pc" on others it's versioned, e.g. "python-3.2.pc".

See also: http://sigrok.org/wiki/Libsigrokdecode/Python

This should fix the build on e.g. FreeBSD, NetBSD, Mac OS X (some
versions), and possibly various Linux distros, e.g. Gentoo.

Also, drop manual AC_MSG_ERROR() and let PKG_CHECK_MODULES() output a
more verbose and standardized error message if Python 3 is not found.

8 years agoparallel: Make CLK probe optional.
Uwe Hermann [Mon, 13 Jan 2014 22:26:36 +0000 (23:26 +0100)]
parallel: Make CLK probe optional.

When no CLK probe is supplied to this PD, handle any transition on
any of the supplied data probes as if there had been a CLK transition.

(based on a suggestion/patch by "bmx" from the #sigrok channel, thanks!)

8 years agoLink against libm to avoid Python related linking errors.
Uwe Hermann [Fri, 3 Jan 2014 16:41:24 +0000 (17:41 +0100)]
Link against libm to avoid Python related linking errors.

The python3-config script reported "-lm" as linker option previously,
but we switched to using pkg-config (among other things for
cross-compile support) which doesn't report "-lm" though (this is a
common behaviour across multiple distros and OSes).

8 years agoconfigure.ac: Use pkg-config to check for python
Marcus Comstedt [Thu, 2 Jan 2014 11:43:34 +0000 (12:43 +0100)]
configure.ac: Use pkg-config to check for python

Using python-config does not work when cross-compiling, since it
can only be run on the host system.

8 years agojtag: Use proper annotation classes, fix GUI usage.
Uwe Hermann [Sat, 28 Dec 2013 22:17:18 +0000 (23:17 +0100)]
jtag: Use proper annotation classes, fix GUI usage.

This closes bug #156.

8 years agojtag: Refactor and simplify some code.
Uwe Hermann [Sun, 13 Oct 2013 13:39:44 +0000 (15:39 +0200)]
jtag: Refactor and simplify some code.

8 years agoDo some more I2C to I²C changes.
Uwe Hermann [Sat, 28 Dec 2013 14:15:06 +0000 (15:15 +0100)]
Do some more I2C to I²C changes.

8 years agoi2s: Fix typo.
Uwe Hermann [Sat, 28 Dec 2013 14:11:55 +0000 (15:11 +0100)]
i2s: Fix typo.

8 years agomxc6225xu: Replace I2C with I²C
Joel Holdsworth [Sat, 28 Dec 2013 08:17:02 +0000 (09:17 +0100)]
mxc6225xu: Replace I2C with I²C

8 years agolm75: Replace I2C with I²C
Joel Holdsworth [Sat, 28 Dec 2013 08:16:13 +0000 (09:16 +0100)]
lm75: Replace I2C with I²C

8 years agoi2s_dump: Replace I2S with I²S
Joel Holdsworth [Sat, 28 Dec 2013 08:03:48 +0000 (09:03 +0100)]
i2s_dump: Replace I2S with I²S

8 years agoi2s: Replace I2S with I²S
Joel Holdsworth [Sat, 28 Dec 2013 08:02:34 +0000 (09:02 +0100)]
i2s: Replace I2S with I²S

8 years agoi2cfiler: Replaced I2C with I²C
Joel Holdsworth [Sat, 28 Dec 2013 08:01:02 +0000 (09:01 +0100)]
i2cfiler: Replaced I2C with I²C

8 years agoi2cdemux: Replaced I2C with I²C
Joel Holdsworth [Sat, 28 Dec 2013 00:37:18 +0000 (01:37 +0100)]
i2cdemux: Replaced I2C with I²C

8 years agoi2c: Replaced I2C with I²C
Joel Holdsworth [Sat, 28 Dec 2013 00:21:26 +0000 (01:21 +0100)]
i2c: Replaced I2C with I²C

8 years agoruntc: Fix conditional build on non-Linux systems.
Bert Vermeulen [Sun, 22 Dec 2013 22:07:23 +0000 (23:07 +0100)]
runtc: Fix conditional build on non-Linux systems.

8 years agoDon't install runtc.
Arkadiusz Miśkiewicz [Wed, 18 Dec 2013 15:12:34 +0000 (16:12 +0100)]
Don't install runtc.

Don't install runtc. Not meant for generic usage.

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
8 years agoruntc: Output binary as ASCII timestamp/class/hex bytes instead.
Bert Vermeulen [Wed, 18 Dec 2013 11:04:26 +0000 (12:04 +0100)]
runtc: Output binary as ASCII timestamp/class/hex bytes instead.

This allows for verifying timestamps and classes as well.

8 years agoruntc: Make sure to compile against this library
Bert Vermeulen [Sun, 15 Dec 2013 14:55:35 +0000 (15:55 +0100)]
runtc: Make sure to compile against this library

It might compile against a previously-installed one unless the linker
finds it in the top directory first.

8 years agoi2c: Add Python tests.
Bert Vermeulen [Fri, 13 Dec 2013 17:13:08 +0000 (18:13 +0100)]
i2c: Add Python tests.

8 years agopdtest/runtc: Add support for Python output types.
Bert Vermeulen [Fri, 13 Dec 2013 17:11:52 +0000 (18:11 +0100)]
pdtest/runtc: Add support for Python output types.

8 years agoSend SRD_OUTPUT_PYTHON to registered callbacks as well.
Bert Vermeulen [Fri, 13 Dec 2013 16:57:01 +0000 (17:57 +0100)]
Send SRD_OUTPUT_PYTHON to registered callbacks as well.

There's really only one use case for this: the testing framework. This
allows it to check what gets sent up the stack as well.

8 years agoPrune dead code.
Bert Vermeulen [Fri, 13 Dec 2013 10:52:38 +0000 (11:52 +0100)]
Prune dead code.

8 years agoi2c: Avoid obsolete method.
Bert Vermeulen [Fri, 13 Dec 2013 10:51:41 +0000 (11:51 +0100)]
i2c: Avoid obsolete method.

8 years agoNo need to mess with method reference counts.
Bert Vermeulen [Fri, 13 Dec 2013 10:29:59 +0000 (11:29 +0100)]
No need to mess with method reference counts.

8 years agoi2c: Add binary tests.
Bert Vermeulen [Thu, 12 Dec 2013 12:30:36 +0000 (13:30 +0100)]
i2c: Add binary tests.

8 years agopdtest/runtc: Add support for binary output types.
Bert Vermeulen [Thu, 12 Dec 2013 12:29:37 +0000 (13:29 +0100)]
pdtest/runtc: Add support for binary output types.

8 years agopdtest: Add -f option to automatically fix failing tests.
Bert Vermeulen [Thu, 12 Dec 2013 12:28:21 +0000 (13:28 +0100)]
pdtest: Add -f option to automatically fix failing tests.

8 years agoruntc: Add support for binary output.
Bert Vermeulen [Thu, 12 Dec 2013 00:29:26 +0000 (01:29 +0100)]
runtc: Add support for binary output.

8 years agoUse new binary class definition format.
Bert Vermeulen [Wed, 11 Dec 2013 23:57:04 +0000 (00:57 +0100)]
Use new binary class definition format.

8 years agoBinary classes are now defined as (name, description).
Bert Vermeulen [Wed, 11 Dec 2013 23:56:12 +0000 (00:56 +0100)]
Binary classes are now defined as (name, description).

8 years agoEasier access to sequences of strings, not just lists.
Bert Vermeulen [Wed, 11 Dec 2013 22:41:02 +0000 (23:41 +0100)]
Easier access to sequences of strings, not just lists.

8 years agoruntc: Return errorcode according to testcase result.
Bert Vermeulen [Wed, 11 Dec 2013 20:53:17 +0000 (21:53 +0100)]
runtc: Return errorcode according to testcase result.

8 years agopdtest: Use -dd to turn on SR/SRD debugging.
Bert Vermeulen [Wed, 11 Dec 2013 20:52:33 +0000 (21:52 +0100)]
pdtest: Use -dd to turn on SR/SRD debugging.

8 years agocheck: Make sure to test this set of decoders, not the installed ones.
Bert Vermeulen [Wed, 11 Dec 2013 17:36:42 +0000 (18:36 +0100)]
check: Make sure to test this set of decoders, not the installed ones.

8 years agoLoad decoders from all search paths, not just the default.
Bert Vermeulen [Wed, 11 Dec 2013 17:31:56 +0000 (18:31 +0100)]
Load decoders from all search paths, not just the default.

srd_decoder_load_all() was really only getting a list of decoders
from the default (installation) path, so could not find uninstalled
decoders, or those in a custom added search path.

This broke development of new PDs when using the SIGROKDECODE_DIR
environment variable, and broke many of the unit tests in the tests/
directory -- those actually tested against the already-installed
decoders, not the ones about to be installed.

8 years agoClear decoder list after unloading, not just at exit.
Bert Vermeulen [Wed, 11 Dec 2013 15:30:25 +0000 (16:30 +0100)]
Clear decoder list after unloading, not just at exit.

8 years agoruntc: Make sure to test this set of decoders, not the installed ones.
Bert Vermeulen [Wed, 11 Dec 2013 11:50:38 +0000 (12:50 +0100)]
runtc: Make sure to test this set of decoders, not the installed ones.

8 years agopdtest: Don't bother with diff if any error at all occurred.
Bert Vermeulen [Wed, 11 Dec 2013 11:49:30 +0000 (12:49 +0100)]
pdtest: Don't bother with diff if any error at all occurred.

8 years agopdtest: Add option for custom sigrok-dumps repository path.
Bert Vermeulen [Wed, 11 Dec 2013 11:48:50 +0000 (12:48 +0100)]
pdtest: Add option for custom sigrok-dumps repository path.

8 years agopdtest: Always sanity-check all testcases.
Bert Vermeulen [Wed, 11 Dec 2013 11:39:50 +0000 (12:39 +0100)]
pdtest: Always sanity-check all testcases.

8 years agoClean up runtc build.
Bert Vermeulen [Wed, 11 Dec 2013 00:21:22 +0000 (01:21 +0100)]
Clean up runtc build.

This only compiles libsigrok into the one target that needs it, instead
of slopping it all over the place.

8 years agoAdd protocol decoder testing framework.
Bert Vermeulen [Tue, 10 Dec 2013 16:17:38 +0000 (17:17 +0100)]
Add protocol decoder testing framework.

This adds a tool in the tests directory, called pdtest. It uses the
"test/" directory in every PD directory, if present, to run the
PD against dumps found in the sigrok-dumps repository, and compares
the output against ".output" files in the "test/" directory. The file
"test/test.conf" is used to configure which tests to run.

A separate tool (tests/runtc.c) is used to run the actual decoding and
report output.

To get an overview of the options, run tests/pdtest without any options.

8 years agoAPI clarification.
Bert Vermeulen [Tue, 10 Dec 2013 01:38:44 +0000 (02:38 +0100)]
API clarification.

8 years agoFix 'dist' make target.
Bert Vermeulen [Tue, 10 Dec 2013 00:05:59 +0000 (01:05 +0100)]
Fix 'dist' make target.

8 years agoAvoid GError warning when unloading decoders.
Bert Vermeulen [Mon, 9 Dec 2013 10:44:27 +0000 (11:44 +0100)]
Avoid GError warning when unloading decoders.

8 years agoSupport DESTDIR on install targets.
Bert Vermeulen [Mon, 9 Dec 2013 00:40:23 +0000 (01:40 +0100)]
Support DESTDIR on install targets.

Fixes bug 215.

8 years agoparallel: start(): Drop obsoleted metadata parameter.
Uwe Hermann [Wed, 4 Dec 2013 10:05:00 +0000 (11:05 +0100)]
parallel: start(): Drop obsoleted metadata parameter.

This fixes bug #202.

8 years agouart: Display non-ASCII characters properly.
Uwe Hermann [Tue, 3 Dec 2013 13:46:23 +0000 (14:46 +0100)]
uart: Display non-ASCII characters properly.

We use the [XX] notation for non-printable characters, which is what
various other logic analyzer software packages do too, e.g. the
CWAV USBee Suite.

This fixes bug #201.

8 years agoPython 3.2 and portability fixes.
Bert Vermeulen [Fri, 29 Nov 2013 12:59:51 +0000 (13:59 +0100)]
Python 3.2 and portability fixes.

8 years agoClean up autoconf leftover configuration.
Bert Vermeulen [Wed, 27 Nov 2013 16:50:23 +0000 (17:50 +0100)]
Clean up autoconf leftover configuration.

8 years agoedid: Make sure to install the vendor list.
Bert Vermeulen [Wed, 27 Nov 2013 15:52:56 +0000 (16:52 +0100)]
edid: Make sure to install the vendor list.

8 years agoAutomate protocol decoder installation.
Bert Vermeulen [Wed, 27 Nov 2013 15:47:04 +0000 (16:47 +0100)]
Automate protocol decoder installation.

This automatically figures out the files to install for each protocol
decoder, without involving autotools.

All python files (filenames ending in .py) are always installed. If a
protocol decoder requires installation of a non-python file, a small
file called 'config' can be created in that protocol decoder's
directory, with the following content:

# comments are ok
extra-install vendorlist.txt commands.txt

8 years agoRemove 64-probe limit.
Bert Vermeulen [Tue, 26 Nov 2013 15:05:54 +0000 (16:05 +0100)]
Remove 64-probe limit.

Fixes bug 120.

8 years agoAdd a missing #include.
Uwe Hermann [Tue, 19 Nov 2013 20:14:03 +0000 (21:14 +0100)]
Add a missing #include.

This causes compiler errors in some setups otherwise, e.g.:

  CC       libsigrokdecode_la-session.lo
session.c: In function 'srd_session_metadata_set':
session.c:195:46: error: expected ')' before 'PRIu64'
  srd_dbg("Setting session %d samplerate to %"PRIu64".",
                                              ^
session.c: In function 'srd_session_send':
session.c:242:15: error: expected ')' before 'PRIu64'
    "number %" PRIu64 ", %" PRIu64 " bytes at 0x%p",
               ^

8 years agoTurn off excessive logging
Bert Vermeulen [Mon, 18 Nov 2013 09:57:34 +0000 (10:57 +0100)]
Turn off excessive logging

8 years agoRemove unreasonable test
Bert Vermeulen [Mon, 18 Nov 2013 09:55:02 +0000 (10:55 +0100)]
Remove unreasonable test

8 years agoFix inverted condition on doc check
Bert Vermeulen [Mon, 18 Nov 2013 09:49:04 +0000 (10:49 +0100)]
Fix inverted condition on doc check

8 years agoDon't try to load an already-loaded module
Bert Vermeulen [Mon, 18 Nov 2013 09:44:28 +0000 (10:44 +0100)]
Don't try to load an already-loaded module

Python silently uses the existing module anyway, but the library
was counting it as an extra module. This was exposed by a test
case in the test suite.

8 years agoDon't decrease borrowed reference to probe definition dict
Bert Vermeulen [Mon, 18 Nov 2013 08:41:14 +0000 (09:41 +0100)]
Don't decrease borrowed reference to probe definition dict

This fixes bug 177.

8 years agoFix inverted condition on decoder check
Bert Vermeulen [Mon, 18 Nov 2013 00:33:54 +0000 (01:33 +0100)]
Fix inverted condition on decoder check

8 years agoCheck library initialization before handling decoders
Bert Vermeulen [Mon, 18 Nov 2013 00:21:16 +0000 (01:21 +0100)]
Check library initialization before handling decoders

8 years agoClean up prototypes
Bert Vermeulen [Mon, 18 Nov 2013 00:14:02 +0000 (01:14 +0100)]
Clean up prototypes

8 years agoBetter error checking on session metadata
Bert Vermeulen [Sun, 17 Nov 2013 23:03:53 +0000 (00:03 +0100)]
Better error checking on session metadata

8 years agoOnly instance-related functionality remains, rename source file
Bert Vermeulen [Sat, 16 Nov 2013 22:03:19 +0000 (23:03 +0100)]
Only instance-related functionality remains, rename source file

8 years agoMove initialization/shutdown into srd.c
Bert Vermeulen [Sat, 16 Nov 2013 21:58:28 +0000 (22:58 +0100)]
Move initialization/shutdown into srd.c

8 years agoMove session-specific functionality into session.c
Bert Vermeulen [Sat, 16 Nov 2013 22:14:50 +0000 (23:14 +0100)]
Move session-specific functionality into session.c

8 years agoMinor cleanup
Bert Vermeulen [Sat, 16 Nov 2013 14:33:16 +0000 (15:33 +0100)]
Minor cleanup

8 years agoMove versioning info out to separate header
Bert Vermeulen [Fri, 15 Nov 2013 22:37:47 +0000 (23:37 +0100)]
Move versioning info out to separate header

8 years agoUse OUTPUT_BINARY with four classes.
Bert Vermeulen [Sun, 10 Nov 2013 11:45:58 +0000 (12:45 +0100)]
Use OUTPUT_BINARY with four classes.

8 years agoImplement OUTPUT_BINARY
Bert Vermeulen [Sun, 10 Nov 2013 11:42:11 +0000 (12:42 +0100)]
Implement OUTPUT_BINARY

This requires the PD to have a tuple in its class called 'binary',
which contains a list of strings describing the different binary
classes it can output. For the SPI decoder this might be 'MOSI' and
'MISO', for example.

The data is submitted to the frontend as struct srd_proto_data_binary,
which contains the class that data belongs to.

8 years agoDrop obsolete report() method.
Bert Vermeulen [Thu, 14 Nov 2013 20:56:21 +0000 (21:56 +0100)]
Drop obsolete report() method.

8 years agoDrop outdated report: this should be handled by a frontend.
Bert Vermeulen [Thu, 14 Nov 2013 20:55:09 +0000 (21:55 +0100)]
Drop outdated report: this should be handled by a frontend.

8 years agoUse the new Decoder.register() API
Bert Vermeulen [Thu, 14 Nov 2013 16:25:53 +0000 (17:25 +0100)]
Use the new Decoder.register() API

8 years agoEmit meta bitrate
Bert Vermeulen [Thu, 14 Nov 2013 13:55:09 +0000 (14:55 +0100)]
Emit meta bitrate

8 years agoEmit meta bitrate
Bert Vermeulen [Wed, 13 Nov 2013 23:36:16 +0000 (00:36 +0100)]
Emit meta bitrate

8 years agoPrune dead code
Bert Vermeulen [Wed, 13 Nov 2013 23:32:03 +0000 (00:32 +0100)]
Prune dead code

8 years agoImplement OUTPUT_META
Bert Vermeulen [Wed, 13 Nov 2013 23:19:28 +0000 (00:19 +0100)]
Implement OUTPUT_META

This replaces the Decoder.add() method with Decoder.register().
The first argument is still output type, but all arguments are now
optional:

  Decoder.register(output_type,
        id='someid',
        meta=(object-type, 'Name', 'Description'))

'id' defaults to the protocol decoder instance id, and only needs changing
if a decoder chain needs to fork.
'object-type' refers to a Python object, such as int or str.

After registering, the PD submits data as usual with Decoder.put(), with
the only argument a value of the registered object-type.

8 years agoSplit annotation-specific output to another struct
Bert Vermeulen [Thu, 7 Nov 2013 21:38:47 +0000 (22:38 +0100)]
Split annotation-specific output to another struct

struct srd_proto_data was supposed to be independent of the output
type, but a field specific to annotations snuck in there.

8 years agoMinor code cleanup
Bert Vermeulen [Thu, 7 Nov 2013 14:02:10 +0000 (15:02 +0100)]
Minor code cleanup

8 years agoRename inter-PD output type to SRD_OUTPUT_PYTHON
Bert Vermeulen [Tue, 5 Nov 2013 10:21:33 +0000 (11:21 +0100)]
Rename inter-PD output type to SRD_OUTPUT_PYTHON

This better reflects what it is: a python object generated and
processed by python code.

8 years agounittests: Update to recent API changes.
Uwe Hermann [Thu, 31 Oct 2013 11:25:58 +0000 (12:25 +0100)]
unittests: Update to recent API changes.

srd_session_config_set() is now called srd_session_metadata_set(), and
SRD_CONF_NUM_PROBES and SRD_CONF_UNITSIZE are dropped.

8 years agoThe start() method no longer takes a metadata parameter
Bert Vermeulen [Wed, 30 Oct 2013 21:35:41 +0000 (22:35 +0100)]
The start() method no longer takes a metadata parameter

8 years agoReceive samplerate via metadata(), not start()
Bert Vermeulen [Wed, 30 Oct 2013 21:25:45 +0000 (22:25 +0100)]
Receive samplerate via metadata(), not start()

8 years agoPass metadata to PDs only at runtime, not at decoder start
Bert Vermeulen [Wed, 30 Oct 2013 15:30:05 +0000 (16:30 +0100)]
Pass metadata to PDs only at runtime, not at decoder start

The SRD_CONF_NUM_PROBES metadata key was removed. It wasn't actually
used for anything, since this is trivially available via the configured
(or default) probe list.

The SRD_CONF_UNITSIZE key was removed. The unit size is instead derived
from the probe list: the number of probes packed into the least amount
of space possible defines the unit size.

PD changes:
* The start() method no longer takes a 'metadata' parameter.
* Metadata now comes in only via the metadata() method, which takes
  a key and value. The only key defined so far is SRD_CONF_SAMPLERATE,
  which is exported into the module namespace.

API changes:
* srd_session_send() now takes an end_samplenum parameter, and had its
  options rearranged.
* srd_session_config_set() is now srd_session_metadata_set(). This keeps
  "config" options for a future feature to allow PDs or frontends to
  configure each other's options on the fly, up and down the stack.

8 years agoDocumentation and coding style fixes
Bert Vermeulen [Wed, 30 Oct 2013 14:22:10 +0000 (15:22 +0100)]
Documentation and coding style fixes

8 years agoAdd a 'guess_bitrate' protocol decoder.
Uwe Hermann [Wed, 23 Oct 2013 17:59:50 +0000 (19:59 +0200)]
Add a 'guess_bitrate' protocol decoder.

This PD tries to guess / detect / estimate a bitrate of e.g. some
UART communication snippet or other protocols.

8 years agocontroller.c: Add checks for srd_inst_option_set().
Uwe Hermann [Wed, 23 Oct 2013 17:23:40 +0000 (19:23 +0200)]
controller.c: Add checks for srd_inst_option_set().

This also fixes some unit tests that were previously failing.

8 years agotestsuite: Add some decoder instance related tests.
Uwe Hermann [Wed, 23 Oct 2013 17:21:45 +0000 (19:21 +0200)]
testsuite: Add some decoder instance related tests.

8 years agoparallel: Limit number of probes to 8 for now.
Uwe Hermann [Mon, 21 Oct 2013 20:59:25 +0000 (22:59 +0200)]
parallel: Limit number of probes to 8 for now.

This will be increased again at some later point.

8 years agosession: Add some more parameter checks, minor other fixes.
Uwe Hermann [Sun, 20 Oct 2013 21:09:46 +0000 (23:09 +0200)]
session: Add some more parameter checks, minor other fixes.

Some of these also fix unit tests that were previously failing.