1. 11 Nov, 2017 1 commit
  2. 03 Oct, 2017 1 commit
  3. 11 Mar, 2017 1 commit
  4. 10 Mar, 2017 2 commits
  5. 21 Jan, 2017 2 commits
  6. 20 Jan, 2017 2 commits
    • Gerhard Sittig's avatar
      scpi: Don't process received data of zero length · 90084681
      Gerhard Sittig authored
      When nothing was received in a read attempt, we need not adjust the
      buffered data's read position nor the glib string object's size. Skip
      any processing for empty input, just keep checking for timeouts.
      90084681
    • Gerhard Sittig's avatar
      scpi: Rephrase buffer resize for free space during SCPI read, add comments · ad21865f
      Gerhard Sittig authored
      Routine sr_scpi_get_data() checks for free space in the receive buffer,
      and resizes the buffer when free space drops below a threshold. The
      previous logic assumed that the resize and the read logic would interact
      in some specific way to achieve the desired operation.
      
      Adjust the buffer resize such that more free space is pre-allocated, yet
      the payload size of the buffer is not affected. This eliminates the
      dependency of the optional resize logic from subsequent activity for
      reception of data that is non-optional.
      
      Add comments while we are here, outline the steps taken in the
      sr_scpi_get_data() routine.
      ad21865f
  7. 07 Jan, 2017 4 commits
    • Gerhard Sittig's avatar
      Revert "scpi: Don't process received data of zero length" · d5a61aaf
      Gerhard Sittig authored
      Undo the change which skips management activities when no data was
      received. This change breaks the current implementation, and needs to
      get deferred until a delicate interaction between the resize and the
      read logic has been eliminated.
      d5a61aaf
    • Gerhard Sittig's avatar
      scpi: Rephrase length logic in data block reception, comment/group code · 26e8c6a2
      Gerhard Sittig authored
      Slightly rephrase the SCPI code which parses the responses that carry
      (binary) data blocks. Be explicit about NUL termination when parsing the
      leading length spec in the response, obsoleting the array initializer.
      Add lots of comments and group source code lines to better reflect
      what's happening from the protocol's perspective.
      
      Fix the returned error code in the path which reads responses of
      excessive length in chunks. The previous implementation detected errors
      but always returned code 0 (success).
      26e8c6a2
    • Gerhard Sittig's avatar
      scpi: Don't process received data of zero length · 904401e8
      Gerhard Sittig authored
      When nothing was received in a read attempt, we need not adjust the
      buffered data's read position nor the glib string object's size. Skip
      any processing for empty input, just keep checking for timeouts.
      904401e8
    • Gerhard Sittig's avatar
      scpi: Minor style nits · d3de86f3
      Gerhard Sittig authored
      Drop an initial assignment to a variable which never takes effect.
      Add braces around the body of a more complex if block. Separate routines
      from each other by exactly one empty line.
      d3de86f3
  8. 29 Aug, 2016 1 commit
  9. 16 May, 2016 1 commit
    • Stefan Brüns's avatar
      scpi: Add support for arbitray/definite length block data retrieval · ff01b0ea
      Stefan Brüns authored
      Binary block data is specified in IEEE 488.2. First character is '#',
      followed by a single ascii digit denoting the the number of digits needed
      for the length specification. Length is given in bytes.
      
      This allows drivers to replace retrieval of comma separated ASCII values
      with binary formats. See bug #791.
      ff01b0ea
  10. 23 Apr, 2016 1 commit
    • Stefan Brüns's avatar
      spci: Terminate all commands with a linefeed for all transports · 055804e8
      Stefan Brüns authored
      While some transports add a terminating (carriagereturn+)linefeed
      unconditionally, the USBTMC transport does not. At least the R&S HMO1002
      requires the linefeed and locks up otherwise. Fixes bug #784.
      
      This changes the TCP and VXI transport from CR+LF to LF only.
      
      Also fixes a possible memory leak for VXI, where the temporary command
      buffer was not freed in case of a write error.
      055804e8
  11. 26 Dec, 2015 1 commit
  12. 25 Oct, 2015 1 commit
  13. 25 Sep, 2015 1 commit
    • Uwe Hermann's avatar
      Fix a few "value never read" scan-build warnings. · e57057ae
      Uwe Hermann authored
      This fixes parts of bug #423.
      
      The list of fixed warnings:
      
      src/output/srzip.c:285:3: warning: Value stored to 'ret' is never read
                      ret = zip_append(o, logic->data, logic->unitsize, logic->length);
                      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/scpi/scpi.c:610:2: warning: Value stored to 'ret' is never read
              ret = SR_OK;
              ^     ~~~~~
      src/scpi/scpi.c:667:2: warning: Value stored to 'ret' is never read
              ret = SR_OK;
              ^     ~~~~~
      src/dmm/vc870.c:410:2: warning: Value stored to 'info_local' is never read
              info_local = (struct vc870_info *)info;
              ^            ~~~~~~~~~~~~~~~~~~~~~~~~~
      src/hardware/conrad-digi-35-cpu/api.c:130:2: warning: Value stored to 'ret' is never read
              ret = SR_OK;
              ^     ~~~~~
      src/hardware/fx2lafw/api.c:658:2: warning: Value stored to 'timeout' is never read
              timeout = fx2lafw_get_timeout(devc);
              ^         ~~~~~~~~~~~~~~~~~~~~~~~~~
      src/hardware/gmc-mh-1x-2x/protocol.c:941:3: warning: Value stored to 'retc' is never read
                      retc = SR_ERR_ARG;
                      ^      ~~~~~~~~~~
      src/hardware/gmc-mh-1x-2x/api.c:168:2: warning: Value stored to 'model' is never read
              model = METRAHIT_NONE;
              ^       ~~~~~~~~~~~~~
      src/hardware/ikalogic-scanalogic2/api.c:325:2: warning: Value stored to 'ret' is never read
              ret = SR_OK;
              ^     ~~~~~
      src/hardware/openbench-logic-sniffer/api.c:185:3: warning: Value stored to 'devc' is never read
                      devc = sdi->priv;
                      ^      ~~~~~~~~~
      src/hardware/rigol-ds/api.c:813:3: warning: Value stored to 'devc' is never read
                      devc = sdi->priv;
                      ^      ~~~~~~~~~
      src/hardware/scpi-pps/api.c:405:2: warning: Value stored to 'ret' is never read
              ret = SR_OK;
              ^     ~~~~~
      src/hardware/yokogawa-dlm/api.c:239:2: warning: Value stored to 'ret' is never read
              ret = SR_ERR_NA;
              ^     ~~~~~~~~~
      e57057ae
  14. 21 Sep, 2015 1 commit
  15. 13 Sep, 2015 2 commits
  16. 25 Aug, 2015 3 commits
  17. 16 Aug, 2015 1 commit
    • Daniel Elstner's avatar
      Build: Set local include directories in Makefile.am · c1aae900
      Daniel Elstner authored
      Move the include flags for files in the source tree from
      configure.ac to Makefile.am where they belong.  Also use
      AM_CPPFLAGS instead of CFLAGS/CXXFLAGS to make sure the
      files in the build/source tree are always picked up first.
      
      Also, remove the include/libsigrok sub-directory from the
      search path, thereby making the <libsigrok/> prefix mandatory
      when building libsigrok itself.  This matches the convention
      already imposed on users of the library.
      c1aae900
  18. 29 Apr, 2015 1 commit
    • Alexandru Gagniuc's avatar
      scpi: Accept *IDN responses with more than four tokens · 0c08023f
      Alexandru Gagniuc authored
      Some devices with more than one microcontroller report the firmware
      version for each of them, giving us more than four tokens. When that
      happens, sigrok aborts, even though it received a valid response.
      
      This happens, for example with the Chroma 61604:
      'Chroma ATE,61604,001060,1.25,1.34,1.20'
      0c08023f
  19. 24 Mar, 2015 2 commits
  20. 11 Jan, 2015 1 commit
    • Mathias Katzer's avatar
      scpi: Fix incomplete data issue for e.g. Hameg HMO1024. · 3b95bd91
      Mathias Katzer authored
      On a Hameg HMO1024 you get incomplete data because the USB transfer takes
      longer than the scpi->read_timeout_ms of 1 second that is defined in
      scpi_dev_inst_new(). Therefore reset the timeout in sr_scpi_get_string()
      whenever the device sends a partial response.
      3b95bd91
  21. 22 Nov, 2014 1 commit
    • Uwe Hermann's avatar
      Use g_malloc0() consistently, simplify error handling. · 91219afc
      Uwe Hermann authored
      Use g_malloc0() for small allocations and assume they always
      succeed. Simplify error handling in a few places accordingly.
      
      Don't always sanity-check parameters for non-public (SR_PRIV)
      functions, we require the developers to invoke them correctly.
      This allows further error handling simplifications.
      91219afc
  22. 17 Oct, 2014 1 commit
  23. 03 Oct, 2014 1 commit
  24. 11 Sep, 2014 1 commit
  25. 09 Sep, 2014 1 commit
  26. 05 Sep, 2014 2 commits
  27. 10 Aug, 2014 1 commit
  28. 22 Jul, 2014 1 commit
  29. 21 Jul, 2014 1 commit