lager-net 0.2.0

First-class Rust client for Lager box nets: drive power supplies, batteries, e-loads, GPIO, ADC, DAC, SPI, I2C, UART and more from cargo tests.
Documentation
//! Thermocouple nets: temperature reads.

use super::net_handle;

pub(crate) mod ops {
    use serde_json::json;

    use crate::wire::{net_command, value_f64, Op, Timeout};

    pub(crate) fn read(name: &str) -> Op<f64> {
        Op {
            req: net_command(name, "thermocouple", "read", json!({}), Timeout::Default),
            parse: value_f64,
        }
    }
}

net_handle! {
    /// Handle for a thermocouple net.
    sync: Thermocouple,
    async: AsyncThermocouple,
    methods: {
        /// Read the temperature in degrees Celsius.
        fn read() -> f64 = ops::read;
    }
}