Skip to main content

mxr_device_info_t

Struct mxr_device_info_t 

Source
#[repr(C)]
pub struct mxr_device_info_t {
Show 21 fields pub uid: mxr_uid_t, pub name: [c_char; 32], pub serial: [c_char; 32], pub model: [c_char; 48], pub version: [c_char; 129], pub supported_protocol: u16, pub features: u32, pub address: [c_char; 16], pub status: mxr_device_status_t, pub online: bool, pub configuration_complete: bool, pub config_initialised: bool, pub mesh_master: mxr_uid_t, pub hdbt_outputs: u8, pub setup_done: mxr_tribool_t, pub installer_id: i32, pub has_system_status: bool, pub system_status: u16, pub system_message: [c_char; 128], pub temperature_count: usize, pub bay_count: usize,
}
Expand description

What a device is, and what it is doing.

Fields§

§uid: mxr_uid_t

The device’s identifier.

§name: [c_char; 32]

The name the device advertises.

§serial: [c_char; 32]

Serial number.

§model: [c_char; 48]

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

§version: [c_char; 129]

Firmware version string from the hello frame.

§supported_protocol: u16

The highest protocol version the device can decode, or zero before it has said. A command above it is refused rather than sent.

§features: u32

What the device says it can do, as MXR_FEATURE_* bits.

§address: [c_char; 16]

The address the device was last heard from, empty when never.

§status: mxr_device_status_t

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 zero’s addresses in the V2IP sources frame; and the padding beside the remote-control target.

§mesh_master: mxr_uid_t

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

§hdbt_outputs: u8

How many HDBaseT outputs this model has.

§setup_done: mxr_tribool_t

Whether installation was marked complete.

§installer_id: i32

The installer identifier, or -1 when the device has not reported one.

§has_system_status: bool

Whether the device has reported a status about itself.

§system_status: u16

The status code, meaningful only when has_system_status is set.

§system_message: [c_char; 128]

The status message, empty when there is none.

§temperature_count: usize

How many temperatures mxr_device_temperatures() would return.

§bay_count: usize

How many bays mxr_device_bays() would return.

Trait Implementations§

Source§

impl Clone for mxr_device_info_t

Source§

fn clone(&self) -> mxr_device_info_t

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 Copy for mxr_device_info_t

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.