pub struct BinNetwork { /* private fields */ }Expand description
Network of bin actors with K2K messaging.
Implementations§
Source§impl BinNetwork
impl BinNetwork
Sourcepub async fn new(num_bins: usize, config: SeparationConfig) -> Result<Self>
pub async fn new(num_bins: usize, config: SeparationConfig) -> Result<Self>
Create a new bin network.
Sourcepub fn get_handle(&self, bin_index: usize) -> Option<&BinActorHandle>
pub fn get_handle(&self, bin_index: usize) -> Option<&BinActorHandle>
Get a handle to a specific bin.
Sourcepub async fn send_bins(&self, bins: &[FrequencyBin]) -> Result<()>
pub async fn send_bins(&self, bins: &[FrequencyBin]) -> Result<()>
Send bin data to all actors.
Sourcepub async fn receive_separated(&mut self) -> Result<Vec<SeparatedBin>>
pub async fn receive_separated(&mut self) -> Result<Vec<SeparatedBin>>
Receive separated bins from all actors.
Sourcepub async fn process_frame(
&mut self,
frame_id: u64,
bins: &[Complex],
sample_rate: u32,
fft_size: usize,
) -> Result<Vec<SeparatedBin>>
pub async fn process_frame( &mut self, frame_id: u64, bins: &[Complex], sample_rate: u32, fft_size: usize, ) -> Result<Vec<SeparatedBin>>
Process a frame of FFT bins and return separated bins.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BinNetwork
impl !RefUnwindSafe for BinNetwork
impl Send for BinNetwork
impl Sync for BinNetwork
impl Unpin for BinNetwork
impl !UnwindSafe for BinNetwork
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.