mirror of
https://github.com/aramperes/nut-rs.git
synced 2025-09-09 05:28:31 -04:00
parent
77d3020df5
commit
c56be76906
3 changed files with 21 additions and 0 deletions
|
@ -24,6 +24,11 @@ fn main() -> nut_client::Result<()> {
|
|||
|
||||
let mut conn = Connection::new(&config)?;
|
||||
|
||||
// Get server information
|
||||
println!("NUT server:");
|
||||
println!("\tVersion: {}", conn.get_server_version()?);
|
||||
println!("\tNetwork Version: {}", conn.get_network_version()?);
|
||||
|
||||
// Print a list of all UPS devices
|
||||
println!("Connected UPS devices:");
|
||||
for (name, description) in conn.list_ups()? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue