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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.