autd3_driver::datagram

Trait Gain

Source
pub trait Gain: Debug {
    type G: GainContextGenerator;

    // Required method
    fn init(
        self,
        geometry: &Geometry,
        filter: Option<&HashMap<usize, BitVec<u32>>>,
    ) -> Result<Self::G, AUTDDriverError>;
}
Expand description

Trait for calculating the phase/amplitude of each transducer.

See also Gain derive macro.

Required Associated Types§

Source

type G: GainContextGenerator

The type of the context generator.

Required Methods§

Source

fn init( self, geometry: &Geometry, filter: Option<&HashMap<usize, BitVec<u32>>>, ) -> Result<Self::G, AUTDDriverError>

Initialize the gain and generate the context generator.

filter is a hash map that holds a bit vector representing the indices of the enabled transducers for each device index. If filter is None, all transducers are enabled.

Implementors§

Source§

impl Gain for BoxedGain

Source§

type G = DynGainContextGenerator