[−][src]Struct dss::RawApi
Raw interface towards the DSS-Rest service. This is not intend to be used directly from a API consumer. It misses important status management and abstraction over the different devices.
Implementations
impl RawApi
[src]
pub fn connect<S>(host: S, user: S, password: S) -> Result<Self, Error> where
S: Into<String>,
[src]
S: Into<String>,
Connect to the Digital Strom Server and try to login.
pub fn generic_request<S>(
&self,
request: S,
parameter: Option<Vec<(&str, &str)>>
) -> Result<Value, Error> where
S: Into<String>,
[src]
&self,
request: S,
parameter: Option<Vec<(&str, &str)>>
) -> Result<Value, Error> where
S: Into<String>,
Generic requset function, which handles the token inserting/login, the json parsing and success check.
It returns a json value, dependet on the request.
pub fn new_event_channel(
&self
) -> Result<(Receiver<Event>, Arc<Mutex<bool>>), Error>
[src]
&self
) -> Result<(Receiver<Event>, Arc<Mutex<bool>>), Error>
Create a new event channel, which is listinging to events from the dss station.
pub fn get_appartement_name(&self) -> Result<String, Error>
[src]
Receive the appartement name.
pub fn set_appartement_name<S>(&self, new_name: S) -> Result<bool, Error> where
S: Into<String>,
[src]
S: Into<String>,
Set the appartement name within the DSS.
pub fn get_zones(&self) -> Result<Vec<Zone>, Error>
[src]
Request all zones from the DSS system.
pub fn get_zone_name(&self, id: usize) -> Result<String, Error>
[src]
Get the name of a specific zone from the DSS system.
pub fn get_devices(&self) -> Result<Vec<Device>, Error>
[src]
Receive all devices availble in the appartement.
pub fn get_device_scene_mode<S>(
&self,
device: S,
scene_id: usize
) -> Result<SceneMode, Error> where
S: Into<String>,
[src]
&self,
device: S,
scene_id: usize
) -> Result<SceneMode, Error> where
S: Into<String>,
Request the scene mode for a specific device.
pub fn get_circuits(&self) -> Result<Vec<Circut>, Error>
[src]
Get all available circuts
pub fn get_scenes(&self, zone: usize, typ: Type) -> Result<Vec<usize>, Error>
[src]
Get all available scenes for a specific zone with a type.
pub fn get_last_called_scene(
&self,
zone: usize,
typ: Type
) -> Result<usize, Error>
[src]
&self,
zone: usize,
typ: Type
) -> Result<usize, Error>
Return the last called scene for a zone.
pub fn call_scene(
&self,
zone: usize,
typ: Type,
scene: usize
) -> Result<(), Error>
[src]
&self,
zone: usize,
typ: Type,
scene: usize
) -> Result<(), Error>
Trigger a scene for a specific zone and type in the dss system.
pub fn call_action(&self, zone: usize, action: Action) -> Result<(), Error>
[src]
Transforms a action to a scene call if possible and executes it
pub fn get_shadow_device_open<S>(&self, device: S) -> Result<f32, Error> where
S: Into<String>,
[src]
S: Into<String>,
Get the opening status of a single shadow device and resturns it.
pub fn set_shadow_device_open<S>(
&self,
device: S,
value: f32
) -> Result<(), Error> where
S: Into<String>,
[src]
&self,
device: S,
value: f32
) -> Result<(), Error> where
S: Into<String>,
Set the shadow opening for a single device
pub fn get_shadow_device_angle<S>(&self, device: S) -> Result<f32, Error> where
S: Into<String>,
[src]
S: Into<String>,
Get the shadow open angle for a single device.
pub fn set_shadow_device_angle<S>(
&self,
device: S,
value: f32
) -> Result<(), Error> where
S: Into<String>,
[src]
&self,
device: S,
value: f32
) -> Result<(), Error> where
S: Into<String>,
Set the shade open angle for a single device
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RawApi
impl Send for RawApi
impl Sync for RawApi
impl Unpin for RawApi
impl UnwindSafe for RawApi
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> 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>,