Struct lifx_core::Frame[][src]

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

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

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

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

1 bit: Determines usage of the Frame Address target field

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

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

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 Debug for Frame
[src]

Formats the value using the given formatter. Read more

impl Clone for Frame
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Frame
[src]

impl PartialEq for Frame
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Frame

impl Sync for Frame