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
impl Copy for Frame
impl Eq for Frame
impl StructuralEq for Frame
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more