autd3_driver/datagram/
mod.rs

1mod boxed;
2mod clear;
3#[cfg(feature = "dynamic_freq")]
4mod clock;
5mod cpu_gpio_out;
6mod debug;
7mod force_fan;
8mod gain;
9mod gpio_in;
10mod info;
11mod modulation;
12mod phase_corr;
13mod pulse_width_encoder;
14mod reads_fpga_state;
15mod segment;
16mod silencer;
17mod stm;
18mod synchronize;
19mod tuple;
20mod with_loop_behavior;
21mod with_segment;
22
23#[doc(inline)]
24pub use super::firmware::operation::SwapSegment;
25#[doc(inline)]
26pub use super::firmware::operation::{ControlPoint, ControlPoints};
27pub use boxed::{BoxedDatagram, IntoBoxedDatagram};
28pub use clear::Clear;
29#[cfg(feature = "dynamic_freq")]
30pub use clock::ConfigureFPGAClock;
31#[doc(hidden)]
32pub use cpu_gpio_out::{CpuGPIO, CpuGPIOPort};
33pub use debug::DebugSettings;
34pub use force_fan::ForceFan;
35pub use gain::{BoxedGain, IntoBoxedGain};
36#[doc(hidden)]
37pub use gpio_in::EmulateGPIOIn;
38pub use modulation::{BoxedModulation, IntoBoxedModulation};
39pub use phase_corr::PhaseCorrection;
40pub use pulse_width_encoder::PulseWidthEncoder;
41pub use reads_fpga_state::ReadsFPGAState;
42#[cfg(not(feature = "dynamic_freq"))]
43pub use silencer::FixedCompletionTime;
44pub use silencer::{FixedCompletionSteps, FixedUpdateRate, Silencer};
45pub use stm::{
46    FociSTM, FociSTMGenerator, FociSTMIterator, FociSTMIteratorGenerator, GainSTM,
47    GainSTMGenerator, GainSTMIterator, GainSTMIteratorGenerator, GainSTMOption, STMConfig,
48};
49pub use with_loop_behavior::WithLoopBehavior;
50pub use with_segment::WithSegment;
51
52pub use synchronize::Synchronize;
53
54pub use autd3_core::datagram::Datagram;
55
56use crate::{
57    firmware::operation::NullOp,
58    geometry::{Device, Geometry},
59};
60
61use crate::{error::AUTDDriverError, firmware::operation::OperationGenerator};
62
63#[cfg(test)]
64pub(crate) mod tests {
65    use crate::firmware::operation::tests::create_device;
66
67    use super::*;
68
69    pub fn create_geometry(n: u16, num_trans_in_unit: u8) -> Geometry {
70        Geometry::new(
71            (0..n)
72                .map(|i| create_device(i, num_trans_in_unit))
73                .collect(),
74        )
75    }
76}