1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 03:12:34 +01:00

Updated daqpower package

- Now works with earlier versions of the DAQmx driver. This is needed to
  be able to run the server on Linux systems, which support older
  verisions of the driver only.
- DAQ error messages are now properly propaged to the client (PyDAQmx
  uses "mess" rather than "message" attribute to store the message in
  the Exception obejects).
- pylint and pep8 fixes
This commit is contained in:
Sergei Trofimov
2015-06-09 10:59:56 +01:00
parent 0c19d75bf4
commit c239322c4d
8 changed files with 132 additions and 41 deletions

View File

@@ -134,8 +134,8 @@ class Daq(Instrument):
]
def initialize(self, context):
devices = self._execute_command('list_devices')
if not devices:
status, devices = self._execute_command('list_devices')
if status == daq.Status.OK and not devices:
raise InstrumentError('DAQ: server did not report any devices registered with the driver.')
self._results = OrderedDict()
@@ -235,7 +235,7 @@ class Daq(Instrument):
raise InstrumentError('DAQ: {}'.format(result.message))
else:
raise InstrumentError('DAQ: Unexpected result: {} - {}'.format(result.status, result.message))
return result.data
return (result.status, result.data)
def _send_daq_command(q, *args, **kwargs):