autd3_driver/datagram/
synchronize.rs

1use std::convert::Infallible;
2
3use autd3_core::{
4    datagram::{Datagram, DeviceMask},
5    environment::Environment,
6    geometry::Geometry,
7};
8
9/// [`Datagram`] to synchronize the devices.
10#[derive(Default, Debug)]
11pub struct Synchronize {}
12
13impl Synchronize {
14    /// Creates a new [`Synchronize`] instance.
15    #[must_use]
16    pub const fn new() -> Self {
17        Self {}
18    }
19}
20
21impl Datagram<'_> for Synchronize {
22    type G = Self;
23    type Error = Infallible;
24
25    fn operation_generator(
26        self,
27        _: &Geometry,
28        _: &Environment,
29        _: &DeviceMask,
30    ) -> Result<Self::G, Self::Error> {
31        Ok(self)
32    }
33}