Skip to main content

DeviceInfo

Struct DeviceInfo 

Source
#[non_exhaustive]
pub struct DeviceInfo {
Show 19 fields pub uid: DeviceUid, pub name: String, pub serial: String, pub model: String, pub version: String, pub supported_protocol: u16, pub features: DeviceFeature, pub address: Option<Ipv4Addr>, pub status: DeviceStatus, pub online: bool, pub configuration_complete: bool, pub config_initialised: bool, pub temperatures: Vec<u8>, pub mesh_master: DeviceUid, pub hdbt_outputs: u8, pub setup_done: Option<bool>, pub installer_id: Option<u16>, pub system_status: Option<(u16, String)>, pub bays: Vec<BayUid>,
}
Expand description

What a device is, and what it is doing.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§uid: DeviceUid

The device’s unique identifier.

§name: String

The name the device advertises, or Unknown before it has said.

§serial: String

Serial number, or Unknown before the device has said.

§model: String

A friendly model name derived from the advertised name and the bays the device reports.

§version: String

Firmware version string from the hello frame.

§supported_protocol: u16

The highest protocol version the device can decode, or zero before it has said.

§features: DeviceFeature

What the device says it can do.

§address: Option<Ipv4Addr>

The address the device was last heard from.

§status: DeviceStatus

Online, offline, booting or rebooting.

§online: bool

Whether the device has been heard from recently enough to count as present.

§configuration_complete: bool

Whether every part of the device’s configuration has arrived.

§config_initialised: bool

Whether the device’s firmware initialises the configuration it broadcasts.

Firmware without it builds some frames over uninitialised stack, so those fields carry noise rather than values: the scaling flags and, behind a spuriously set valid bit, the scaling mode and refresh; bay 0’s addresses in the V2IP sources frame; and the padding beside the remote-control target.

§temperatures: Vec<u8>

Temperatures the device reports, in degrees Celsius, in its own order.

§mesh_master: DeviceUid

The mesh master this device follows, or the zero uid when it is in no mesh.

§hdbt_outputs: u8

How many HDBaseT outputs this model has.

§setup_done: Option<bool>

Whether installation was marked complete, None before the device has said.

§installer_id: Option<u16>

The installer identifier the device carries, if it has reported one.

§system_status: Option<(u16, String)>

A status code and message the device reports about itself.

§bays: Vec<BayUid>

Every bay on the device, in port order.

Trait Implementations§

Source§

impl Clone for DeviceInfo

Source§

fn clone(&self) -> DeviceInfo

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 DeviceInfo

Source§

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

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

impl Eq for DeviceInfo

Source§

impl PartialEq for DeviceInfo

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DeviceInfo

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.