Acroname Inc.

Acroname Reference (v2.11)

  • Devices
  • Software
  • API Reference
    • BrainStem Entities
    • Python API Reference
      • Getting (Quickly) Started
      • Acroname Modules
      • Package Structure
      • Analog
      • App
      • Clock
      • Definitions
      • Digital
      • Discovery
      • Entity
      • Equalizer
      • I2C
      • Link
      • Module
      • Mux
      • PDChannelLogger
      • Pointer
      • Port
      • Power Delivery
      • Rail
      • RCServo
      • Relay
      • Results
      • Signal
      • System
      • Store
      • Temperature
      • Timer
      • UART
      • USB
      • USB System
      • Version
    • C++ API Reference
    • C API Reference
    • RESTful API Reference
    • .NET API Reference
    • CCA API Reference
    • LabVIEW API Reference
    • Reflex Language Reference
    • Q-Sys API Reference
  • BrainStem
Acroname Reference (v2.11)
  • Docs »
  • API Reference »
  • Python API Reference »
  • Link

Link¶

A module that provides a Spec class for specifying a connection to a BrainStem module.

A Spec instance fully describes a connection to a brainstem module. In the case of USB based stems this is simply the serial number of the module. For TCPIP based stems this is an IP address and TCP port.

For more information about links and the Brainstem network see the Acroname BrainStem Reference

class brainstem.link.Spec(transport, serial_number, module, model, **keywords)[source]¶

Spec class for specifying connection details

Instances of Spec represent the connection details for a brainstem link. The Spec class also contains constants representing the possible transport types for BrainStem modules.

Parameters:
  • transport (int) – One of USB, TCPIP, SERIAL or AETHER.

  • serial_number (int) – The module serial number.

  • module – The module address on the Brainstem network.

  • model – The device model number of the Brainstem module.

  • **keywords –

    For TCPIP, SERIAL and AETHER connections. The possibilities are,

    • ip_address: (int/str) The IPV4 address for a TCPIP/AETHER connection type.

    • ip_port: (int/str) The port for a TCPIP/AETHER connection type.

    • port: (str) The serial port for a SERIAL connection type.

    • baudrate: (int/str) The baudrate for a SERIAL connection type.

AETHER = 4¶

AETHER transport type.

INVALID = 0¶

INVALID Undefined transport type.

SERIAL = 3¶

SERIAL transport type.

TCPIP = 2¶

TCPIP transport type.

USB = 1¶

USB transport type.

static cca_spec_to_python_spec(cca_spec)[source]¶

Internal: Translate cffi spec into python Spec

class brainstem.link.Status[source]¶

Status variables represent the link status possibilities for Brainstem Links.

Status States:
  • STOPPED (0)

  • INITIALIZING (1)

  • RUNNING (2)

  • STOPPING (3)

  • SYNCING (4)

  • INVALID_LINK_STREAM (5)

  • IO_ERROR (6)

  • UNKNOWN_ERROR (7)

class brainstem.link.StreamStatusEntry(key, value)[source]¶
property key¶

A unique key made up of module, cmd, option, index, subindex

Type:

unsigned long long (64bit)

property value¶

The Value associated with the key

Type:

unsigned int (32bit)

class brainstem.link.aEtherConfig[source]¶

aEther configuration class for configuring AETHER connection types.

Note: If localOnly == false AND networkInterface is default (0 or LOCALHOST_IP_ADDRESS) it will be populated with the auto-selected interface upon successful connection.

enabled¶

True: Client-Server model is used; False: Direct module control is used.

fallback¶

True: If connections fails it will automatically search for network connections.

localOnly¶

True: Restricts access to localhost; False: Expose device to external network.

assignedPort¶

Server assigned port after successful connection.

networkInterface¶

Network interface to use for connections.

Previous Next

© Copyright 1994-2025, Acroname Inc. All rights reserved. BrainStem is a registered trademark of Acroname. All other marks are property of their respective owners.. Last updated on Mar 05, 2025.