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 or TCPIP.
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 modules the possibilities are,
ip_address: (int) The IP address of the module.
tcp_port: (int) The TCP port of the module.
- transport¶
instance attribute holding transport type.
- Type:
USB/TCPIP
- serial_number¶
Module serial number.
- Type:
int
- module¶
Module address.
- Type:
int
- model¶
Brainstem device type: See Defs module for listing.
- Type:
int
- ip_address¶
IP address for TCP/IP based modules.
- Type:
Optional[int]
- ip_port¶
TCP port for TCP/IP based modules.
- Type:
Optional[int]
- serial_port¶
Serial Port for SERIAL based modules.
- Type:
Optional[str]
- baudrate¶
Baudrate for SERIAL based modules.
- Type:
Optional[int]
- 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.