Skip to main content

FrameSessionConfig

Struct FrameSessionConfig 

Source
pub struct FrameSessionConfig {
    pub pps: u32,
    pub transition_fn: TransitionFn,
    pub startup_blank: Duration,
    pub color_delay_points: usize,
    pub reconnect: Option<ReconnectConfig>,
    pub idle_policy: IdlePolicy,
    pub output_filter: Option<Box<dyn OutputFilter>>,
}
Expand description

Configuration for a frame-mode streaming session.

Fields§

§pps: u32

Points per second output rate.

§transition_fn: TransitionFn

Transition function for blanking between frames.

§startup_blank: Duration

Duration of forced blanking after arming (default: 1ms).

§color_delay_points: usize

Number of points to shift RGB relative to XY (0 = disabled).

Delays color channels relative to XY coordinates, compensating for the difference in galvo mirror and laser modulation response times. Applied at composition time. Set to 0 to disable.

§reconnect: Option<ReconnectConfig>

Reconnection configuration (default: disabled).

Set via with_reconnect to enable automatic reconnection when the device disconnects.

§idle_policy: IdlePolicy

Policy for what to output when the stream is idle (disarmed).

Controls scanner behavior when disarmed. Default: Blank (park at origin with laser off). Use Park to park at a specific position.

§output_filter: Option<Box<dyn OutputFilter>>

Optional hook for processing the final presented output.

Implementations§

Source§

impl FrameSessionConfig

Source

pub fn new(pps: u32) -> Self

Create a new config with the given PPS and default transition.

Source

pub fn with_transition_fn(self, f: TransitionFn) -> Self

Set the transition function (builder pattern).

Source

pub fn with_startup_blank(self, duration: Duration) -> Self

Set the startup blank duration (builder pattern).

Source

pub fn with_color_delay_points(self, n: usize) -> Self

Set the color delay in points (builder pattern).

Source

pub fn with_reconnect(self, config: ReconnectConfig) -> Self

Enable automatic reconnection (builder pattern).

Requires the device to have been opened via open_device.

Source

pub fn with_idle_policy(self, policy: IdlePolicy) -> Self

Set the idle policy (builder pattern).

Controls scanner behavior when disarmed. See crate::config::IdlePolicy.

Source

pub fn with_output_filter(self, filter: Box<dyn OutputFilter>) -> Self

Install a final-output filter (builder pattern).

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<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

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.
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,