Skip to content

SetOutputMask

SetOutputMask is a command that toggles output enable/disable per transducer.

SetOutputMask { masks };
Field Type Description
masks Vec<Vec<bool>> Output mask per device (output when true).

Geometry::output_mask_buffer allocates the masks for all devices. Every entry starts at true (all transducers output).

use autd3_rs::commands::{Clear, SetOutputMask, Synchronize};
use autd3_rs::geometry::{Autd3, Geometry};
use autd3_rs::Client;
use autd3_rs::udp::TransportOption;
let geometry = Geometry::new(vec![Autd3::default()]);
let option = TransportOption::default();
let mut client = Client::open(&geometry, &option).await?;
client.send(Clear).await?;
client.send(Synchronize).await?;
let masks = geometry.output_mask_buffer();
client.send(SetOutputMask { masks }).await?;