Skip to main content

FixtureCommand

Enum FixtureCommand 

Source
pub(super) enum FixtureCommand {
    SpawnFixture {
        name: String,
        fixture_type_name: String,
        start_channel: ChannelIndex,
        start_universe: usize,
        reply_to: Sender<Result<(), FixtureError>>,
    },
    MoveFixture {
        name: String,
        new_channel: ChannelIndex,
        new_universe: usize,
        reply_to: Sender<Result<(), FixtureError>>,
    },
    RemoveFixture {
        name: String,
        reply_to: Sender<Result<(), FixtureError>>,
    },
    SetProperty {
        fixture_name: String,
        property: PropertyType,
        value: ChannelValue,
        reply_to: Sender<Result<(), FixtureError>>,
    },
    GetType {
        fixture_name: String,
        reply_to: Sender<Result<String, FixtureError>>,
    },
}
Expand description

Commands sent asynchronously to the fixture engine thread to manage fixture instances and modify their properties or states.

Variants§

§

SpawnFixture

Spawns a new fixture instance with a given type, start address, and universe.

Fields

§name: String

Unique name for the new fixture instance.

§fixture_type_name: String

Name of the registered FixtureType template to use.

§start_channel: ChannelIndex

Starting DMX-Channel index within the universe.

§start_universe: usize

DMX universe index (0-based) where the fixture resides.

§reply_to: Sender<Result<(), FixtureError>>

Sender channel used to reply with the success or failure result.

§

MoveFixture

Moves an existing fixture to a new DMX channel and/or universe and changes the reserved channels accordingly

Fields

§name: String

Name of the fixture to move.

§new_channel: ChannelIndex

New starting DMX channel index.

§new_universe: usize

New target DMX universe index.

§reply_to: Sender<Result<(), FixtureError>>

Sender channel used to reply with the success or failure result.

§

RemoveFixture

Removes an existing fixture instance and frees its reserved channels.

Fields

§name: String

Name of the fixture to remove.

§reply_to: Sender<Result<(), FixtureError>>

Sender channel used to reply with the success or failure result.

§

SetProperty

Sets a specific property value on a target fixture.

Fields

§fixture_name: String

Name of the target fixture.

§property: PropertyType

The property type to modify (Simple or Color).

§value: ChannelValue

The new channel value to assign.

§reply_to: Sender<Result<(), FixtureError>>

Sender channel used to reply with the success or failure result.

§

GetType

Retrieves the fixture type name for a given fixture.

Fields

§fixture_name: String

Name of the target fixture.

§reply_to: Sender<Result<String, FixtureError>>

Sender channel used to reply with the fixture type name string or an error.

Auto Trait Implementations§

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.