Skip to main content

Channel

Struct Channel 

Source
pub struct Channel<'a> {
    pub osc_sender: &'a OscSender,
    pub channel: u32,
}

Fields§

§osc_sender: &'a OscSender§channel: u32

Implementations§

Source§

impl Channel<'_>

Source

pub fn at(&self, value: u8) -> Result<(), OscSenderError>

Sets this channel’s intensity to the specified value value: The intensity of that channel, in percent.

Examples found in repository?
examples/set-channel.rs (line 14)
7fn main() {
8    let desk: EosDesk = EosDesk::new(
9        (IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 8001),
10        (IpAddr::V4(Ipv4Addr::new(192, 168, 122, 95)), 8000),
11    )
12    .expect("Failed to init desk");
13
14    desk.channel(31).at(50).expect("failed to set 31 to 50");
15}
Source

pub fn param(&self, param: &str, value: i32) -> Result<(), OscSenderError>

Sets this channel’s parameter to the specified value. param: The parameter to change. e.g: “pan” or “tilt” value: what to set this parameter to. A value in degrees for pan and tilt

Source

pub fn pan(&self, degrees: i32) -> Result<(), OscSenderError>

Sets a channel’s pan value to the specified angle. degrees: The degree value of the pan of this channel

Examples found in repository?
examples/channel-paramater.rs (line 14)
7fn main() {
8    let desk: EosDesk = EosDesk::new(
9        (IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 8001),
10        (IpAddr::V4(Ipv4Addr::new(192, 168, 122, 95)), 8000),
11    )
12    .expect("Failed to init desk");
13    desk.channel(31)
14        .pan(-90)
15        .expect("Failed to set pan on channel 31")
16}
Source

pub fn tilt(&self, degrees: i32) -> Result<(), OscSenderError>

Sets a channel’s tilt value to the specified angle degrees: The degree value of the pan of this channel

Source

pub fn remdim(&self) -> Result<(), OscSenderError>

Sets all other channels to zero and leaves this one untouched

Examples found in repository?
examples/remdim.rs (line 15)
7fn main() {
8    let desk: EosDesk = EosDesk::new(
9        (IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 8001),
10        (IpAddr::V4(Ipv4Addr::new(192, 168, 122, 95)), 8000),
11    )
12    .expect("Failed to init desk");
13
14    desk.channel(31)
15        .remdim()
16        .expect("Failed to remdim channel 31")
17}

Auto Trait Implementations§

§

impl<'a> Freeze for Channel<'a>

§

impl<'a> RefUnwindSafe for Channel<'a>

§

impl<'a> Send for Channel<'a>

§

impl<'a> Sync for Channel<'a>

§

impl<'a> Unpin for Channel<'a>

§

impl<'a> UnsafeUnpin for Channel<'a>

§

impl<'a> UnwindSafe for Channel<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.