Commit Graph

2886 Commits

Author SHA1 Message Date
Janne Huttunen 23601f2c7e Add quantity and flag for difference measurements.
Add 'SR_MQ_DIFFERENCE' quantity for reporting relative difference
between the current measurement and the reference value. The value
of this quantity will normally be reported in percents. Add also
the flag 'SR_MQFLAG_REFERENCE' for indicating that the reported
value is not the current measurement but the reference value instead.
2014-10-12 23:18:02 +02:00
Janne Huttunen 87d8124577 Add measured quantities for LCR meters.
Add parallel and serial model inductance, capacitance and resistance
for LCR meter measurements. Add also secondary quantities many LCR
meters calculate, namely dissipation factor, quality factor and phase
angle.
2014-10-12 23:18:02 +02:00
Janne Huttunen 01789adc72 Add two new units.
Add degrees and henrys to the list of supported units. Degree is
an unit of plane angle where one degree is 1/360th of a full circle.
Henry is the SI unit of inductance.
2014-10-12 23:18:02 +02:00
Uwe Hermann 8b4f0d6a11 README: Bump glib version to 2.34. 2014-10-12 19:59:41 +02:00
Aurelien Jacobs 76bc5f6376 usb: Simplify usb_get_port_path() and fix writing into a const char *. 2014-10-12 19:36:11 +02:00
Bert Vermeulen d099d88021 Fix sr_dev_has_option().
This wasn't taking the SR_CONF_GET/_SET/_LIST flags into account.

Thanks to Janne Huttunen for spotting this.
2014-10-09 23:42:24 +02:00
Bert Vermeulen 818df9f8ec build: Require glib 2.34. 2014-10-08 23:14:01 +02:00
Bert Vermeulen f4d3a4fb9a ols: Fix serial port timeout. 2014-10-08 03:00:47 +02:00
Bert Vermeulen 9e6d9bee2a colead-slm: Fix serial port timeout. 2014-10-08 02:23:20 +02:00
Jens Steinhauser 174bf146e5 bindings: Better error handling in enumeration get() function.
Prior to this patch a call to get() with an invalid enumeration value
would raise an exception that would, for example, terminate the python
interpreter, whereas now the exception is handled and translated into a
proper python exception.
2014-10-07 15:15:17 +02:00
Bert Vermeulen 2eb1612d46 atten-pps3xxx: Use serial_timeout(). 2014-10-06 12:12:13 +02:00
Bert Vermeulen c5cfc735e5 serial: Add serial_timeout().
This calculates a proper timeout value for blocking writes on the
given serial port, for the given number of bytes. Timeout is based
on a fixed 10ms OS overhead, baud rate, data bits and stop bits.
2014-10-06 12:10:25 +02:00
Bert Vermeulen 945cfd4fdd atten-pps3xxx: Fix serial port timeout. 2014-10-05 12:29:28 +02:00
Bert Vermeulen 204014007f fluke-dmm: Fix blocking serial write timeout. 2014-10-04 10:39:11 +02:00
Bert Vermeulen 95779b43b8 agilent-dmm: Fix blocking serial write timeout. 2014-10-04 10:39:11 +02:00
Bert Vermeulen 4ab01c3564 input/csv: Fix size_t printing. 2014-10-04 10:39:11 +02:00
Uwe Hermann 026d6b2ff6 unit tests: Fix build due to recent changes. 2014-10-03 20:11:47 +02:00
Martin Ling 9092e66888 Add a configurable read timeout to blocking SCPI reads, default 1s. 2014-10-03 13:40:41 +02:00
Bert Vermeulen 57d355a7bd Add some Agilent USBTMC PIDs. 2014-10-03 13:39:06 +02:00
Martin Ling eead278242 Add a timeout parameter to blocking serial calls.
Set this new parameter to 0 (no timeout) at every call site. This is
consistent with previous behaviour, so cannot cause any regressions.

Waiting forever for a serial operation is clearly always wrong. Without
specific knowledge of each device and driver however, I can't choose
appropriate timeouts for each call. The maintainers of these drivers
will need to do so, and also add appropriate handling of timeouts.

When this commit is merged, a bug should be entered for each driver
that is touched by it.
2014-10-02 22:06:16 +02:00
Bert Vermeulen 7ce59a3133 Avoid serial_write_blocking() warnings. 2014-10-02 16:01:27 +02:00
Martin Ling 081c214eac Fix similar broken error handling on several serial calls. 2014-10-02 15:57:02 +02:00
Bert Vermeulen 7f22cd9554 kecheng-kc-330b: Fix missing time/frequency weighting. 2014-10-02 15:06:36 +02:00
Bert Vermeulen 8219214ff0 hantek-dso: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 15:03:18 +02:00
Bert Vermeulen 385cb66058 demo: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 15:02:14 +02:00
Bert Vermeulen f4d0020ec6 fluke-dmm: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 15:00:37 +02:00
Bert Vermeulen 65c8d48f14 chronovu-la8: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 14:58:57 +02:00
Bert Vermeulen 382cb19f29 asix-sigma: Trigger code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 14:53:20 +02:00
Bert Vermeulen 90486ba835 agilent-dmm: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 14:11:35 +02:00
Bert Vermeulen f3616a0857 scpi/vxc: Avoid NULL dereference.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 14:07:31 +02:00
Bert Vermeulen 18078d0532 input/csv: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 13:59:44 +02:00
Bert Vermeulen 74e1f6f53c input/chronovu_la8: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 13:55:37 +02:00
Bert Vermeulen 577a9fe423 input/binary: Code cleanup.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 13:55:21 +02:00
Bert Vermeulen 6409821143 input: Avoid NULL dereference.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 13:51:19 +02:00
Bert Vermeulen 19e43ab21b sr_parse_sizestring: Deal with invalid strings better.
This cleans up a warning generated by clang's static analyzer.
2014-10-02 12:57:19 +02:00
Bert Vermeulen d386a52f64 Clean up sr_session_load().
This cleans up some warnings generated by clang's static analyzer.
The function now also returns SR_ERR to signify the specified filename
does not point to a valid session file.

Other SR_ERR_* returns indicate a session file was found, but loading
failed.
2014-10-02 11:32:52 +02:00
Martin Ling 98d39b919a Return sensible Device::description() for session and input devices. 2014-09-30 17:32:09 +01:00
Martin Ling ca4e307a93 C++: Fix management of SessionDevice objects. 2014-09-30 16:05:27 +01:00
Martin Ling 584f76a78a C++: Add spaces in Device::description(). 2014-09-30 13:19:27 +01:00
Martin Ling d1075e5acf C++: Expose device serial number and connection ID. 2014-09-30 11:50:07 +01:00
Martin Ling 4c7c4194cb C++: Expose config key capabilities. 2014-09-30 11:07:55 +01:00
Martin Ling 9c51e8ec56 bindings: Update for input API changes. 2014-09-30 01:50:17 +02:00
Bert Vermeulen 753793eff5 Clean up internal input API docs. 2014-09-30 01:49:58 +02:00
Bert Vermeulen 60107497fe input: Use SR_ERR_NA instead of SR_OK_CONTINUE. 2014-09-30 01:49:58 +02:00
Bert Vermeulen d5cc282ff8 input: sr_input_free() is now a void function.
Its backend, input_module.cleanup(), is now also a void function.
2014-09-30 01:49:58 +02:00
Bert Vermeulen 7066fd4660 input: Add sr_input_end().
This signifies to the module instance no more input will come. This
will cause the module to process any data it may have buffered. The
SR_DF_END packet will also typically be sent at this time.
2014-09-30 01:49:58 +02:00
Bert Vermeulen 89da5b3b54 input: Free instance-private storage at instance free. 2014-09-30 01:49:58 +02:00
Bert Vermeulen d018181331 input: Add sdi_ready flag to struct sr_input.
When an input module instance has received enough input to fully
populate the struct sr_dev_inst, sdi_ready is set to TRUE and its
receive() method returns immediately. Any remaining received data
is buffered until the next time the function is called.
2014-09-30 01:49:58 +02:00
Soeren Apel 66c91e2509 Removal of sdi->index, step 8: fix victor-dmm 2014-09-30 01:42:58 +02:00
Soeren Apel bde9fbd197 Removal of sdi->index, step 7: fix testo 2014-09-30 01:42:58 +02:00