Skip to main content

API quick overview

Every call the AT1000 API offers, on one page. Use it to find the name you need, then follow the link for parameters, ranges and worked examples.

The shape of a script​

Every program follows the same four steps.

import { AT1000 } from '@ikalogic/at1000';

const devices = await AT1000.findDevices(); // 1. find
const tester = await AT1000.open(devices[0]); // 2. open, taking exclusive access
await tester.reset(); // 3. start from a known state

await tester.gpio.digital(0).write(true); // 4. do the work
One naming rule to remember

Statics differ between the two languages, instance methods do not. JavaScript uses AT1000.findDevices() while Python uses AT1000.find_devices() — but every method on an opened device is snake_case in both, including in JavaScript: read_current(), start_rx(), configure_output(). JavaScript calls are async, Python calls are not.

Finding and opening a device​

CallWhat it does
AT1000.findDevices() / find_devices()Discover devices on the network, returns host strings
AT1000.findLocalDevice() / find_local_device()Resolve this device's own address when running on it
AT1000.isStandalone() / is_standalone()True when the script runs on the device itself
AT1000.open(host)Open a device and take exclusive access
AT1000.open(host, { readonly: true })Open read-only, for monitoring a device someone else is driving
tester.reset()Reset every subsystem to its default state
tester.infoModel, serial number, firmware version, capabilities

See Find and connect to AT1000 and Device access control.

tester.gpio — 32 analog / digital I/Os​

CallWhat it does
gpio.digital(io)Pick a pin for digital use, io 0-31
gpio.analog(io)Pick a pin for analog use, io 0-31
gpio.hold() / gpio.release()Buffer writes, then apply them all on one edge
gpio.read_config(io) / gpio.read_sync()Read back a pin's configuration, or the sync state
gpio.reset()All pins back to default
DigitalIO configure_input({vil, vih})Input, with your own thresholds
configure_output({value, vol, voh, vil, vih})Output, with your own levels
configure_open_drain({value, vil, vih})Open drain, for I2C-like lines
read() / write(value)Read or drive the pin
AnalogIO configure_input() / configure_output(v)Analog in, or analog out at a starting voltage
read() / write(v)Measure a voltage, or set one

See Digital I/O, Analog I/O, Output synchronization and the GPIO API reference.

tester.power — supply, USB ports and precision current​

CallWhat it does
power.dut(0)The programmable supply, 1.6-13 V or 24 V
power.usb(0..1)A USB port's switched power
power.relay_0()The precision current path on relay 0
Dut enable(v) / disable() / configure({enabled, target_voltage})Turn it on at a voltage, or off
read() / read_voltage() / read_current()Full state, or just one measurement
Usb enable() / disable() / configure({enabled})Power cycle a port
read() / read_voltage() / read_current()What the attached device is drawing
RelayPower read() / read_current()Bidirectional current, down to one microamp

See DUT power supply, USB power supply, Precision current measurement and the Power API reference.

tester.relays — 8 dry contacts​

CallWhat it does
relays.relay(0..7)Pick one contact
relays.read() / relays.open() / relays.close()All eight at once
relays.reset()All open
Relay open() / close() / read()Drive or read one contact
is_open() / is_closed()The same state as a boolean

See Relay and dry contacts control.

tester.com — communication interfaces​

Every bus is reached the same way, and they share pins, so check pin alternate functions before combining them.

BusAccessCalls
I2Ccom.i2c(0..1)configure enable disable tx(transaction) rx(transaction)
SPIcom.spi(0..1)configure enable disable trx(data)
UARTcom.uart(0..1)configure enable disable tx start_rx rx stop_rx
CANcom.can(0)configure enable disable tx(frame) start_rx rx stop_rx
RS232com.rs232(0)configure enable disable tx start_rx rx stop_rx
RS485com.rs485(0..1)configure enable disable tx start_rx rx stop_rx

com.usb(id).state() reports what is attached to a USB port, and com.reset() disables every interface.

Reception has to be armed

The serial buses and CAN buffer nothing until you call start_rx(). rx() then returns whatever arrived since the last call.

tester.hmi — screen, knob and speaker​

CallWhat it does
hmi.screen().print(text)Show text, replacing what was there
hmi.screen().colors({text, background})Set foreground and background
hmi.screen().progress(0..100)Progress bar, 0 hides it
hmi.screen().clear() / clear_text()Clear everything, or just the text
hmi.audio().play({sound_id, volume})success, failure or notification_1, volume 0-100
hmi.knob().wait_event(timeout_ms)Block until the knob is turned or pressed
hmi.knob().is_button_held()Current button state

See HMI: screen, button and sound.

tester.events — react instead of polling​

CallWhat it does
events.connect()Open the event stream
events.on(type, cb) (JS) / events.subscribe(type, cb) (Python)Listen to one event type, or * for all; returns an unsubscribe
events.connectedWhether the stream is up
events.close()Shut the stream down

Event types: gpio.state gpio.config relays.state relays.states power.dut power.usb com.can_rx com.uart_rx com.rs232_rx com.rs485_rx hmi.knob session.state. See Real-time events.

Also available​

CallWhat it does
tester.management.info()The full device report, including capabilities
tester.session.state()Who currently holds the device

Where to go next​