Crate owrust

Crate owrust 

Source
Expand description

owrust Rust library interfaces with owserver to use 1-wire devices

This is a tool in the 1-wire file system OWFS

This library is the central part of owrust – the rust language OWFS programs

§PURPOSE

lib.rs is the library code that actually performs the owserver protocol. Communication with owserver is over TCP/IP (network) using an efficient well-documented protocol.

Supported operations are read, write, dir, present and size, with some variations

The main struct is OwMessage which holds all the configuration information. Typically it is populated by the command line or configuration files

§EXAMPLES

use owrust ; // basic library
use owrust::parse_args::{Parser,OwLib} ; // configure from command line, file or OsString

let mut owserver = owrust::new() ; // create an OwMessage struct
let prog = OwLib ;
  // configure from command line and get 1-wire paths
let paths = prog.command_line( &mut owserver ) ;
  // Call any of the OwMessage functions like dir, read, write,...

Re-exports§

pub use crate::message::parse_args;
pub use crate::message::new;
pub use crate::message::OwMessage;
pub use error::OwEResult;
pub use error::OwError;
pub use console::console_line;
pub use console::console_lines;

Modules§

bus
owrust Rust library interfaces with owserver to use 1-wire devices
console
console module
error
owrust Rust library interfaces with owserver to use 1-wire devices
message
owrust Rust library interfaces with owserver to use 1-wire devices
rom_id
Rom Id code Each 1-wire device has a unique address