pub struct SensorDescriptor {
pub id: SensorId,
pub display_name: String,
pub unit: Unit,
pub kind: SensorKind,
pub category: Category,
pub native_rate_hz: f32,
pub min: Option<f64>,
pub max: Option<f64>,
pub device_id: Option<String>,
pub device_key: Option<HardwareDeviceKey>,
pub tags: Vec<String>,
}Fields§
§id: SensorId§display_name: String§unit: Unit§kind: SensorKind§category: Category§native_rate_hz: f32§min: Option<f64>§max: Option<f64>§device_id: Option<String>§device_key: Option<HardwareDeviceKey>ABI v4: optional pointer to a HardwareDevice declared on the
owning PluginManifest::devices. The host validates referential
integrity in host_init — a sensor pointing at a key that’s not
in the manifest’s devices list is a PluginError::Manifest.
NEW: sensor tags for filtering and grouping in the UI.
Implementations§
Source§impl SensorDescriptor
impl SensorDescriptor
Sourcepub fn clamped_rate_hz(&self) -> f32
pub fn clamped_rate_hz(&self) -> f32
Native rate hint, clamped into the scheduler’s accepted range.
Trait Implementations§
Source§impl Clone for SensorDescriptor
impl Clone for SensorDescriptor
Source§fn clone(&self) -> SensorDescriptor
fn clone(&self) -> SensorDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SensorDescriptor
impl Debug for SensorDescriptor
Source§impl From<RSensorDescriptor> for SensorDescriptor
impl From<RSensorDescriptor> for SensorDescriptor
Source§fn from(r: RSensorDescriptor) -> Self
fn from(r: RSensorDescriptor) -> Self
Converts to this type from the input type.
Source§impl From<SensorDescriptor> for RSensorDescriptor
impl From<SensorDescriptor> for RSensorDescriptor
Source§fn from(d: SensorDescriptor) -> Self
fn from(d: SensorDescriptor) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SensorDescriptor
impl PartialEq for SensorDescriptor
Source§fn eq(&self, other: &SensorDescriptor) -> bool
fn eq(&self, other: &SensorDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SensorDescriptor
Auto Trait Implementations§
impl Freeze for SensorDescriptor
impl RefUnwindSafe for SensorDescriptor
impl Send for SensorDescriptor
impl Sync for SensorDescriptor
impl Unpin for SensorDescriptor
impl UnsafeUnpin for SensorDescriptor
impl UnwindSafe for SensorDescriptor
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
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