Trait autd3_driver::datagram::Modulation

source ·
pub trait Modulation: ModulationProperty {
    // Required method
    fn calc(
        &self,
        geometry: &Geometry
    ) -> Result<HashMap<usize, Vec<u8>>, AUTDInternalError>;

    // Provided method
    fn transform<F: Fn(&Device) -> Result<Vec<u8>, AUTDInternalError> + Sync>(
        geometry: &Geometry,
        f: F
    ) -> Result<HashMap<usize, Vec<u8>>, AUTDInternalError>
       where Self: Sized { ... }
}
Expand description

Modulation controls the amplitude modulation data.

Modulation has following restrictions:

  • The buffer size is up to 65536.
  • The sampling rate is [crate::firmware::fpga::fpga_clk_freq()]/N, where N is a 32-bit unsigned integer and must be at least [crate::fpga::SAMPLING_FREQ_DIV_MIN].

Required Methods§

source

fn calc( &self, geometry: &Geometry ) -> Result<HashMap<usize, Vec<u8>>, AUTDInternalError>

Provided Methods§

source

fn transform<F: Fn(&Device) -> Result<Vec<u8>, AUTDInternalError> + Sync>( geometry: &Geometry, f: F ) -> Result<HashMap<usize, Vec<u8>>, AUTDInternalError>
where Self: Sized,

Trait Implementations§

Implementations on Foreign Types§

source§

impl Modulation for Box<dyn Modulation>

Implementors§