> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lagerdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Net Types

> Every net handle and box-level capability the Rust crate exposes

Each net type has a handle obtained from `LagerBox` and a page of its own. Handles are
cheap and do no network traffic until you call a method. The box resolves and
validates the net name on every request, so a typo fails loudly.

## Instrument nets

Addressed by the net name you gave them with `lager nets add`.

| Handle | Obtain with | Reference |
| - | - | - |
| `Supply` | `lager.supply(name)` | [Power Supply](https://docs.lagerdata.com/source/reference/rust/supply.md) |
| `Battery` | `lager.battery(name)` | [Battery Simulation](https://docs.lagerdata.com/source/reference/rust/battery.md) |
| `Solar` | `lager.solar(name)` | [Solar Simulation](https://docs.lagerdata.com/source/reference/rust/solar.md) |
| `Eload` | `lager.eload(name)` | [Electronic Load](https://docs.lagerdata.com/source/reference/rust/eload.md) |
| `WattMeter` | `lager.watt_meter(name)` | [Watt Meter](https://docs.lagerdata.com/source/reference/rust/watt.md) |
| `EnergyAnalyzer` | `lager.energy_analyzer(name)` | [Energy Analyzer](https://docs.lagerdata.com/source/reference/rust/energy.md) |
| `Adc` | `lager.adc(name)` | [ADC](https://docs.lagerdata.com/source/reference/rust/adc.md) |
| `Dac` | `lager.dac(name)` | [DAC](https://docs.lagerdata.com/source/reference/rust/dac.md) |
| `Thermocouple` | `lager.thermocouple(name)` | [Thermocouple](https://docs.lagerdata.com/source/reference/rust/thermocouple.md) |
| `Dmm` | `lager.dmm(name)` | [DMM](https://docs.lagerdata.com/source/reference/rust/dmm.md) |
| `Gpio` | `lager.gpio(name)` | [GPIO](https://docs.lagerdata.com/source/reference/rust/gpio.md) |
| `I2c` | `lager.i2c(name)` | [I2C](https://docs.lagerdata.com/source/reference/rust/i2c.md) |
| `Spi` | `lager.spi(name)` | [SPI](https://docs.lagerdata.com/source/reference/rust/spi.md) |
| `UsbPort` | `lager.usb(name)` | [USB Hub Ports](https://docs.lagerdata.com/source/reference/rust/usb.md) |
| `Uart` | `lager.uart(name)?` | [UART](https://docs.lagerdata.com/source/reference/rust/uart.md) |
| `DebugNet` | `lager.debug(name)` | [Debug Probes](https://docs.lagerdata.com/source/reference/rust/debug.md) |
| `Arm` | `lager.arm(name)` | [Robot Arm](https://docs.lagerdata.com/source/reference/rust/arm.md) |
| `Webcam` | `lager.webcam(name)` | [Webcam](https://docs.lagerdata.com/source/reference/rust/webcam.md) |
| `Router` | `lager.router(name)` | [Router](https://docs.lagerdata.com/source/reference/rust/router.md) |
| `Scope` | `lager.scope(name)` | [Oscilloscope](https://docs.lagerdata.com/source/reference/rust/scope.md) |
| `Hsm` | `lager.hsm(name)` | [HSM](https://docs.lagerdata.com/source/reference/rust/hsm.md) |
| `CustomNet` | `lager.custom(name)` | [Custom-driver nets](#custom-driver-nets) |

## Box-level capabilities

These drive the box's own hardware, so they take no net name and have no `name()`.

| Handle | Obtain with | Reference |
| - | - | - |
| `Ble` | `lager.ble()` | [BLE](https://docs.lagerdata.com/source/reference/rust/ble.md) |
| `Wifi` | `lager.wifi()` | [WiFi](https://docs.lagerdata.com/source/reference/rust/wifi.md) |
| `Blufi` | `lager.blufi()` | [BluFi](https://docs.lagerdata.com/source/reference/rust/blufi.md) |
| `Dfu` | `lager.dfu()` | [USB DFU](https://docs.lagerdata.com/source/reference/rust/dfu.md) |

## A handle that behaves differently

Every constructor above returns a handle immediately and infallibly, except one.
**`lager.uart(name)?` returns a `Result`.** It opens a Socket.IO session and starts
streaming right away, so it can fail at construction.

## Custom-driver nets

A custom driver installed on the box (box software 0.59.0 or later) declares its own
role and actions. `CustomNet` has one method for them:

```rust theme={null}
use serde_json::json;

let reading = lager.custom("chamber1").command("read_temperature", json!({}))?;
```

`command(action, params)` returns the action's `value`, or `null` when it has none.
`lager.status()?.capabilities` lists the installed roles in `net_command_roles` when
`custom_drivers` is set. A driver failure arrives as `Error::Box` with the box's
status: 409 (busy), 503 (unavailable), 504 (timed out) or 502 (the driver failed).

## Discovery

```rust theme={null}
use lager::LagerBox;

let lager = LagerBox::from_env()?;

for net in lager.nets()? {
    println!("{:<12} {:<14} {:?}", net.name, net.role, net.instrument);
}
```

`NetRecord` carries:

* the name
* the role
* the instrument
* the pin or channel
* the VISA or device address
* any role-specific saved params
* the net's safety limits

See [Client and Box](https://docs.lagerdata.com/source/reference/rust/client.md) for the rest of the discovery
surface.

## Not yet available

There is no logic-analyzer handle, and `Scope` does not capture traces: the box has no
HTTP endpoint for logic or trace capture yet. `Rotation` and `Actuate` nets serve
provisioning flows rather than test-time net access, and the crate deliberately
leaves them out. The work list is in
[MISSING\_ENDPOINTS.md](https://github.com/lagerdata/lager-rs/blob/main/MISSING_ENDPOINTS.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.