Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
py_name = ''
visa_name = 'VI_ATTR_TCPIP_HOSTNAME'
visa_type = 'ViString'
default = NotAvailable
read, write, local = True, False, False
# [u'N/A']
# noinspection PyPep8Naming
class AttrVI_ATTR_TCPIP_KEEPALIVE(BooleanAttribute):
"""Setting this attribute to TRUE requests that a TCP/IP provider enable
the use of keep-alive packets on TCP connections. After the system
detects that a connection was dropped, VISA returns a lost
connection error code on subsequent I/O calls on the session. The
time required for the system to detect that the connection was
dropped is dependent on the system and is not settable.
"""
resources = [(constants.InterfaceType.tcpip, 'SOCKET')]
py_name = ''
visa_name = 'VI_ATTR_TCPIP_KEEPALIVE'
visa_type = 'ViBoolean'
default = False
py_name = ''
visa_name = 'VI_ATTR_DEV_STATUS_BYTE'
visa_type = 'ViUInt8'
default = NotAvailable
read, write, local = True, True, False
min_value, max_value, values = 0, 0xFF, []
# noinspection PyPep8Naming
class AttrVI_ATTR_DMA_ALLOW_EN(BooleanAttribute):
"""This attribute specifies whether I/O accesses should use DMA (VI_TRUE)
or Programmed I/O (VI_FALSE). In some implementations, this
attribute may have global effects even though it is documented to
be a local attribute. Since this affects performance and not
functionality, that behavior is acceptable.
"""
resources = [(constants.InterfaceType.gpib, 'INSTR'),
(constants.InterfaceType.gpib, 'INTFC'),
(constants.InterfaceType.pxi, 'INSTR'),
(constants.InterfaceType.asrl, 'INSTR'),
(constants.InterfaceType.tcpip, 'INSTR'),
(constants.InterfaceType.vxi, 'INSTR'),
(constants.InterfaceType.vxi, 'MEMACC'),
(constants.InterfaceType.vxi, 'SERVANT')]
py_name = 'allow_dma'
py_name = ''
visa_name = 'VI_ATTR_TERMCHAR'
visa_type = 'ViUInt8'
default = 0x0A # (linefeed)
read, write, local = True, True, True
min_value, max_value, values = 0, 0xFF, []
# noinspection PyPep8Naming
class AttrVI_ATTR_TERMCHAR_EN(BooleanAttribute):
"""VI_ATTR_TERMCHAR_EN is a flag that determines whether the read
operation should terminate when a termination character is
received. This attribute is ignored if VI_ATTR_ASRL_END_IN is set
to VI_ASRL_END_TERMCHAR. This attribute is valid for both raw I/O
(viRead) and formatted I/O (viScanf).
"""
resources = [(constants.InterfaceType.gpib, 'INSTR'),
(constants.InterfaceType.gpib, 'INTFC'),
(constants.InterfaceType.asrl, 'INSTR'),
(constants.InterfaceType.tcpip, 'INSTR'),
(constants.InterfaceType.tcpip, 'SOCKET'),
(constants.InterfaceType.usb, 'INSTR'),
(constants.InterfaceType.usb, 'RAW'),
(constants.InterfaceType.vxi, 'INSTR'),
(constants.InterfaceType.vxi, 'SERVANT')]
"""
@classmethod
def redoc(cls):
super(CharAttribute, cls).redoc()
cls.__doc__ += '\n:range: 0 <= x <= 255\n:type: int'
def post_get(self, value):
return chr(value)
def pre_set(self, value):
return ord(value)
# noinspection PyPep8Naming
class AttrVI_ATTR_4882_COMPLIANT(BooleanAttribute):
"""VI_ATTR_4882_COMPLIANT specifies whether the device is 488.2
compliant.
"""
resources = [(constants.InterfaceType.usb, 'INSTR'),
(constants.InterfaceType.vxi, 'INSTR')]
py_name = 'is_4882_compliant'
visa_name = 'VI_ATTR_4882_COMPLIANT'
visa_type = 'ViBoolean'
default = NotAvailable
read, write, local = True, False, False
py_name = 'source_increment'
visa_name = 'VI_ATTR_SRC_INCREMENT'
visa_type = 'ViInt32'
default = 1
read, write, local = True, True, True
min_value, max_value, values = 0, 1, []
# noinspection PyPep8Naming
class AttrVI_ATTR_SUPPRESS_END_EN(BooleanAttribute):
"""VI_ATTR_SUPPRESS_END_EN is relevant only in viRead and related
operations.
"""
resources = [(constants.InterfaceType.asrl, 'INSTR'),
(constants.InterfaceType.tcpip, 'SOCKET'),
(constants.InterfaceType.usb, 'RAW'),
(constants.InterfaceType.vxi, 'INSTR')]
py_name = ''
visa_name = 'VI_ATTR_SUPPRESS_END_EN'
visa_type = 'ViBoolean'
default = False
"""
resources = [(constants.InterfaceType.gpib, 'INSTR')]
py_name = 'enable_unaddressing'
visa_name = 'VI_ATTR_GPIB_UNADDR_EN'
visa_type = 'ViBoolean'
default = False
read, write, local = True, True, True
# noinspection PyPep8Naming
class AttrVI_ATTR_IMMEDIATE_SERV(BooleanAttribute):
"""VI_ATTR_IMMEDIATE_SERV specifies whether the device associated with
this session is an immediate servant of the controller running
VISA.
"""
resources = [(constants.InterfaceType.vxi, 'INSTR')]
py_name = ''
visa_name = 'VI_ATTR_IMMEDIATE_SERV'
visa_type = 'ViBoolean'
default = NotAvailable
read, write, local = True, False, False
py_name = 'atn_state'
visa_name = 'VI_ATTR_GPIB_ATN_STATE'
visa_type = 'ViInt16'
default = NotAvailable
read, write, local = True, False, False
enum_type = constants.LineState
# noinspection PyPep8Naming
class AttrVI_ATTR_GPIB_CIC_STATE(BooleanAttribute):
"""This attribute shows whether the specified GPIB interface is currently
CIC (Controller In Charge).
"""
resources = [(constants.InterfaceType.gpib, 'INTFC')]
py_name = 'is_controller_in_charge'
visa_name = 'VI_ATTR_GPIB_CIC_STATE'
visa_type = 'ViBoolean'
default = NotAvailable
read, write, local = True, False, False
def redoc(cls):
super(BooleanAttribute, cls).redoc()
cls.__doc__ += '\n:type: bool'
resources = [(constants.InterfaceType.usb, 'INSTR'),
(constants.InterfaceType.vxi, 'INSTR')]
py_name = 'is_4882_compliant'
visa_name = 'VI_ATTR_4882_COMPLIANT'
visa_type = 'ViBoolean'
default = NotAvailable
read, write, local = True, False, False
# noinspection PyPep8Naming
class AttrVI_ATTR_ASRL_ALLOW_TRANSMIT(BooleanAttribute):
"""If set to VI_FALSE, it suspends transmission as if an XOFF character
has been received. If set to VI_TRUE, it resumes transmission as
if an XON character has been received.
"""
resources = [(constants.InterfaceType.asrl, 'INSTR')]
py_name = 'allow_transmit'
visa_name = 'VI_ATTR_ASRL_ALLOW_TRANSMIT'
visa_type = 'ViBoolean'
default = True
read, write, local = True, True, False
"""
resources = [(constants.InterfaceType.tcpip, 'SOCKET')]
py_name = ''
visa_name = 'VI_ATTR_TCPIP_KEEPALIVE'
visa_type = 'ViBoolean'
default = False
read, write, local = True, True, True
# noinspection PyPep8Naming
class AttrVI_ATTR_TCPIP_NODELAY(BooleanAttribute):
"""The Nagle algorithm is disabled when this attribute is enabled (and
vice versa). The Nagle algorithm improves network performance by
buffering "send" data until a full-size packet can be sent. This
attribute is enabled by default in VISA to verify that synchronous
writes get flushed immediately.
"""
resources = [(constants.InterfaceType.tcpip, 'SOCKET')]
py_name = ''
visa_name = 'VI_ATTR_TCPIP_NODELAY'
visa_type = 'ViBoolean'
default = True