msl.equipment.connection_tcpip_hislip module
Base class for equipment that use the HiSLIP communication protocol.
- class msl.equipment.connection_tcpip_hislip.ConnectionTCPIPHiSLIP(record)[source]
Bases:
ConnectionMessageBasedBase class for equipment that use the HiSLIP communication protocol.
The
propertiesfor a HiSLIP 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] 'rstrip': bool, whether to remove trailing whitespace from "read" messages [default: False] 'timeout': float or None, the timeout (in seconds) for read and write operations [default: None]
The
backendvalue must be equal toMSLto 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.
- property asynchronous
The reference to the asynchronous client.
- Type:
- property synchronous
The reference to the synchronous client.
- Type:
- static parse_address(address)[source]
Parse the address for valid TCPIP HiSLIP fields.
- Parameters:
address (
str) – The address of aConnectionRecord.- Returns:
dictorNone– The board number, hostname, LAN device name, and HiSLIP port number of the device orNoneif address is not valid for a TCPIP HiSLIP connection.
- unlock()[source]
Release the lock acquired by
lock().- Returns:
bool– Whether releasing the lock was successful.
- remote_local_control(request)[source]
Send a GPIB-like remote/local control request.
- Parameters:
request (
int) –The request to perform.
0 – Disable remote, VI_GPIB_REN_DEASSERT
1 – Enable remote, VI_GPIB_REN_ASSERT
2 – Disable remote and go to local, VI_GPIB_REN_DEASSERT_GTL
3 – Enable Remote and go to remote, VI_GPIB_REN_ASSERT_ADDRESS
4 – Enable remote and lock out local, VI_GPIB_REN_ASSERT_LLO
5 – Enable remote, go to remote, and set local lockout, VI_GPIB_REN_ASSERT_ADDRESS_LLO
6 – go to local without changing REN or lockout state, VI_GPIB_REN_ADDRESS_GTL