espvpnet 0.1.0

ESC/VP.net protocol client library
Documentation
  • Coverage
  • 2.7%
    2 out of 74 items documented2 out of 10 items with examples
  • Size
  • Source code size: 14.04 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.51 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • telegicloetrocongelateur
espvpnet-0.1.0 has been yanked.

espvpnet

espvpnet is a Rust library for the ESC/VP.net protocol (EPson Control Video Projector)

Examples

Discovering ESC/VP.net hosts

let mut addrs: Vec<SocketAddr> = Vec::new();
for i in 0..255 {
     addrs.push(SocketAddrV4::new(Ipv4Addr::new(192, 168, 0, i), 3629).into()) // generate socket addrs from ip range
    }
    let up_addrs = discover_hosts("0.0.0.0:3629", &addrs, Some(Duration::from_millis(100))); // ping hosts and put the up hosts in up_addrs
 println!("{:?}", up_addrs);

Creating ESC/VP.net client and sending commands

use espvpnet::{ client::Client, protocol::Command, utils::commands::LAMP};
let client = Client::connect("192.168.0.1:3629")?; // init client connection
let command = Command::Get { command: LAMP }; // send "LAMP?" command to get the number of hours left of the video projector lamp
client::send(command)?; // send command to the video projector