use crate::firmware::operation::SyncOp;
use crate::datagram::*;
#[derive(Default, Debug)]
pub struct Synchronize {}
impl Synchronize {
pub const fn new() -> Self {
Self {}
}
}
pub struct SynchronizeOpGenerator {}
impl OperationGenerator for SynchronizeOpGenerator {
type O1 = SyncOp;
type O2 = NullOp;
fn generate(&self, _: &Device) -> (Self::O1, Self::O2) {
(Self::O1::default(), Self::O2::default())
}
}
impl Datagram for Synchronize {
type G = SynchronizeOpGenerator;
fn timeout(&self) -> Option<Duration> {
Some(DEFAULT_TIMEOUT)
}
fn operation_generator(self, _: &Geometry) -> Result<Self::G, AUTDInternalError> {
Ok(SynchronizeOpGenerator {})
}
fn parallel_threshold(&self) -> Option<usize> {
Some(usize::MAX)
}
#[tracing::instrument(level = "debug", skip(_geometry))]
fn trace(&self, _geometry: &Geometry) {
tracing::debug!("{}", tynm::type_name::<Self>());
}
}