lasprs/src/daq/streamcmd.rs

32 lines
833 B
Rust

//! Provides stream messages that come from a running stream
use crate::config::*;
use crate::daq::Qty;
use crate::siggen::Siggen;
use anyhow::{bail, Result};
use crossbeam::channel::Sender;
use std::any::TypeId;
use std::sync::{Arc, RwLock};
use super::*;
cfg_if::cfg_if! {
if #[cfg(feature = "python-bindings")] {
use pyo3::exceptions::PyValueError;
use pyo3::prelude::*;
use pyo3::{pymodule, pyclass, types::PyModule, PyResult};
} else {} }
/// Commands that can be sent to a running stream
pub enum StreamCommand {
/// Add a new queue to a running stream
AddInQueue(SharedInQueue),
/// Remove a queue to a running stream
RemoveInQueue(SharedInQueue),
/// New signal generator config to be used
NewSiggen(Siggen),
/// Stop the thread, do not listen for data anymore.
StopThread,
}