Trait rzw::driver::Driver [−][src]
pub trait Driver { fn write<N>(&mut self, _: N) -> Result<u8, Error>
where
N: Into<Vec<u8>>; fn read(&mut self) -> Result<SerialMsg, Error>; fn get_node_ids(&mut self) -> Result<Vec<u8>, Error>; fn get_node_generic_class<N>(&mut self, _: N) -> Result<GenericType, Error>
where
N: Into<u8>; }
Driver trait to specify the functions which are needed for a driver implementation. A driver provides the access to the Z-Wave network.
Required Methods
fn write<N>(&mut self, _: N) -> Result<u8, Error> where
N: Into<Vec<u8>>,
N: Into<Vec<u8>>,
Write data to the Z-Wave network.
fn read(&mut self) -> Result<SerialMsg, Error>
Read data from the Z-Wave network. Returns the received message or an error.
fn get_node_ids(&mut self) -> Result<Vec<u8>, Error>
Returns the id of the registered nodes in the Z-Wave network.
fn get_node_generic_class<N>(&mut self, _: N) -> Result<GenericType, Error> where
N: Into<u8>,
N: Into<u8>,
Returns the generic type of a node.
Implementors
impl Driver for SerialDriver