Skip to main content

BinaryInput

Struct BinaryInput 

Source
pub struct BinaryInput {
Show 15 fields pub identifier: ObjectIdentifier, pub object_name: String, pub present_value: BinaryPV, pub description: String, pub device_type: String, pub status_flags: u8, pub event_state: EventState, pub reliability: Reliability, pub out_of_service: bool, pub polarity: Polarity, pub inactive_text: String, pub active_text: String, pub change_of_state_time: Option<Time>, pub change_of_state_count: u32, pub time_of_state_count_reset: Option<Time>,
}
Expand description

Binary Input object

Fields§

§identifier: ObjectIdentifier

Object identifier

§object_name: String

Object name

§present_value: BinaryPV

Present value

§description: String

Description

§device_type: String

Device type

§status_flags: u8

Status flags (4 bits: in_alarm, fault, overridden, out_of_service)

§event_state: EventState

Event state

§reliability: Reliability

Reliability

§out_of_service: bool

Out of service

§polarity: Polarity

Polarity

§inactive_text: String

Inactive text

§active_text: String

Active text

§change_of_state_time: Option<Time>

Change of value time

§change_of_state_count: u32

Change of state count

§time_of_state_count_reset: Option<Time>

Time of state count reset

Implementations§

Source§

impl BinaryInput

Source

pub fn new(instance: u32, object_name: String) -> Self

Create a new Binary Input object

Source

pub fn set_present_value(&mut self, value: BinaryPV)

Set the present value and update change of state

Source

pub fn get_status_flags(&self) -> (bool, bool, bool, bool)

Get status flags as individual booleans

Source

pub fn set_status_flags( &mut self, in_alarm: bool, fault: bool, overridden: bool, out_of_service: bool, )

Set status flags from individual booleans

Trait Implementations§

Source§

impl BacnetObject for BinaryInput

Source§

fn identifier(&self) -> ObjectIdentifier

Get the object identifier
Source§

fn get_property(&self, property: PropertyIdentifier) -> Result<PropertyValue>

Get a property value
Source§

fn set_property( &mut self, property: PropertyIdentifier, value: PropertyValue, ) -> Result<()>

Set a property value
Source§

fn is_property_writable(&self, property: PropertyIdentifier) -> bool

Check if property is writable
Source§

fn property_list(&self) -> Vec<PropertyIdentifier>

Get list of all properties
Source§

impl Clone for BinaryInput

Source§

fn clone(&self) -> BinaryInput

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for BinaryInput

Source§

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

Formats the value using the given formatter. Read more

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.