Expand description
LabJack T7 connection and handle-inspection helpers for the streamer binary.
The streamer only supports direct Ethernet opens by IP address; it never runs LJM device discovery. These helpers handle environment parsing, device verification, stale stream cleanup, and conversion of LabJack handle metadata into readable values.
ยงConfiguration
LABJACK_IP- IPv4 address of the T7. Required unlessLABJACK_IDENTIFIERholds an IPv4 address.LABJACK_IDENTIFIER- Fallback forLABJACK_IP, used only when it parses as an IPv4 address.LABJACK_SERIAL- Expected serial number. When set, a device with another serial is rejected.ANYor a non-numeric value disables the check.LABJACK_NAME- Logical device name. Only logged.
For all of these, surrounding whitespace is trimmed, and an empty value or ANY
(any case) counts as unset.
Constantsยง
- STREAM_
IS_ ๐ACTIVE_ ERROR - LJM error code returned when a stream is already active on the handle
(
STREAM_IS_ACTIVE).
Functionsยง
- env_
identifier ๐ - Returns an environment identifier unless it is empty or the wildcard
ANY. - env_var ๐
- Returns a trimmed environment variable value when set and non-empty.
- handle_
info - Reads LabJack metadata for an open handle.
- handle_
ip_ address - Converts the signed IPv4 bits in LabJack handle info to dotted decimal text.
- is_
stream_ ๐active_ error - Returns true when an LJM error indicates a stale active stream.
- ljm_
error_ ๐code - Extracts the numeric LJM code from an
LJMErrorwhen present. - open_
labjack_ from_ env - Opens the configured LabJack for the default streamer path.
- open_
streamer_ labjack_ from_ env - Opens, verifies, and self-tests the LabJack configured by environment.
- parse_
ipv4 ๐ - Parses an IPv4 string used by the direct Ethernet LabJack path.
- requested_
labjack_ ๐serial_ from_ env - Reads an optional expected LabJack serial number from
LABJACK_SERIAL. - required_
labjack_ ๐ip_ from_ env - Reads the required LabJack IP address from environment variables.