[−][src]Struct dss::Appartement
The appartment gives you a easy and highlevel interface to a dss installation. It's the main struct this crates provides.
Please only use this interaface to a dss installation and not any other interface to the same installation at the same time. This crate is buffering information to keep the dss actions reponse times somewhat decent. Also don't use the RawAPI directly, because it has the same effect as using another interface and is leading to mismathcing data. This is unfortunatelly due to the really bad designed API from DSS.
Methods
impl Appartement
[src]
pub fn connect<S>(host: S, user: S, password: S) -> Result<Appartement, Error> where
S: Into<String>,
[src]
S: Into<String>,
Connect to a DSS installation and fetch the complete structure of it. Based on your appartment size, this can take around a minute.
pub fn get_zones(&self) -> Result<Vec<Zone>, Error>
[src]
Returns an vector of all zones with their groups.
Keep in mind, that the values are in a frozen state. If you want to stay informed about changes, use the 'event_channel()' function.
pub fn update_all(&self) -> Result<Vec<Zone>, Error>
[src]
Updates the complete appartment structure, this command can take some time to execute (more than 30 seconds).
Use the 'get_zones()' function to get the actual structure with updates values for each group.
pub fn set_value(
&self,
zone: usize,
group: Option<usize>,
value: Value
) -> Result<(), Error>
[src]
&self,
zone: usize,
group: Option<usize>,
value: Value
) -> Result<(), Error>
pub fn event_channel(&self) -> Result<Receiver<Event>, Error>
[src]
Get the event channel for the appartment.
When a channel is already open for this apparment, we close the open one and create a new one which gets returned. Therefore it's not recommended to call this function twice for one appartment.
Trait Implementations
impl Clone for Appartement
[src]
fn clone(&self) -> Appartement
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Appartement
[src]
Auto Trait Implementations
impl RefUnwindSafe for Appartement
impl Send for Appartement
impl Sync for Appartement
impl Unpin for Appartement
impl UnwindSafe for Appartement
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,