Skip to main content

Wall

Struct Wall 

Source
pub struct Wall<S: FrameSink = Link> { /* private fields */ }
Expand description

A wall of panels on one network interface.

Implementations§

Source§

impl Wall<Link>

Source

pub fn open(iface: &str, canvas: Canvas, settings: Settings) -> Result<Self>

Open the interface and bind it to a canvas.

§Errors

Fails if the interface cannot be opened, or the canvas is inconsistent.

Source§

impl<S: FrameSink> Wall<S>

Source

pub fn with_sink(dev: S, canvas: Canvas, settings: Settings) -> Result<Self>

Bind a canvas to any frame sink.

§Errors

Fails if the canvas is inconsistent or too large for the row packet’s u16 coordinates (every receiver lies inside it, so they fit too).

Source

pub const fn canvas(&self) -> &Canvas

Source

pub const fn frames_sent(&self) -> u64

Source

pub const fn settings(&self) -> &Settings

Source

pub fn set_brightness(&mut self, brightness: u8)

Change the brightness every later refresh carries. Nothing is sent here; the cached brightness and latch frames are rebuilt.

Source

pub fn set_gains(&mut self, brightness: u8, gains: [u8; 3])

set_brightness with the latch frame’s three channel gains given separately (colorlight::sync_gains); the brightness frame carries only the master.

Source

pub fn announce_layout(&mut self) -> Result<()>

Tell every receiver its own window and the size of the whole wall. The as u16 casts are lossless: sizes were checked in with_sink.

§Errors

Fails if a frame cannot be sent.

Source

pub fn show(&mut self, frame: &Frame) -> Result<()>

Render one canvas frame onto the screen and push the screen to the chain: brightness, one row packet per screen row (chunked at 497 pixels), the latch gap, the latches. Row and pixel offset are screen coordinates; every card keeps its own window of them (docs/receiver-identity.md), so the stream is the same however many cards listen.

A card fresh from arming never starts when the latch leads the rows; once woken either order works (docs/rendering.md).

§Errors

Fails if a frame cannot be sent.

Source

pub fn show_rows(&mut self, frame: &Frame, rows: Range<u32>) -> Result<()>

show sending only the screen rows in rows (clipped to the screen) between the brightness frame and the latches. Rows are addressed and the card keeps its frame memory, so the rest of the picture stays as last sent; an empty range sends brightness and latches alone. The card’s own scan bounds how fast a band can change.

§Errors

Fails if a frame cannot be sent.

Source

pub fn blank(&mut self) -> Result<()>

Blank every panel.

§Errors

Fails if a frame cannot be sent.

Auto Trait Implementations§

§

impl<S> Freeze for Wall<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Wall<S>
where S: RefUnwindSafe,

§

impl<S> Send for Wall<S>
where S: Send,

§

impl<S> Sync for Wall<S>
where S: Sync,

§

impl<S> Unpin for Wall<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Wall<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for Wall<S>
where S: UnwindSafe,

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.