wlauto.instrumentation.daq package

Module contents

class wlauto.instrumentation.daq.Daq(device, **kwargs)[source]

Bases: wlauto.core.instrumentation.Instrument

aliases = AC([])
artifacts = AC([])
core_modules = []
description = "\n DAQ instrument obtains the power consumption of the target device's core\n measured by National Instruments Data Acquisition(DAQ) device.\n\n WA communicates with a DAQ device server running on a Windows machine\n (Please refer to :ref:`daq_setup`) over a network. You must specify the IP\n address and port the server is listening on in the config file as follows ::\n\n daq_server_host = ''\n daq_server_port = 45677\n\n These values will be output by the server when you run it on Windows.\n\n You must also specify the values of resistors (in Ohms) across which the\n voltages are measured (Please refer to :ref:`daq_setup`). The values should be\n specified as a list with an entry for each resistor, e.g.::\n\n daq_resistor_values = [0.005, 0.005]\n\n In addition to this mandatory configuration, you can also optionally specify the\n following::\n\n :daq_labels: Labels to be used for ports. Defaults to ``'PORT_<pnum>'``, where\n 'pnum' is the number of the port.\n :daq_device_id: The ID under which the DAQ is registered with the driver.\n Defaults to ``'Dev1'``.\n :daq_v_range: Specifies the voltage range for the SOC voltage channel on the DAQ\n (please refer to :ref:`daq_setup` for details). Defaults to ``2.5``.\n :daq_dv_range: Specifies the voltage range for the resistor voltage channel on\n the DAQ (please refer to :ref:`daq_setup` for details).\n Defaults to ``0.2``.\n :daq_sampling_rate: DAQ sampling rate. DAQ will take this many samples each\n second. Please note that this maybe limitted by your DAQ model\n and then number of ports you're measuring (again, see\n :ref:`daq_setup`). Defaults to ``10000``.\n :daq_channel_map: Represents mapping from logical AI channel number to physical\n connector on the DAQ (varies between DAQ models). The default\n assumes DAQ 6363 and similar with AI channels on connectors\n 0-7 and 16-23.\n\n "
finalize(*args, **kwargs)
initialize(*args, **kwargs)
kind = 'instrument'
name = 'daq'
parameters = AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'server_host', 'constraint': None, 'default': 'localhost', 'allowed_values': None, 'global_alias': 'daq_server_host', 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'server_port', 'constraint': None, 'default': 45677, 'allowed_values': None, 'global_alias': 'daq_server_port', 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'device_id', 'constraint': None, 'default': 'Dev1', 'allowed_values': None, 'global_alias': 'daq_device_id', 'override': False})", "Param({'kind': <type 'float'>, 'mandatory': None, 'name': 'v_range', 'constraint': None, 'default': 2.5, 'allowed_values': None, 'global_alias': 'daq_v_range', 'override': False})", "Param({'kind': <type 'float'>, 'mandatory': None, 'name': 'dv_range', 'constraint': None, 'default': 0.2, 'allowed_values': None, 'global_alias': 'daq_dv_range', 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'sampling_rate', 'constraint': None, 'default': 10000, 'allowed_values': None, 'global_alias': 'daq_sampling_rate', 'override': False})", "Param({'kind': <type 'list'>, 'mandatory': True, 'name': 'resistor_values', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': 'daq_resistor_values', 'override': False})", "Param({'kind': <function list_of_ints>, 'mandatory': None, 'name': 'channel_map', 'constraint': None, 'default': (0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23), 'allowed_values': None, 'global_alias': 'daq_channel_map', 'override': False})", "Param({'kind': <function list_of_strs>, 'mandatory': None, 'name': 'labels', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': 'daq_labels', 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'negative_samples', 'constraint': None, 'default': 'keep', 'allowed_values': ['keep', 'zero', 'drop', 'abs'], 'global_alias': 'daq_negative_samples', 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'gpio_sync', 'constraint': <function <lambda>>, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function dict_or_bool>, 'mandatory': None, 'name': 'merge_channels', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})"])
validate(*args, **kwargs)

Ensures that either a dictionary or a boolean is used as a parameter.