Skip to main content

NtScalar

Struct NtScalar 

Source
pub struct NtScalar {
Show 28 fields pub value: ScalarValue, pub alarm_severity: i32, pub alarm_status: i32, pub alarm_message: String, pub alarm_low: Option<f64>, pub alarm_high: Option<f64>, pub alarm_lolo: Option<f64>, pub alarm_hihi: Option<f64>, pub display_low: f64, pub display_high: f64, pub display_description: String, pub display_precision: i32, pub display_form_index: i32, pub display_form_choices: Vec<String>, pub control_low: f64, pub control_high: f64, pub control_min_step: f64, pub units: String, pub value_alarm_active: bool, pub value_alarm_low_alarm_limit: f64, pub value_alarm_low_warning_limit: f64, pub value_alarm_high_warning_limit: f64, pub value_alarm_high_alarm_limit: f64, pub value_alarm_low_alarm_severity: i32, pub value_alarm_low_warning_severity: i32, pub value_alarm_high_warning_severity: i32, pub value_alarm_high_alarm_severity: i32, pub value_alarm_hysteresis: u8,
}

Fields§

§value: ScalarValue§alarm_severity: i32§alarm_status: i32§alarm_message: String§alarm_low: Option<f64>§alarm_high: Option<f64>§alarm_lolo: Option<f64>§alarm_hihi: Option<f64>§display_low: f64§display_high: f64§display_description: String§display_precision: i32§display_form_index: i32§display_form_choices: Vec<String>§control_low: f64§control_high: f64§control_min_step: f64§units: String§value_alarm_active: bool§value_alarm_low_alarm_limit: f64§value_alarm_low_warning_limit: f64§value_alarm_high_warning_limit: f64§value_alarm_high_alarm_limit: f64§value_alarm_low_alarm_severity: i32§value_alarm_low_warning_severity: i32§value_alarm_high_warning_severity: i32§value_alarm_high_alarm_severity: i32§value_alarm_hysteresis: u8

Implementations§

Source§

impl NtScalar

Source

pub fn from_value(value: ScalarValue) -> Self

Source

pub fn with_limits(self, low: f64, high: f64) -> Self

Source

pub fn with_units(self, units: String) -> Self

Source

pub fn with_description(self, description: String) -> Self

Source

pub fn with_precision(self, precision: i32) -> Self

Source

pub fn with_alarm_limits( self, low: Option<f64>, high: Option<f64>, lolo: Option<f64>, hihi: Option<f64>, ) -> Self

Source

pub fn update_alarm_from_value(&mut self)

Trait Implementations§

Source§

impl Clone for NtScalar

Source§

fn clone(&self) -> NtScalar

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NtScalar

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for NtScalar

Source§

fn eq(&self, other: &NtScalar) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for NtScalar

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.