API reference#

This page provides an auto-generated summary of Acconeer Exploration Tool’s A111 API.

class acconeer.exptool.a111.Client(*, protocol: str | Protocol | None = None, link: str | Link | None = None, mock: bool = False, **kwargs: Any)#

Examples:

# Autodetects serial ports.
from acconeer.exptool.a111 import Client

client = Client()
# A client that communicates with given host over socket
client = Client(host="192.168.XXX.YYY")
# A client that communicates with a Module Server over UART
client = Client(protocol="module", link="uart")
# A client that communicates with an Exploration Server over socket
client = Client(protocol="exploration", link="socket", host="192.168.XXX.YYY")
__init__(*, protocol: str | Protocol | None = None, link: str | Link | None = None, mock: bool = False, **kwargs: Any)#
Parameters:
  • protocol – What protocol the client is supposed to use. Can be any Protocol member or their str-counterparts. protocol=None (default) will try to auto-detect.

  • link – What link the client is supposed to use. Can be any Link member or their str`-counterparts. link=None (default) will try to auto-detect.

  • mock – Whether this Client should be a simulated client.

  • kwargs

    These are the supported kwargs:

    host: str
    IP-address of e.g. the RBPi you want to connect to.
    serial_port: str
    The serial port name. E.g. COMx on Windows and /dev/ttyUSBx on Linux.
    override_baudrate: int
    Uses the passed baudrate instead of the default.

Raises:

ValueError if a Client could not be created from the arguments.

connect() dict#

Initiates a connection with the device.

Returns:

A dict containing information about the device, including SDK version

setup_session(config: BaseSessionConfig, check_config: bool = True) dict#

Sets up a session with the given config. Will call connect() if not already connected.

Parameters:
  • config – The configuration to use when setting up the session

  • check_config – If True the configuration is checked for errors, defaults to True

Returns:

A dict with metadata for the configured session

start_session(config: BaseSessionConfig | None = None, check_config: bool = True) dict | None#

Starts the session if previously set up with setup_session(). If config is provided, setup_session() will be called.

Parameters:
  • config – The configuration to use when setting up the session, defaults to None

  • check_config – If True the configuration is checked for errors, defaults to True

Returns:

If config is provided, returns a dict with metadata for the configured session. Otherwise, returns None

get_next() Tuple[list | dict, ndarray]#

Retrieves the next result. Will block until the result is received.

Returns:

A tuple with the result info and data. The data shape and type differs between services.

Power Bins:
Shape: (number of sensors, bin count)
Type: float64
Envelope:
Shape: (number of sensors, data length)
Type: float64
IQ:
Shape: (number of sensors, data length)
Type: complex128
Sparse:
Shape: (number of sensors, number of sweeps, number of depths)
Type: float64

Number of sensors, bin count and number of sweeps can be explicitly set. Data length and number of dephts depend on multiple configuration settings.

The client takes a parameter squeeze, if set to True the first dimension (number of sensors) is removed when using a single sensor. As default squeeze is True.

stop_session()#

Stops the session. All buffered/waiting data is thrown away. This function will block until the server has confirmed that the session has ended.

disconnect()#

Disconnects the client. disconnect() will call stop_session() if a session is started.

SOCKET = 'socket'#
UART = 'uart'#
SPI = 'spi'#
class acconeer.exptool.a111.Protocol(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)#
EXPLORATION = 'exploration'#
MODULE = 'module'#
STREAMING = 'streaming'#