Struct autd3::Controller[][src]

pub struct Controller<L: Link> {
    pub silent_mode: bool,
    pub reads_fpga_info: bool,
    // some fields omitted
}
Expand description

Controller for AUTD3

Fields

silent_mode: bool

Silent mode flag. Default is true. The flags in the actual devices will be update after update_ctrl_flags or send functions is called.

reads_fpga_info: bool

If true, the devices return FPGA information in all frames. Default is false. The flags in the actual devices will be update after update_ctrl_flags or send functions is called.

Implementations

impl<L: Link> Controller<L>[src]

pub fn open(geometry: Geometry, link: L) -> Result<Self>[src]

Construct controller with geometry and open link.

Arguments

  • geometry - Geometry of the devices
  • link - Link to the device

pub fn geometry(&self) -> &Geometry[src]

pub fn fpga_infos(&mut self) -> Result<&[u8]>[src]

Return FPGA information of the devices (the first bit represent whether the fan is running).

To use this function, set reads_fpga_info true.

pub fn is_open(&self) -> bool[src]

Return the link is opened.

pub async fn update_ctrl_flags(&mut self) -> Result<bool>[src]

Update control flags

pub async fn set_output_delay(&mut self, delay: &[DataArray]) -> Result<bool>[src]

Set output delay

Arguments

  • delay - delay for each transducer in units of ultrasound period (i.e. 25us).

pub async fn clear(&mut self) -> Result<bool>[src]

Clear all data

pub async fn synchronize(&mut self, config: Configuration) -> Result<bool>[src]

Synchronize the devices

Arguments

  • config - Configuration of Modulation

pub async fn close(&mut self) -> Result<()>[src]

Close controller

pub async fn stop(&mut self) -> Result<bool>[src]

Stop outputting

pub async fn send<G: Gain, M: Modulation>(
    &mut self,
    g: &mut G,
    m: &mut M
) -> Result<bool>
[src]

Send gain and modulation to the devices

Arguments

  • g - Gain
  • m - Modulation

pub async fn send_gain<G: Gain>(&mut self, g: &mut G) -> Result<bool>[src]

Send gain to the devices

Arguments

  • g - Gain

pub async fn send_modulation<M: Modulation>(
    &mut self,
    m: &mut M
) -> Result<bool>
[src]

Send modulation to the devices

Arguments

  • m - Modulation

pub async fn send_seq(&mut self, s: &mut PointSequence) -> Result<bool>[src]

Send sequence to the devices

Arguments

  • s - Sequence

pub async fn firmware_infos(&mut self) -> Result<Vec<FirmwareInfo>>[src]

Return firmware information of the devices

pub fn stm(self) -> StmController<L>[src]

Return Spatio-temporal controller

Auto Trait Implementations

impl<L> RefUnwindSafe for Controller<L> where
    L: RefUnwindSafe

impl<L> Send for Controller<L>

impl<L> Sync for Controller<L> where
    L: Sync

impl<L> Unpin for Controller<L> where
    L: Unpin

impl<L> UnwindSafe for Controller<L> where
    L: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

pub fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

pub fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).

pub fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

pub fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.