pylab_ml.scope.lecroy.vicp.VICP
- class VICP(addr='LCRY3703N15966', port=1861, timeout=5, debug=False)[source]
Bases:
objectInterface to LeCroy Oscilloscopes using the VICP protocol.
- __init__(addr='LCRY3703N15966', port=1861, timeout=5, debug=False)[source]
Initialize the VICP interface.
- Parameters:
addr (str) – The IP address or hostname of the LeCroy Oscilloscope.
port (int) – The TCP/IP port of the LeCroy Oscilloscope (default is 1861).
timeout (float) – The timeout for socket operations in seconds (default is 5).
debug (bool) – If True, enables debug output (default is False).
Methods
__init__([addr, port, timeout, debug])Initialize the VICP interface.
close()Close the VICP interface.
query(data)Send a query to the VICP interface and read the response.
read()Read a string from the VICP interface until a newline character is encountered.
read_bytes([size])Read a specified number of bytes from the VICP interface.
read_chunk([size])Read a chunk of data from the VICP interface, optionally specifying the size.
read_raw()Read raw data from the VICP interface until a newline character is encountered.
write(data[, term])Write a string to the VICP interface, optionally with a termination string.
write_raw(data)Write raw bytes to the VICP interface.
- query(data)[source]
Send a query to the VICP interface and read the response.
- Parameters:
data (str) – The query string to send to the VICP interface.
- Returns:
The response string read from the VICP interface.
- Return type:
str
- read()[source]
Read a string from the VICP interface until a newline character is encountered.
- Returns:
data – The string read from the VICP interface.
- Return type:
str
- read_bytes(size=1)[source]
Read a specified number of bytes from the VICP interface.
- Parameters:
size (int) – The number of bytes to read (default is 1).
- Returns:
data – The bytes read from the VICP interface.
- Return type:
bytes
- read_chunk(size=None)[source]
Read a chunk of data from the VICP interface, optionally specifying the size.
- Parameters:
size (int) – The number of bytes to read (if None, the size is determined from the header).
- Returns:
data – The chunk of data read from the VICP interface.
- Return type:
bytes
- read_raw()[source]
Read raw data from the VICP interface until a newline character is encountered.
- Returns:
data – The raw data read from the VICP interface.
- Return type:
bytes