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.
- NodeJS
- Python
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
from ikalogic_at1000 import AT1000
devices = AT1000.find_devices() # 1. find
tester = AT1000.open(devices[0]) # 2. open, taking exclusive access
tester.reset() # 3. start from a known state
tester.gpio.digital(0).write(True) # 4. do the work
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​
| Call | What 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.info | Model, serial number, firmware version, capabilities |
See Find and connect to AT1000 and Device access control.
tester.gpio — 32 analog / digital I/Os​
| Call | What 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​
| Call | What 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​
| Call | What 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.
| Bus | Access | Calls |
|---|---|---|
| I2C | com.i2c(0..1) | configure enable disable tx(transaction) rx(transaction) |
| SPI | com.spi(0..1) | configure enable disable trx(data) |
| UART | com.uart(0..1) | configure enable disable tx start_rx rx stop_rx |
| CAN | com.can(0) | configure enable disable tx(frame) start_rx rx stop_rx |
| RS232 | com.rs232(0) | configure enable disable tx start_rx rx stop_rx |
| RS485 | com.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.
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​
| Call | What 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​
| Call | What 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.connected | Whether 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​
| Call | What it does |
|---|---|
tester.management.info() | The full device report, including capabilities |
tester.session.state() | Who currently holds the device |
Where to go next​
- Getting started with AT1000 — install the package and run your first script
- Example applications — complete, working test sequences