From eef0c0771ccc6f4c8da317abab0e934c8b1d8c2a Mon Sep 17 00:00:00 2001 From: Documentation Bot Date: Tue, 19 Sep 2017 09:19:50 +0000 Subject: [PATCH] Generated gh-pages for commit e4a22f98 Author: Jens Hedegaard Nielsen Fix: ip instrument log empty responce and ensure all data is send (#719) --- _modules/qcodes/instrument/ip.html | 10 ++++++++-- api/generated/qcodes.instrument_drivers.Advantech.html | 2 +- api/generated/qcodes.instrument_drivers.QDev.html | 4 ++-- api/generated/qcodes.instrument_drivers.ithaco.html | 2 +- .../qcodes.instrument_drivers.signal_hound.html | 4 ++-- api/generated/qcodes.instrument_drivers.tektronix.html | 4 ++-- api/generated/qcodes.utils.helpers.html | 2 +- 7 files changed, 17 insertions(+), 11 deletions(-) diff --git a/_modules/qcodes/instrument/ip.html b/_modules/qcodes/instrument/ip.html index 90bacc5ed35..62888add8eb 100644 --- a/_modules/qcodes/instrument/ip.html +++ b/_modules/qcodes/instrument/ip.html @@ -165,9 +165,11 @@

Source code for qcodes.instrument.ip

 """Ethernet instrument driver class based on sockets."""
 import socket
+import logging
 
 from .base import Instrument
 
+log = logging.getLogger(__name__)
 
 
[docs]class IPInstrument(Instrument): @@ -304,10 +306,14 @@

Source code for qcodes.instrument.ip

 
     def _send(self, cmd):
         data = cmd + self._terminator
-        self._socket.send(data.encode())
+        self._socket.sendall(data.encode())
 
     def _recv(self):
-        return self._socket.recv(self._buffer_size).decode()
+        result = self._socket.recv(self._buffer_size)
+        if result == b'':
+            log.warning("Got empty response from Socket recv() "
+                        "Connection broken.")
+        return result.decode()
 
     def close(self):
         """Disconnect and irreversibly tear down the instrument."""
diff --git a/api/generated/qcodes.instrument_drivers.Advantech.html b/api/generated/qcodes.instrument_drivers.Advantech.html
index 5beabd1cfef..83c30cb095c 100644
--- a/api/generated/qcodes.instrument_drivers.Advantech.html
+++ b/api/generated/qcodes.instrument_drivers.Advantech.html
@@ -233,7 +233,7 @@ 

Submodules
-ERRORMSG = {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: "The handle is NULL or its type doesn't match the required operation.", 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: "The handle hasn't own the privilege of the operation the user wanted.", 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: "The function is not initialized and can't be started.", 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.'}
+ERRORMSG = {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: "The handle is NULL or its type doesn't match the required operation.", 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: "The function is not initialized and can't be started.", 3758096388: 'Not enough memory is available to complete the operation.', 3758096410: 'The interrupt resource is not available.', 3758096399: "The handle hasn't own the privilege of the operation the user wanted.", 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.'}
diff --git a/api/generated/qcodes.instrument_drivers.QDev.html b/api/generated/qcodes.instrument_drivers.QDev.html index 21dc3b76975..7c400102caa 100644 --- a/api/generated/qcodes.instrument_drivers.QDev.html +++ b/api/generated/qcodes.instrument_drivers.QDev.html @@ -280,7 +280,7 @@

Submodules
-voltage_range_status = {'X 1': 10, 'X 0.1': 1}
+voltage_range_status = {'X 0.1': 1, 'X 1': 10}

@@ -383,7 +383,7 @@

Submodules
-voltage_range_status = {'X 1': 10, 'X 0.1': 1}
+voltage_range_status = {'X 0.1': 1, 'X 1': 10}

diff --git a/api/generated/qcodes.instrument_drivers.ithaco.html b/api/generated/qcodes.instrument_drivers.ithaco.html index 81ef5c03e30..262919147f8 100644 --- a/api/generated/qcodes.instrument_drivers.ithaco.html +++ b/api/generated/qcodes.instrument_drivers.ithaco.html @@ -225,7 +225,7 @@

SubmodulesParameters:

-saStatus_inverted = {-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'}
+saStatus_inverted = {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'}
diff --git a/api/generated/qcodes.instrument_drivers.tektronix.html b/api/generated/qcodes.instrument_drivers.tektronix.html index 1a33febfa7c..edadbe18508 100644 --- a/api/generated/qcodes.instrument_drivers.tektronix.html +++ b/api/generated/qcodes.instrument_drivers.tektronix.html @@ -269,12 +269,12 @@

Submodules
-AWG_FILE_FORMAT_CHANNEL = {'OUTPUT_WAVEFORM_NAME_N': 's', 'CHANNEL_STATE_N': 'h', 'ANALOG_DIRECT_OUTPUT_N': 'h', 'ANALOG_FILTER_N': 'h', 'ANALOG_METHOD_N': 'h', 'ANALOG_AMPLITUDE_N': 'd', 'ANALOG_OFFSET_N': 'd', 'ANALOG_HIGH_N': 'd', 'ANALOG_LOW_N': 'd', 'MARKER1_SKEW_N': 'd', 'MARKER1_METHOD_N': 'h', 'MARKER1_AMPLITUDE_N': 'd', 'MARKER1_OFFSET_N': 'd', 'MARKER1_HIGH_N': 'd', 'MARKER1_LOW_N': 'd', 'MARKER2_SKEW_N': 'd', 'MARKER2_METHOD_N': 'h', 'MARKER2_AMPLITUDE_N': 'd', 'MARKER2_OFFSET_N': 'd', 'MARKER2_HIGH_N': 'd', 'MARKER2_LOW_N': 'd', 'DIGITAL_METHOD_N': 'h', 'DIGITAL_AMPLITUDE_N': 'd', 'DIGITAL_OFFSET_N': 'd', 'DIGITAL_HIGH_N': 'd', 'DIGITAL_LOW_N': 'd', 'EXTERNAL_ADD_N': 'h', 'PHASE_DELAY_INPUT_METHOD_N': 'h', 'PHASE_N': 'd', 'DELAY_IN_TIME_N': 'd', 'DELAY_IN_POINTS_N': 'd', 'CHANNEL_SKEW_N': 'd', 'DC_OUTPUT_LEVEL_N': 'd'}
+AWG_FILE_FORMAT_CHANNEL = {'ANALOG_AMPLITUDE_N': 'd', 'MARKER1_SKEW_N': 'd', 'MARKER1_AMPLITUDE_N': 'd', 'ANALOG_OFFSET_N': 'd', 'MARKER2_HIGH_N': 'd', 'DELAY_IN_TIME_N': 'd', 'MARKER1_LOW_N': 'd', 'PHASE_DELAY_INPUT_METHOD_N': 'h', 'DC_OUTPUT_LEVEL_N': 'd', 'ANALOG_DIRECT_OUTPUT_N': 'h', 'OUTPUT_WAVEFORM_NAME_N': 's', 'DIGITAL_METHOD_N': 'h', 'MARKER1_HIGH_N': 'd', 'ANALOG_LOW_N': 'd', 'DIGITAL_HIGH_N': 'd', 'MARKER2_SKEW_N': 'd', 'DELAY_IN_POINTS_N': 'd', 'DIGITAL_AMPLITUDE_N': 'd', 'MARKER2_LOW_N': 'd', 'ANALOG_METHOD_N': 'h', 'DIGITAL_LOW_N': 'd', 'MARKER2_METHOD_N': 'h', 'PHASE_N': 'd', 'MARKER2_AMPLITUDE_N': 'd', 'CHANNEL_STATE_N': 'h', 'DIGITAL_OFFSET_N': 'd', 'CHANNEL_SKEW_N': 'd', 'MARKER2_OFFSET_N': 'd', 'ANALOG_HIGH_N': 'd', 'ANALOG_FILTER_N': 'h', 'EXTERNAL_ADD_N': 'h', 'MARKER1_OFFSET_N': 'd', 'MARKER1_METHOD_N': 'h'}

-AWG_FILE_FORMAT_HEAD = {'SAMPLING_RATE': 'd', 'REPETITION_RATE': 'd', 'HOLD_REPETITION_RATE': 'h', 'CLOCK_SOURCE': 'h', 'REFERENCE_SOURCE': 'h', 'EXTERNAL_REFERENCE_TYPE': 'h', 'REFERENCE_CLOCK_FREQUENCY_SELECTION': 'h', 'REFERENCE_MULTIPLIER_RATE': 'h', 'DIVIDER_RATE': 'h', 'TRIGGER_SOURCE': 'h', 'INTERNAL_TRIGGER_RATE': 'd', 'TRIGGER_INPUT_IMPEDANCE': 'h', 'TRIGGER_INPUT_SLOPE': 'h', 'TRIGGER_INPUT_POLARITY': 'h', 'TRIGGER_INPUT_THRESHOLD': 'd', 'EVENT_INPUT_IMPEDANCE': 'h', 'EVENT_INPUT_POLARITY': 'h', 'EVENT_INPUT_THRESHOLD': 'd', 'JUMP_TIMING': 'h', 'INTERLEAVE': 'h', 'ZEROING': 'h', 'COUPLING': 'h', 'RUN_MODE': 'h', 'WAIT_VALUE': 'h', 'RUN_STATE': 'h', 'INTERLEAVE_ADJ_PHASE': 'd', 'INTERLEAVE_ADJ_AMPLITUDE': 'd'}
+AWG_FILE_FORMAT_HEAD = {'REFERENCE_MULTIPLIER_RATE': 'h', 'JUMP_TIMING': 'h', 'REFERENCE_SOURCE': 'h', 'TRIGGER_SOURCE': 'h', 'TRIGGER_INPUT_POLARITY': 'h', 'COUPLING': 'h', 'INTERLEAVE_ADJ_PHASE': 'd', 'INTERNAL_TRIGGER_RATE': 'd', 'ZEROING': 'h', 'HOLD_REPETITION_RATE': 'h', 'REFERENCE_CLOCK_FREQUENCY_SELECTION': 'h', 'SAMPLING_RATE': 'd', 'TRIGGER_INPUT_THRESHOLD': 'd', 'CLOCK_SOURCE': 'h', 'EXTERNAL_REFERENCE_TYPE': 'h', 'DIVIDER_RATE': 'h', 'EVENT_INPUT_IMPEDANCE': 'h', 'TRIGGER_INPUT_IMPEDANCE': 'h', 'TRIGGER_INPUT_SLOPE': 'h', 'INTERLEAVE': 'h', 'INTERLEAVE_ADJ_AMPLITUDE': 'd', 'EVENT_INPUT_POLARITY': 'h', 'RUN_STATE': 'h', 'REPETITION_RATE': 'd', 'EVENT_INPUT_THRESHOLD': 'd', 'WAIT_VALUE': 'h', 'RUN_MODE': 'h'}
diff --git a/api/generated/qcodes.utils.helpers.html b/api/generated/qcodes.utils.helpers.html index 03560bb64b5..ce52afecbe3 100644 --- a/api/generated/qcodes.utils.helpers.html +++ b/api/generated/qcodes.utils.helpers.html @@ -247,7 +247,7 @@ LogCapture([logger]) context manager to grab all log messages, optionally -NumpyJSONEncoder(*[, skipkeys, …]) +NumpyJSONEncoder([skipkeys, ensure_ascii, …]) Return numpy types as standard types.