msl.equipment.connection_tcpip_vxi11 module
Base class for equipment that use the VXI-11 communication protocol.
- class msl.equipment.connection_tcpip_vxi11.ConnectionTCPIPVXI11(record)[source]
Bases:
ConnectionMessageBased
Base class for equipment that use the VXI-11 communication protocol.
The
properties
for a VXI-11 connection supports the following key-value pairs in the Connections Database:'buffer_size': int, the maximum number of bytes to read at a time [default: 4096] 'encoding': str, the encoding to use [default: 'utf-8'] 'encoding_errors': str, encoding error handling scheme, e.g. 'strict', 'ignore' [default: 'strict'] 'lock_timeout': float or None, the timeout (in seconds) to wait for a lock [default: 0] 'max_read_size': int, the maximum number of bytes that can be read [default: 1 MB] 'port': int, the port to use instead of calling the RPC Port Mapper function [default: None] 'read_termination': str or None, read until this termination character is found [default: None] 'rstrip': bool, whether to remove trailing whitespace from "read" messages [default: False] 'termination': alias for 'read_termination' 'timeout': float or None, the timeout (in seconds) for read and write operations [default: None]
The
backend
value must be equal toMSL
to use this class for the communication system. This is achieved by setting the value in the Backend field for a connection record in the Connections Database to beMSL
.Do not instantiate this class directly. Use the
connect()
method to connect to the equipment.- Parameters:
record (
EquipmentRecord
) – A record from an Equipment-Register Database.
- static parse_address(address)[source]
Parse the address for valid TCPIP VXI-11 fields.
- Parameters:
address (
str
) – The address of aConnectionRecord
.- Returns:
dict
orNone
– The board number, hostname, and LAN device name of the device orNone
if address is not valid for a TCPIP VXI-11 connection.
- remote()[source]
Place the device in a remote state wherein all programmable local controls are disabled.
- local()[source]
Place the device in a local state wherein all programmable local controls are enabled.
- enable_sqr(enable, handle)[source]
Enable or disable the sending of device_intr_srq RPCs by the network instrument server.
- docmd(cmd, value, fmt)[source]
Allows for a variety of commands to be executed.
- Parameters:
cmd (
int
) – An IEEE 488 command messages, (e.g., to send a group execute trigger,GET
, command the value of cmd would be 0x08).fmt (
str
) – How to format value. See Format Characters for more details. Do not include the byte-order character. Network (big-endian) order will always be used.
- Returns:
bytes
– The results defined by cmd.