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.