State
busylight_core.vendors.epos.implementation.state
¶
EPOS Busylight device state management.
This module defines the State class that manages command construction for EPOS Busylight devices, including dual-LED control and device configuration.
Classes¶
busylight_core.vendors.epos.implementation.state.State
¶
Bases: Word
Complete device state for EPOS Busylight commands.
The State class manages command construction for EPOS devices. It supports dual-LED control with independent color settings for each LED, allowing for more complex status indication patterns.
Source code in src/busylight_core/vendors/epos/implementation/state.py
Attributes¶
busylight_core.vendors.epos.implementation.state.State.report
class-attribute
instance-attribute
¶
report = ReportField(72, 8)
busylight_core.vendors.epos.implementation.state.State.action
class-attribute
instance-attribute
¶
action = ActionField(56, 16)
busylight_core.vendors.epos.implementation.state.State.red0
class-attribute
instance-attribute
¶
red0 = ColorField(48, 8)
busylight_core.vendors.epos.implementation.state.State.green0
class-attribute
instance-attribute
¶
green0 = ColorField(40, 8)
busylight_core.vendors.epos.implementation.state.State.blue0
class-attribute
instance-attribute
¶
blue0 = ColorField(32, 8)
busylight_core.vendors.epos.implementation.state.State.red1
class-attribute
instance-attribute
¶
red1 = ColorField(24, 8)
busylight_core.vendors.epos.implementation.state.State.green1
class-attribute
instance-attribute
¶
green1 = ColorField(16, 8)
busylight_core.vendors.epos.implementation.state.State.blue1
class-attribute
instance-attribute
¶
blue1 = ColorField(8, 8)
busylight_core.vendors.epos.implementation.state.State.on
class-attribute
instance-attribute
¶
on = OnField(0, 8)
busylight_core.vendors.epos.implementation.state.State.color0
property
writable
¶
Get the first LED color as a tuple of RGB values.
busylight_core.vendors.epos.implementation.state.State.color1
property
writable
¶
Get the second LED color as a tuple of RGB values.
busylight_core.vendors.epos.implementation.state.State.color
property
writable
¶
Get the first non-black LED color as a tuple of RGB values.
Returns the color of the first LED that has a non-zero color value, or black (0,0,0) if both LEDs are off.
busylight_core.vendors.epos.implementation.state.State.initial_value
instance-attribute
¶
busylight_core.vendors.epos.implementation.state.State.bits
instance-attribute
¶
busylight_core.vendors.epos.implementation.state.State.value
property
¶
Return the integer value of the word.
busylight_core.vendors.epos.implementation.state.State.range
property
¶
Return the range of bit offsets for this word.
busylight_core.vendors.epos.implementation.state.State.hex
property
¶
Return a string hexadecimal representation of the word.
busylight_core.vendors.epos.implementation.state.State.bin
property
¶
Return a string binary representation of the word.