Struct maia_httpd::spectrometer::Spectrometer
source · pub struct Spectrometer { /* private fields */ }
Expand description
Spectrometer.
This struct waits for interrupts from the spectrometer in the FPGA IP core,
reads the spectrum data, transforms it from u64
to f32
format, and sends
it (serialized into Bytes
) into a tokio::sync::broadcast::Sender
.
Implementations§
source§impl Spectrometer
impl Spectrometer
sourcepub fn new(
ip_core: Arc<Mutex<IpCore>>,
interrupt: InterruptWaiter,
sender: Sender<Bytes>
) -> Spectrometer
pub fn new( ip_core: Arc<Mutex<IpCore>>, interrupt: InterruptWaiter, sender: Sender<Bytes> ) -> Spectrometer
Creates a new spectrometer struct.
The interrupt
parameter should correspond to the InterruptWaiter
corresponding to the spectrometer. Each spectra received from the FPGA
is sent to the sender
.
sourcepub fn config(&self) -> SpectrometerConfig
pub fn config(&self) -> SpectrometerConfig
Returns a [’SpectrometerConfig`] object.
This returns a config setter object that can be used to update the spectrometer sample rate and mode from other objects.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Spectrometer
impl Send for Spectrometer
impl Sync for Spectrometer
impl Unpin for Spectrometer
impl !UnwindSafe for Spectrometer
Blanket Implementations§
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