API reference

Rpi

class rpi.Rpi(host: str, port: int = 6500, timeout: int = 120)

Connect and manage a HP 16600 / 16700 Logic Analyzer

Parameters
  • host – A host name or IP address to connect to

  • port – The port number to connect to

  • timeout – Number of seconds to timeout if no response is received from the logic analyzer, It’s recommended to keep this value relatively high, especially loading configuration files can take a long time.

get_configs(path: str = '/logic/configs') Optional[list[str]]

List available configuration files in path

Parameters

path – The path where configuration files can be found

Returns

List of string on success or None if no configuration files are found

get_dirs(path: str = '/logic/configs') Optional[list[str]]

List available directories in path

Parameters

path – The path where directories can be found

Returns

List of string on success or None if no directories are found

get_modules() list['Analyzer']

Get the modules installed in the logic analyzer, returned as objects which can be used to manipulate those modules. Currently, only Logic Analyzer modules are supported

Returns

List of Logic Analyzer objects

load_config(path: str) None

Load current configuration from a file

Parameters

path – The path to the configuration file

read(length: int) bytes

Read a specific number of bytes from the RPI interface

Parameters

length – The amount of bytes that are expected

Returns

All data received from the RPI interface

read_until(string: str = '->', exclude: bool = True) bytes

Read data from the RPI interface until a specific string is encountered.

Parameters
  • string – A list of string service UUIDs to be discovered.

  • exclude – If the string should be included with the return data or not

Returns

All data received from the RPI interface

save_config(path, override=False) None

Save the current configuration to a file

Parameters
  • path – The path to the configuration file

  • override – If the file will be overwritten if it already exists

Raises

ValueError – Returned error description

send(data: str, newline_first: bool = True) None

Send data (commands) to the RPI interface

Parameters
  • data – The string that needs to be sent to the RPI interface

  • newline_first – If this parameter is True, a new line character will first be sent and the function will wait for a prompt to appear. This clears the prompt of any existing data.

Analyzer

class rpi.Analyzer(slot: str, name: str, model: str, description: str, parent: Rpi)

Object used to control the Logic Analyzer modules. Automatically generated and returned by Rpi.modules()

del_label(name: str) None

Delete logic analyser label

Parameters

name – Name of the label, or list of labels. Specify name="all" to delete all labels

Raises

ValueError – Returned error description

get_depth() Union[str, int]

Get acquisition depth

Returns

Either a string “minimum” / “maximum” or an integer representing n * 1000 samples

get_labels() list[str]

Get logic analyzer labels as a list of strings

Returns

List of strings with label names

get_listing() DataFrame

Get a listing from the logic analyzer

Returns

Pandas dataframe with all data collected by the logic analyzer

get_mode() str
Get acquisition mode, returns one of the following values:
  • stnorn (state normal)

  • stfast (turbostate)

  • tmfull (timing full channel)

  • tmhalf (timing half channel)

  • tmtrans (transitional timing)

Returns

string with one of the above values

get_pods() str

Get pods assigned to analyzer

Returns

String with comma seperated list of modules

get_status() str

Get logic analyzer detailed status. Use analyzer.running() to just determine if the analyzer is running

Returns

String with the status of the analyzer

get_trigger_position() Union[str, int]
Get the trigger position:
  • center

  • start

  • end

  • percentage - an integer between 0 - 100 to represent the amount of data captured before trigger

Returns

Either a string (center, start, end) or an integer (percentage)

running() bool

Determine if the logic analyzer is running. Use analyzer.status() to get a more detailed status message

Returns

True if the analyzer is in running state, otherwise False

set_depth(depth: Union[str, int])
Set acquisition depth:
  • min (minimum)

  • max (maximum)

  • 0-100 (number of samples in thousands of states

Parameters

depth – The depth that should be configured as either a string or integer

Example

analyzer.set_depth("50")

Raises

ValueError – Returned error description

set_label(name: str, channel_list: str, active_low: bool = False) None

Set a logic analyser label

Parameters
  • name – Name of the label

  • channel_list – List of channels to use

  • active_low – Set the channels to active LOW

Raises

ValueError – Returned error description

Example

analyzer.set_label("ADDR", "A1[15:0];A2[1,3,5]")

set_mode(mode: str) None
Get acquisition mode, the following values are accepted:
  • stnorn (state normal)

  • stfast (turbostate)

  • tmfull (timing full channel)

  • tmhalf (timing half channel)

  • tmtrans (transitional timing)

Parameters

mode – string with the mode that should be set

Example

analyzer.set_mode("stnorn")

Raises

ValueError – Returned error description

set_pods(pods: str) None

Set pods assigned to analyzer as comma seperated list

Parameters

pods – comma separated list of pods

Example

analyzer.set_pods("A1,A2")

Raises

ValueError – Returned error description

set_trigger(trigger: str) None

Configure the logic analyzer trigger

Parameters

trigger – See page 38-41 of the “Remote Programming Interface (RPI) for the Agilent Technologies 16700 Logic Analysis System” guide for examples

Raises

ValueError: Returned error description

set_trigger_position(position: Union[str, int]) None
Set the trigger position:
  • center

  • start

  • end

  • percentage - an integer between 0 - 100 to represent the amount of data captured before trigger

Parameters

position – string or integer containing the desired trigger position

Raises

ValueError – Returned error description

start(rep: bool = False) None

Start the logic analyzer

Parameters

rep – Start in repetitive mode, defaults to False

Raises

ValueError – Returned error description

stop() None

Stop the logic analyzer

ColumnObject

class rpi.ColumnObject(name: str, length: int, signed: bool)

Track column data

length: int
name: str
signed: bool

LabelObject

class rpi.LabelObject(name: str, channels: str)

Track column data

channels: str
name: str