pub struct DmxFixture {
pub id: String,
pub name: String,
pub fixture_type: FixtureType,
pub universe: u16,
pub start_channel: u16,
pub channel_count: u16,
pub channel_map: BTreeMap<String, u16>,
}Expand description
A DMX fixture with channel mapping.
Fields§
§id: String§name: String§fixture_type: FixtureType§universe: u16§start_channel: u16§channel_count: u16§channel_map: BTreeMap<String, u16>Implementations§
Source§impl DmxFixture
impl DmxFixture
Sourcepub fn new(
id: &str,
name: &str,
fixture_type: FixtureType,
universe: u16,
start_channel: u16,
channel_count: u16,
) -> Self
pub fn new( id: &str, name: &str, fixture_type: FixtureType, universe: u16, start_channel: u16, channel_count: u16, ) -> Self
Creates a fixture with a start address and channel map.
Sourcepub fn map_channel(&mut self, function: &str, offset: u16)
pub fn map_channel(&mut self, function: &str, offset: u16)
Maps a fixture function name to a channel offset.
Sourcepub fn set_function(
&self,
universe: &mut DmxUniverse,
function: &str,
value: u8,
) -> bool
pub fn set_function( &self, universe: &mut DmxUniverse, function: &str, value: u8, ) -> bool
Set a function value on this fixture in a universe.
Sourcepub fn set_colour(
&self,
universe: &mut DmxUniverse,
r: u8,
g: u8,
b: u8,
) -> bool
pub fn set_colour( &self, universe: &mut DmxUniverse, r: u8, g: u8, b: u8, ) -> bool
Set the colour (RGB) on this fixture.
Sourcepub fn set_pan_tilt(
&self,
universe: &mut DmxUniverse,
pan: u8,
tilt: u8,
) -> bool
pub fn set_pan_tilt( &self, universe: &mut DmxUniverse, pan: u8, tilt: u8, ) -> bool
Set pan/tilt for moving heads.
Sourcepub fn set_intensity(&self, universe: &mut DmxUniverse, intensity: u8) -> bool
pub fn set_intensity(&self, universe: &mut DmxUniverse, intensity: u8) -> bool
Set intensity (0-255).
Trait Implementations§
Source§impl Clone for DmxFixture
impl Clone for DmxFixture
Auto Trait Implementations§
impl Freeze for DmxFixture
impl RefUnwindSafe for DmxFixture
impl Send for DmxFixture
impl Sync for DmxFixture
impl Unpin for DmxFixture
impl UnsafeUnpin for DmxFixture
impl UnwindSafe for DmxFixture
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more