Commit Graph

76 Commits

Author SHA1 Message Date
Bert Vermeulen 9f00e5aefb Remove dead code from session read.
The "trigger" keyword was supported in theory, but in practice nothing
ever wrote it, so it was never used.
2014-05-28 00:05:51 +02:00
Uwe Hermann 4711724141 Add/update Doxygen @since tags. 2014-05-04 20:53:53 +02:00
Uwe Hermann 2ad1deb89d Don't include LOG_PREFIX in the Doxygen output.
(files in hardware/, input/, and output/ don't need this since none of
those directories contain API stuff and are thus not included in the
list of input files for Doxygen at all).
2014-04-25 18:44:40 +02:00
Uwe Hermann f3ca73edd2 Rename a few more API calls with 'probe' in their name.
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 56d0d24535 Rename sr_probe_new() to sr_channel_new().
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 3a84104080 sr file format: Bump version to 2.
The *.sr (libsigrok session) file format has changed since the last
libsigrok release. Frontends using older libsigrok versions will not
be able to read *.sr files created by frontends using the new file format.

Thus, bump the version number of the file format to 2.

Current libsigrok will read both version 1 and version 2 files
correctly, and always write version 2 files.
2014-01-23 23:34:48 +01:00
Bert Vermeulen eca2f85213 Don't mention non-logic probes in session file metadata.
They don't get saved anyway, and are very confusing to clients.
2014-01-21 18:16:52 +01:00
Bert Vermeulen d2cd06e7e9 Make sure to delete temporary metadata file after use.
Fixes bug 276.
2014-01-21 14:47:05 +01:00
Bert Vermeulen a769b9f357 Add sr_session_save_init().
This allows a frontend to initialize a session file, providing the
required samplerate and probe names, without having a proper
struct sr_dev_inst handy.

sr_session_append() is then used to add captured data to the session
file, as usual.

The existing sr_session_save() function works the same way as always.
2014-01-07 12:55:02 +01:00
Bert Vermeulen bf90d4c666 Add config keys for setting the number of analog probes.
This is primarily of use in the demo driver, but this patch also
takes in the logic probe setting config key used only by the
session driver so far.
2013-12-29 10:58:56 +01:00
Martin Ling 3544f848e0 Centralise duplicated logging helper defines. 2013-12-27 12:54:05 +01:00
Bert Vermeulen 5f9c4c8a34 Detect non-existent file before libzip does. 2013-12-11 10:49:01 +01:00
Martin Ling 8f996b8948 probe_groups: API changes required to implement probe groups. 2013-11-08 01:03:16 +01:00
Bert Vermeulen 72a08bccff Minor documentation fixes 2013-09-25 11:51:54 +02:00
Bert Vermeulen f438e0c923 Add sr_session_append(): add captured data to an existing session file
This extends the session file format to contain logic data files named
either "logic-1" as before, or "logic-1-1", "logic-1-2", ...
representing chronologically ordered chunks of captured data.

The chunks are transparently concatenated together by sr_session_load().
2013-09-18 13:28:07 +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
Bert Vermeulen bd7bfe8c51 Open virtual device before loading file 2013-04-24 23:06:50 +02:00
Uwe Hermann 50985c2019 GPL headers: Use correct project name. 2013-04-23 22:24:30 +02:00
Bert Vermeulen 003595ac37 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
Bert Vermeulen 4d15e5c907 Rename sr_dev_has_hwcap() to sr_dev_has_option(). 2013-01-25 16:20:40 +01:00
Bert Vermeulen ddd9b41f5a Rename sr_info_get() to sr_config_get(). 2013-01-25 15:48:44 +01:00
Bert Vermeulen 123e131383 Deprecate SR_DI_CUR_SAMPLERATE.
This is replaced by SR_CONF_SAMPLERATE.
2013-01-25 03:17:36 +01:00
Bert Vermeulen 035a1078fd drivers: rename and reorganize config get/set
The driver API calls info_get() and dev_config_set() have been renamed
to config_get() and config_set(), respectively.
2013-01-24 19:19:09 +01:00
Bert Vermeulen 1953564a96 Rename SR_HWOPT_* and SR_HWCAP_* to SR_CONF_* 2013-01-21 23:32:50 +01:00
Bert Vermeulen 18bc270461 sr_session_save(): don't use datastore 2013-01-08 14:14:44 +01:00
Peter Stuge 44fc870c9c Add a struct sr_context * parameter to sr_driver_init()
Since the public API is changed, this commit also bumps the libtool
version component SR_LIB_VERSION_CURRENT in configure.ac.
2012-12-03 12:07:40 +01:00
Uwe Hermann a885ce3ee9 Various subsystems: Use message logging helpers. 2012-11-11 18:14:17 +01:00
Uwe Hermann 545f978639 config.h usage cleanups.
- Drop config.h #include from files that don't actually use any of
   its contents (at the moment).

 - Add comment for those that do need it.
2012-10-24 00:41:21 +02:00
Uwe Hermann 393fb9cb18 Doxygen: Add @file items for the relevant files.
These short descriptions are shown in the "Files" section of the
Doxygen output.
2012-10-22 11:56:18 +02:00
Uwe Hermann 777e2035d8 Doxygen: Fix grouping of session_file.c functions.
s/@ingroup/@addtogroup/ and s/grp_device/grp_session/.
2012-10-22 11:56:18 +02:00
Uwe Hermann 7b870c38e3 Doxygen: Initial groups and topic short descriptions. 2012-10-22 11:56:18 +02:00
Bert Vermeulen c1864d5589 sr: better file version check
Still not really used though.
2012-08-03 11:28:59 +02:00
Bert Vermeulen 056be0719f sr: sr_session_save() now takes sdi and datastore parameters
This means it's restricted to saving one device's capture per file, for
now.
2012-08-03 11:28:59 +02:00
Bert Vermeulen fb381e4d71 sr: fix session loading for 0-numbered probes
They're still numbered starting from 1 in the current version (1)
of the sigrok file format, we just work around that for now.
2012-08-03 11:28:59 +02:00
Bert Vermeulen 37e8b4c4f7 sr: change sr_dev_probe_name_set() to use sdi 2012-08-03 11:28:59 +02:00
Bert Vermeulen be5bf44d28 sr: add sr_dev_probe_enable(), abstraction wrapper around device probes 2012-08-03 11:27:31 +02:00
Bert Vermeulen 4d68442739 sr: convert session load/save code to use sr_dev_inst 2012-08-03 11:27:31 +02:00
Bert Vermeulen 40dda2c3a5 sr: remove unused argument from hardware driver function init()
It was actually used in one way: the session file loaded abused it for
passing in the filename -- something it definitely wasn't intended for.
This now uses the proper way to pass arguments to a driver: the new
SR_HWCAP_SESSIONFILE.

The OLS driver could also use it as an indication of the serial port to
use instead of actively probing all serial ports on the system, but there
wasn't any frontend code that passed in such a parameter, making it
entirely useless. That will soon be handled differently with the new
scan() API call, regardless.
2012-08-03 10:27:36 +02:00
Bert Vermeulen 45c59c8bdd sr: moved sigrok.h so libsigrok/libsigrok.h
All frontends will have to include <libsigrok/libsigrok.h> from now on.
This header includes proto.h and version.h, both installed from the
distribution into $INCLUDE/libsigrok/ as well.

The only dynamically changed header is now version.h, which has both
libsigrok and libtool compile-time versions in it.
2012-07-05 01:17:28 +02:00
Uwe Hermann ebc3473882 sr: s/err/ret/ for consistency.
We use ret, err, error, and others for return codes of functions.
Standardize on 'ret' for consistency reasons for now.
2012-03-21 23:20:06 +01:00
Uwe Hermann 2f8cf27409 sr: s/sr_dev_probe_name/sr_dev_probe_name_set/. 2012-03-01 23:49:24 +01:00
Uwe Hermann c09f0b578c sr/cli/gtk/qt/: s/plugin/driver/. 2012-02-28 23:52:30 +01:00
Bert Vermeulen 2285cf9bc5 sr: code cleanup 2012-02-28 17:47:02 +01:00
Uwe Hermann a9a245b428 sr: s/config_set/dev_config_set/.
This functions is per-device-instance, so use dev_ as prefix as with
the other ones.
2012-02-18 12:11:15 +01:00
Uwe Hermann 5097b0d091 sr/cli/gtk/qt: s/get_dev_info/dev_info_get/. 2012-02-18 11:41:21 +01:00
Uwe Hermann a7d05fcb38 sr/cli/gtk/qt: s/configuration/config/. 2012-02-18 00:31:35 +01:00