This is the development version of the documentation. It may change before the next release. See 0.14.x for the latest release.
SetOutputMask
SetOutputMask is a command that toggles output enable/disable per transducer.
SetOutputMask { masks };SetOutputMask(masks)new 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).
Example
Section titled “Example”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?;import asyncio
from autd3 import Client, TransportOptionfrom autd3.commands import Clear, SetOutputMask, Synchronizefrom autd3.geometry import Autd3, Geometry
async def main() -> None: geometry = Geometry([Autd3()]) with await Client.open(geometry, TransportOption()) as client: await client.send(Clear()) await client.send(Synchronize())
masks = geometry.output_mask_buffer()
await client.send(SetOutputMask(masks=masks))
asyncio.run(main())using System.Threading.Tasks;using AUTD3;
var geometry = new Geometry(new[] { new Autd3() });using var client = await Client.OpenAsync(geometry, new TransportOption());await client.SendAsync(new Clear());await client.SendAsync(new Synchronize());
var masks = geometry.OutputMaskBuffer();
await client.SendAsync(new SetOutputMask(masks));