use crate::command as cmd;
use clap::{Args, Subcommand};
#[derive(Debug, Args)]
#[group(required = false, multiple = false)]
pub struct Connection {
#[arg(long)]
pub device: Option<String>,
#[arg(long)]
pub ip: Option<String>,
}
#[derive(Debug, Args, Clone)]
pub struct UsbDetails {
#[clap(long, default_value_t = 115200)]
pub baud: u32,
#[clap(long)]
pub id: Option<u8>,
}
#[derive(Debug, Args, Clone)]
pub struct EthDetails {
#[clap(long, default_value_t = 18190)]
pub port: u16,
}
#[derive(Debug, Subcommand)]
pub enum Command {
Voltage {
#[clap(help = "Volts")]
u: f32,
},
Current {
#[clap(help = "Ampere")]
i: f32,
},
Output {
#[clap(help = "on/off")]
switch: cmd::Switch,
},
Status,
Info,
Dhcp {
#[clap(help = "on/off")]
switch: cmd::Switch,
},
}