Struct elgato_keylight::keylight::KeyLight [−][src]
pub struct KeyLight { /* fields omitted */ }
Implementations
pub async fn new_from_ip(
name: &str,
addr: Ipv4Addr,
poll: Option<Duration>
) -> Result<KeyLight, ElgatoError>
pub async fn new_from_ip(
name: &str,
addr: Ipv4Addr,
poll: Option<Duration>
) -> Result<KeyLight, ElgatoError>
Create a new Keylight from a known IP.
Arguments
addr
- IP address to the keylightpoll
- If the library should poll the light for updates
pub async fn new_from_name(
name: &str,
poll: Option<Duration>
) -> Result<KeyLight, ElgatoError>
pub async fn new_from_name(
name: &str,
poll: Option<Duration>
) -> Result<KeyLight, ElgatoError>
Create a new Keylight from device name This uses zeroconf to discover the light on the network.
Arguments
name
- Name of the lamp like “Key Light Left” or whatever your light is namedpoll
- If the library should poll the light for updates
Set the brightness of the light relative to the current value
Arguments
brightness
- f64 between -1.0 and 1.0