Struct lifx_core::Frame

source ·
pub struct Frame {
    pub size: u16,
    pub origin: u8,
    pub tagged: bool,
    pub addressable: bool,
    pub protocol: u16,
    pub source: u32,
}
Expand description

The Frame section contains information about the following:

  • Size of the entire message
  • LIFX Protocol number: must be 1024 (decimal)
  • Use of the Frame Address target field
  • Source identifier

The tagged field is a boolean that indicates whether the Frame Address target field is being used to address an individual device or all devices. If tagged is true, then the target field should be all zeros.

Fields§

§size: u16

16 bits: Size of entire message in bytes including this field

§origin: u8

2 bits: Message origin indicator: must be zero (0)

§tagged: bool

1 bit: Determines usage of the Frame Address target field

§addressable: bool

1 bit: Message includes a target address: must be one (1)

§protocol: u16

12 bits: Protocol number: must be 1024 (decimal)

§source: u32

32 bits: Source identifier: unique value set by the client, used by responses.

If the source identifier is zero, then the LIFX device may send a broadcast message that can be received by all clients on the same subnet.

If this packet is a reply, then this source field will be set to the same value as the client- sent request packet.

Trait Implementations§

source§

impl Clone for Frame

source§

fn clone(&self) -> Frame

Returns a copy 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 Frame

source§

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

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

impl PartialEq<Frame> for Frame

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Frame

source§

impl Eq for Frame

source§

impl StructuralEq for Frame

source§

impl StructuralPartialEq for Frame

Auto Trait Implementations§

§

impl RefUnwindSafe for Frame

§

impl Send for Frame

§

impl Sync for Frame

§

impl Unpin for Frame

§

impl UnwindSafe for Frame

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere
    T: Clone,

§

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 Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.