Skip to content

Commit

Permalink
Generated gh-pages for commit e4a22f9
Browse files Browse the repository at this point in the history
Author: Jens Hedegaard Nielsen <jenshnielsen@gmail.com>

    Fix: ip instrument log empty responce and ensure all data is send (#719)
  • Loading branch information
Documentation Bot committed Sep 19, 2017
1 parent 343c449 commit eef0c07
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
10 changes: 8 additions & 2 deletions _modules/qcodes/instrument/ip.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@
<h1>Source code for qcodes.instrument.ip</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;Ethernet instrument driver class based on sockets.&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">socket</span>
<span class="kn">import</span> <span class="nn">logging</span>

<span class="kn">from</span> <span class="nn">.base</span> <span class="k">import</span> <span class="n">Instrument</span>

<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span>

<div class="viewcode-block" id="IPInstrument"><a class="viewcode-back" href="../../../api/generated/qcodes.IPInstrument.html#qcodes.IPInstrument">[docs]</a><span class="k">class</span> <span class="nc">IPInstrument</span><span class="p">(</span><span class="n">Instrument</span><span class="p">):</span>

Expand Down Expand Up @@ -304,10 +306,14 @@ <h1>Source code for qcodes.instrument.ip</h1><div class="highlight"><pre>

<span class="k">def</span> <span class="nf">_send</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cmd</span><span class="p">):</span>
<span class="n">data</span> <span class="o">=</span> <span class="n">cmd</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_terminator</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_socket</span><span class="o">.</span><span class="n">send</span><span class="p">(</span><span class="n">data</span><span class="o">.</span><span class="n">encode</span><span class="p">())</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_socket</span><span class="o">.</span><span class="n">sendall</span><span class="p">(</span><span class="n">data</span><span class="o">.</span><span class="n">encode</span><span class="p">())</span>

<span class="k">def</span> <span class="nf">_recv</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_socket</span><span class="o">.</span><span class="n">recv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_buffer_size</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">()</span>
<span class="n">result</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_socket</span><span class="o">.</span><span class="n">recv</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_buffer_size</span><span class="p">)</span>
<span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="sa">b</span><span class="s1">&#39;&#39;</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">&quot;Got empty response from Socket recv() &quot;</span>
<span class="s2">&quot;Connection broken.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">result</span><span class="o">.</span><span class="n">decode</span><span class="p">()</span>

<span class="k">def</span> <span class="nf">close</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Disconnect and irreversibly tear down the instrument.&quot;&quot;&quot;</span>
Expand Down
2 changes: 1 addition & 1 deletion api/generated/qcodes.instrument_drivers.Advantech.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<p>Tested with driver version 3.1.10.0 and ddl version 3.1.12.1.</p>
<dl class="attribute">
<dt id="qcodes.instrument_drivers.Advantech.PCIE_1751.Advantech_PCIE_1751.ERRORMSG">
<code class="descname">ERRORMSG</code><em class="property"> = {0: 'The operation is completed successfully.', 2684354560: 'The interrupt resource is not available.', 2684354561: 'The parameter is out of the range.', 2684354562: 'The property value is out of range.', 2684354563: 'The property value is not supported.', 2684354564: 'The property value conflicts with the current state.', 2684354565: 'The value range of all channels in a group should be same, such as 4~20mA of PCI-1724.', 3758096384: &quot;The handle is NULL or its type doesn't match the required operation.&quot;, 3758096385: 'The parameter value is out of range.', 3758096386: 'The parameter value is not supported.', 3758096387: 'The parameter value format is not the expected.', 3758096388: 'Not enough memory is available to complete the operation.', 3758096389: 'The data buffer is null.', 3758096390: 'The data buffer is too small for the operation.', 3758096391: 'The data length exceeded the limitation.', 3758096392: 'The required function is not supported.', 3758096393: 'The required event is not supported.', 3758096394: 'The required property is not supported.', 3758096395: 'The required property is read-only.', 3758096396: 'The specified property value conflicts with the current state.', 3758096397: 'The specified property value is out of range.', 3758096398: 'The specified property value is not supported.', 3758096399: &quot;The handle hasn't own the privilege of the operation the user wanted.&quot;, 3758096400: 'The required privilege is not available because someone else had own it.', 3758096401: 'The driver of specified device was not found.', 3758096402: 'The driver version of the specified device mismatched.', 3758096403: 'The loaded driver count exceeded the limitation.', 3758096404: 'The device is not opened.', 3758096405: 'The required device does not exist.', 3758096406: 'The required device is unrecognized by driver.', 3758096407: 'The configuration data of the specified device is lost or unavailable.', 3758096408: &quot;The function is not initialized and can't be started.&quot;, 3758096409: 'The function is busy.', 3758096410: 'The interrupt resource is not available.', 3758096411: 'The DMA channel is not available.', 3758096412: 'Time out when reading/writing the device.', 3758096413: 'The given signature does not match with the device current one.', 3758096414: 'The function cannot be executed while the buffered AI is running.', 3758096415: 'The value range is not available in single-ended mode.', 3758161919: 'Undefined error.'}</em><a class="headerlink" href="#qcodes.instrument_drivers.Advantech.PCIE_1751.Advantech_PCIE_1751.ERRORMSG" title="Permalink to this definition"></a></dt>
<code class="descname">ERRORMSG</code><em class="property"> = {0: 'The operation is completed successfully.', 2684354560: 'The interrupt resource is not available.', 2684354562: 'The property value is out of range.', 2684354563: 'The property value is not supported.', 2684354564: 'The property value conflicts with the current state.', 2684354565: 'The value range of all channels in a group should be same, such as 4~20mA of PCI-1724.', 3758096384: &quot;The handle is NULL or its type doesn't match the required operation.&quot;, 2684354561: 'The parameter is out of the range.', 3758096392: 'The required function is not supported.', 3758096393: 'The required event is not supported.', 3758096394: 'The required property is not supported.', 3758096395: 'The required property is read-only.', 3758096396: 'The specified property value conflicts with the current state.', 3758096386: 'The parameter value is not supported.', 3758096398: 'The specified property value is not supported.', 3758096397: 'The specified property value is out of range.', 3758096400: 'The required privilege is not available because someone else had own it.', 3758096401: 'The driver of specified device was not found.', 3758096402: 'The driver version of the specified device mismatched.', 3758096387: 'The parameter value format is not the expected.', 3758096404: 'The device is not opened.', 3758096405: 'The required device does not exist.', 3758096406: 'The required device is unrecognized by driver.', 3758096407: 'The configuration data of the specified device is lost or unavailable.', 3758096408: &quot;The function is not initialized and can't be started.&quot;, 3758096388: 'Not enough memory is available to complete the operation.', 3758096410: 'The interrupt resource is not available.', 3758096399: &quot;The handle hasn't own the privilege of the operation the user wanted.&quot;, 3758096412: 'Time out when reading/writing the device.', 3758096413: 'The given signature does not match with the device current one.', 3758096414: 'The function cannot be executed while the buffered AI is running.', 3758096389: 'The data buffer is null.', 3758096411: 'The DMA channel is not available.', 3758096385: 'The parameter value is out of range.', 3758096390: 'The data buffer is too small for the operation.', 3758096391: 'The data length exceeded the limitation.', 3758096403: 'The loaded driver count exceeded the limitation.', 3758096409: 'The function is busy.', 3758096415: 'The value range is not available in single-ended mode.', 3758161919: 'Undefined error.'}</em><a class="headerlink" href="#qcodes.instrument_drivers.Advantech.PCIE_1751.Advantech_PCIE_1751.ERRORMSG" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
Expand Down
4 changes: 2 additions & 2 deletions api/generated/qcodes.instrument_drivers.QDev.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<dl class="attribute">
<dt id="qcodes.instrument_drivers.QDev.QDac.QDac.voltage_range_status">
<code class="descname">voltage_range_status</code><em class="property"> = {'X 1': 10, 'X 0.1': 1}</em><a class="headerlink" href="#qcodes.instrument_drivers.QDev.QDac.QDac.voltage_range_status" title="Permalink to this definition"></a></dt>
<code class="descname">voltage_range_status</code><em class="property"> = {'X 0.1': 1, 'X 1': 10}</em><a class="headerlink" href="#qcodes.instrument_drivers.QDev.QDac.QDac.voltage_range_status" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
Expand Down Expand Up @@ -383,7 +383,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<dl class="attribute">
<dt id="qcodes.instrument_drivers.QDev.QDac_channels.QDac.voltage_range_status">
<code class="descname">voltage_range_status</code><em class="property"> = {'X 1': 10, 'X 0.1': 1}</em><a class="headerlink" href="#qcodes.instrument_drivers.QDev.QDac_channels.QDac.voltage_range_status" title="Permalink to this definition"></a></dt>
<code class="descname">voltage_range_status</code><em class="property"> = {'X 0.1': 1, 'X 1': 10}</em><a class="headerlink" href="#qcodes.instrument_drivers.QDev.QDac_channels.QDac.voltage_range_status" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
Expand Down
2 changes: 1 addition & 1 deletion api/generated/qcodes.instrument_drivers.ithaco.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>measured_param</strong> (<a class="reference internal" href="qcodes.Parameter.html#qcodes.Parameter" title="qcodes.Parameter"><em>Parameter</em></a>) – a gettable parameter returning the
voltage read from the Ithaco output.</li>
<li><strong>c_amp_ins</strong> (<a class="reference internal" href="#module-qcodes.instrument_drivers.ithaco.Ithaco_1211" title="qcodes.instrument_drivers.ithaco.Ithaco_1211"><em>Ithaco_1211</em></a>) – <p>an Ithaco instance where you manually
<li><strong>c_amp_ins</strong> (<a class="reference internal" href="#qcodes.instrument_drivers.ithaco.Ithaco_1211.Ithaco_1211" title="qcodes.instrument_drivers.ithaco.Ithaco_1211.Ithaco_1211"><em>Ithaco_1211</em></a>) – <p>an Ithaco instance where you manually
maintain the present settings of the real Ithaco amp.</p>
<p>Note: it should be possible to use other current preamps, if they
define parameters <code class="docutils literal"><span class="pre">sens</span></code> (sensitivity, in A/V), <code class="docutils literal"><span class="pre">sens_factor</span></code>
Expand Down
4 changes: 2 additions & 2 deletions api/generated/qcodes.instrument_drivers.signal_hound.html
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this

<dl class="attribute">
<dt id="qcodes.instrument_drivers.signal_hound.USB_SA124B.SignalHound_USB_SA124B.saStatus">
<code class="descname">saStatus</code><em class="property"> = {'saUnknownErr': -666, 'saFrequencyRangeErr': -99, 'saInvalidDetectorErr': -95, 'saInvalidScaleErr': -94, 'saBandwidthErr': -91, 'saExternalReferenceNotFound': -89, 'saOvenColdErr': -20, 'saInternetErr': -12, 'saUSBCommErr': -11, 'saTrackingGeneratorNotFound': -10, 'saDeviceNotIdleErr': -9, 'saDeviceNotFoundErr': -8, 'saInvalidModeErr': -7, 'saNotConfiguredErr': -6, 'saDeviceNotConfiguredErr': -6, 'saTooManyDevicesErr': -5, 'saInvalidParameterErr': -4, 'saDeviceNotOpenErr': -3, 'saInvalidDeviceErr': -2, 'saNullPtrErr': -1, 'saNoError': 0, 'saNoCorrections': 1, 'saCompressionWarning': 2, 'saParameterClamped': 3, 'saBandwidthClamped': 4}</em><a class="headerlink" href="#qcodes.instrument_drivers.signal_hound.USB_SA124B.SignalHound_USB_SA124B.saStatus" title="Permalink to this definition"></a></dt>
<code class="descname">saStatus</code><em class="property"> = {'saInvalidDeviceErr': -2, 'saNoError': 0, 'saOvenColdErr': -20, 'saInvalidDetectorErr': -95, 'saNullPtrErr': -1, 'saUnknownErr': -666, 'saBandwidthErr': -91, 'saNotConfiguredErr': -6, 'saCompressionWarning': 2, 'saDeviceNotOpenErr': -3, 'saInternetErr': -12, 'saFrequencyRangeErr': -99, 'saDeviceNotFoundErr': -8, 'saInvalidParameterErr': -4, 'saInvalidScaleErr': -94, 'saNoCorrections': 1, 'saUSBCommErr': -11, 'saTrackingGeneratorNotFound': -10, 'saParameterClamped': 3, 'saDeviceNotIdleErr': -9, 'saTooManyDevicesErr': -5, 'saInvalidModeErr': -7, 'saBandwidthClamped': 4, 'saDeviceNotConfiguredErr': -6, 'saExternalReferenceNotFound': -89}</em><a class="headerlink" href="#qcodes.instrument_drivers.signal_hound.USB_SA124B.SignalHound_USB_SA124B.saStatus" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="qcodes.instrument_drivers.signal_hound.USB_SA124B.SignalHound_USB_SA124B.saStatus_inverted">
<code class="descname">saStatus_inverted</code><em class="property"> = {-666: 'saUnknownErr', -99: 'saFrequencyRangeErr', -95: 'saInvalidDetectorErr', -94: 'saInvalidScaleErr', -91: 'saBandwidthErr', -89: 'saExternalReferenceNotFound', -20: 'saOvenColdErr', -12: 'saInternetErr', -11: 'saUSBCommErr', -10: 'saTrackingGeneratorNotFound', -9: 'saDeviceNotIdleErr', -8: 'saDeviceNotFoundErr', -7: 'saInvalidModeErr', -6: 'saDeviceNotConfiguredErr', -5: 'saTooManyDevicesErr', -4: 'saInvalidParameterErr', -3: 'saDeviceNotOpenErr', -2: 'saInvalidDeviceErr', -1: 'saNullPtrErr', 0: 'saNoError', 1: 'saNoCorrections', 2: 'saCompressionWarning', 3: 'saParameterClamped', 4: 'saBandwidthClamped'}</em><a class="headerlink" href="#qcodes.instrument_drivers.signal_hound.USB_SA124B.SignalHound_USB_SA124B.saStatus_inverted" title="Permalink to this definition"></a></dt>
<code class="descname">saStatus_inverted</code><em class="property"> = {0: 'saNoError', 1: 'saNoCorrections', 2: 'saCompressionWarning', 3: 'saParameterClamped', 4: 'saBandwidthClamped', -99: 'saFrequencyRangeErr', -95: 'saInvalidDetectorErr', -94: 'saInvalidScaleErr', -91: 'saBandwidthErr', -666: 'saUnknownErr', -89: 'saExternalReferenceNotFound', -20: 'saOvenColdErr', -12: 'saInternetErr', -2: 'saInvalidDeviceErr', -10: 'saTrackingGeneratorNotFound', -9: 'saDeviceNotIdleErr', -8: 'saDeviceNotFoundErr', -7: 'saInvalidModeErr', -6: 'saDeviceNotConfiguredErr', -5: 'saTooManyDevicesErr', -4: 'saInvalidParameterErr', -3: 'saDeviceNotOpenErr', -1: 'saNullPtrErr', -11: 'saUSBCommErr'}</em><a class="headerlink" href="#qcodes.instrument_drivers.signal_hound.USB_SA124B.SignalHound_USB_SA124B.saStatus_inverted" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
Expand Down
Loading

0 comments on commit eef0c07

Please sign in to comment.