How to use the pyvisa.visa_attributes.viAttrInfo function in PyVISA

To help you get started, we’ve selected a few PyVISA examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
_AttrSet('VI_ASRL_PAR_NONE', 'VI_ASRL_PAR_ODD', 'VI_ASRL_PAR_EVEN',
                 'VI_ASRL_PAR_MARK', 'VI_ASRL_PAR_SPACE'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_STOP_BITS':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt16,
        _AttrSet('VI_ASRL_STOP_ONE', 'VI_ASRL_STOP_ONE5', 'VI_ASRL_STOP_TWO'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_FLOW_CNTRL':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt16,
        _AttrBitSet('VI_ASRL_FLOW_NONE', 'VI_ASRL_FLOW_XON_XOFF',
                 'VI_ASRL_FLOW_RTS_CTS', 'VI_ASRL_FLOW_DTR_DSR'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_END_IN':
    viAttrInfo(
        viRW, viLocal, ViUInt16,
        _AttrSet('VI_ASRL_END_NONE', 'VI_ASRL_END_LAST_BIT',
                  'VI_ASRL_END_TERMCHAR'),
        '',
        ""
    ),
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
viAttrInfo(
        viRO, viGlobal, types.ViString, None,
        'resource class',
        "Specifies the resource class (for example, INSTR)."
    ),

    #Generic INSTR Resource Attributes
    'VI_ATTR_INTF_NUM':
        viAttrInfo(
        viRO, viGlobal, types.ViUInt16, _AttrRange(0, 0xFFFF),
        'interface number',
        "Board number for the given interface."
    ),

    'VI_ATTR_INTF_TYPE':
    viAttrInfo(
        viRO, viGlobal, types.ViUInt16,
        _AttrSet('VI_INTF_VXI', 'VI_INTF_GPIB', 'VI_INTF_GPIB_VXI', 'VI_INTF_ASRL',
              'VI_INTF_TCPIP', 'VI_INTF_USB'),
        'interface type',
        "Interface type of the given session."
    ),

    'VI_ATTR_INTF_INST_NAME':
    viAttrInfo(
        viRO, viGlobal, types.ViString, None,
        'interface name',
        "Human-readable text describing the given interface."
    ),

    # ASRL Specific INSTR Resource Attributes
    'VI_ATTR_ASRL_AVAIL_NUM':
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
'VI_ATTR_ASRL_AVAIL_NUM':
    viAttrInfo(
        viRO, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
        'number of bytes available at serial port',
        ""
    ),

    'VI_ATTR_ASRL_BAUD':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
        'serial baud rate',
        ""
    ),

    'VI_ATTR_ASRL_DATA_BITS':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt16, _AttrRange(5, 8),
        '',
        ""
    ),

    'VI_ATTR_ASRL_PARITY':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt16,
        _AttrSet('VI_ASRL_PAR_NONE', 'VI_ASRL_PAR_ODD', 'VI_ASRL_PAR_EVEN',
                 'VI_ASRL_PAR_MARK', 'VI_ASRL_PAR_SPACE'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_STOP_BITS':
    viAttrInfo(
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
self.attribute_name = name
        self.attribute_value = attribute

    def __repr__(self):
        # s = repr(self.typecode) + repr(self.values)
        # return s
        return repr(self.__dict__)


#VISA Template Attributes
#Table 3.2.1

#: List of VISA Attributes, as dictionary with string keys
attributes_s = {
    'VI_ATTR_RSRC_IMPL_VERSION':
    viAttrInfo(
        viRO, viGlobal, types.ViVersion,
        _AttrRange(0, 0xFFFFFFFF),
        'implementation version',
        "Resource version that uniquely identifies each of the different "
        "revisions or implementations of a resource."
    ),

    'VI_ATTR_RSRC_LOCK_STATE':
    viAttrInfo(
        viRO, viGlobal, types.ViAccessMode,
        _AttrSet('VI_NO_LOCK', 'VI_EXCLUSIVE_LOCK', 'VI_SHARED_LOCK'),
        'lock state',
        "The current locking state of the resource. The resource can be "
        "unlocked, locked with an exclusive lock, or locked with a shared "
        "lock."
    ),
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
viAttrInfo(
        viRW, viLocal, types.ViUInt8, None,  # 0 to FFh
        '',
        ""
    ),

    'VI_ATTR_ASRL_XOFF_CHAR':
    viAttrInfo(
        viRW, viLocal, types.ViUInt8, None,  # 0 to FFh
        '',
        ""
    ),

    #Event Attributes: VI_EVENT_IO_COMPLETION
    'VI_ATTR_EVENT_TYPE':
    viAttrInfo(
        viRO, None, types.ViEventType,
        _AttrSet('VI_EVENT_IO_COMPLETION'),  # FIXME: add other Events
        'event type',
        "Unique logical identifier of the event type."
    ),

    'VI_ATTR_STATUS':
    viAttrInfo(
        viRO, None, types.ViStatus,
        _AttrSet(*map(lambda x: x[0], completion_and_error_messages.values())),
                 # list of status codes, FIXME
        'return code of asynchronous operation that has completed',
        ""
    ),

    'VI_ATTR_JOB_ID':
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
viRO, viGlobal, types.ViUInt16, _AttrRange(0, 0xFFFF),
        'interface number',
        "Board number for the given interface."
    ),

    'VI_ATTR_INTF_TYPE':
    viAttrInfo(
        viRO, viGlobal, types.ViUInt16,
        _AttrSet('VI_INTF_VXI', 'VI_INTF_GPIB', 'VI_INTF_GPIB_VXI', 'VI_INTF_ASRL',
              'VI_INTF_TCPIP', 'VI_INTF_USB'),
        'interface type',
        "Interface type of the given session."
    ),

    'VI_ATTR_INTF_INST_NAME':
    viAttrInfo(
        viRO, viGlobal, types.ViString, None,
        'interface name',
        "Human-readable text describing the given interface."
    ),

    # ASRL Specific INSTR Resource Attributes
    'VI_ATTR_ASRL_AVAIL_NUM':
    viAttrInfo(
        viRO, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
        'number of bytes available at serial port',
        ""
    ),

    'VI_ATTR_ASRL_BAUD':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
viRO, viGlobal, types.ViUInt16, _AttrRange(0, 0x3FFF),
        'resource manufacturer ID',
        "A value that corresponds to the VXI manufacturer ID of the "
        "manufacturer that created the implementation."
    ),

    'VI_ATTR_RSRC_MANF_NAME':
    viAttrInfo(
        viRO, viGlobal, types.ViString, None,
        'resource manufacturer name',
        "A string that corresponds to the VXI manufacturer name of the "
        "manufacturer that created the implementation."
    ),

    'VI_ATTR_RSRC_NAME':
    viAttrInfo(
        viRO, viGlobal, types.ViRsrc, None,
        'resource name',
        "The unique identifier for a resource compliant with the address "
        "structure presented in Section 4.4.1, Address String."
    ),

    'VI_ATTR_RSRC_SPEC_VERSION':
    viAttrInfo(
        viRO, viGlobal, types.ViVersion, None,
        'resource specification version',
        "Resource version that uniquely identifies the version of the VISA "
        "specification to which the implementation is compliant."
    ),

    'VI_ATTR_RSRC_CLASS':
    viAttrInfo(
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
_AttrSet('VI_INTF_VXI', 'VI_INTF_GPIB', 'VI_INTF_GPIB_VXI', 'VI_INTF_ASRL',
              'VI_INTF_TCPIP', 'VI_INTF_USB'),
        'interface type',
        "Interface type of the given session."
    ),

    'VI_ATTR_INTF_INST_NAME':
    viAttrInfo(
        viRO, viGlobal, types.ViString, None,
        'interface name',
        "Human-readable text describing the given interface."
    ),

    # ASRL Specific INSTR Resource Attributes
    'VI_ATTR_ASRL_AVAIL_NUM':
    viAttrInfo(
        viRO, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
        'number of bytes available at serial port',
        ""
    ),

    'VI_ATTR_ASRL_BAUD':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
        'serial baud rate',
        ""
    ),

    'VI_ATTR_ASRL_DATA_BITS':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt16, _AttrRange(5, 8),
        '',
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
viAttrInfo(
        viRO, viGlobal, types.ViString, None,
        'interface name',
        "Human-readable text describing the given interface."
    ),

    # ASRL Specific INSTR Resource Attributes
    'VI_ATTR_ASRL_AVAIL_NUM':
    viAttrInfo(
        viRO, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
        'number of bytes available at serial port',
        ""
    ),

    'VI_ATTR_ASRL_BAUD':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt32, None,  # 0 to 0xFFFFFFFFL
        'serial baud rate',
        ""
    ),

    'VI_ATTR_ASRL_DATA_BITS':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt16, _AttrRange(5, 8),
        '',
        ""
    ),

    'VI_ATTR_ASRL_PARITY':
    viAttrInfo(
        viRW, viGlobal, types.ViUInt16,
        _AttrSet('VI_ASRL_PAR_NONE', 'VI_ASRL_PAR_ODD', 'VI_ASRL_PAR_EVEN',
github pyvisa / pyvisa / pyvisa / visa_attributes.py View on Github external
viRO, viGlobal, types.ViInt16,
        _AttrSet('VI_STATE_ASSERTED', 'VI_STATE_UNASSERTED', 'VI_STATE_UNKNOWN'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_DTR_STATE':
    viAttrInfo(
        viRW, viGlobal, types.ViInt16,
        _AttrSet('VI_STATE_ASSERTED', 'VI_STATE_UNASSERTED', 'VI_STATE_UNKNOWN'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_RI_STATE':
    viAttrInfo(
        viRO, viGlobal, types.ViInt16,
        _AttrSet('VI_STATE_ASSERTED', 'VI_STATE_UNASSERTED', 'VI_STATE_UNKNOWN'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_RTS_STATE':
    viAttrInfo(
        viRW, viGlobal, types.ViInt16,
        _AttrSet('VI_STATE_ASSERTED', 'VI_STATE_UNASSERTED', 'VI_STATE_UNKNOWN'),
        '',
        ""
    ),

    'VI_ATTR_ASRL_REPLACE_CHAR':
    viAttrInfo(