EPOS Implementation¶
EPOS status devices
This module contains the low-level implementation details for EPOS devices, including enumerations, bit fields, and state management classes.
Available Components¶
EPOS Busylight implementation details.
Classes¶
busylight_core.vendors.epos.implementation.Action
¶
Bases: IntEnum
Action enumeration for EPOS Busylight device commands.
Defines the available actions that can be performed on EPOS devices. The SetColor action controls the LED color and state.
busylight_core.vendors.epos.implementation.Report
¶
busylight_core.vendors.epos.implementation.ActionField
¶
Bases: BitField
16-bit action field specifying the command to execute.
Create a read-only bit field descriptor.
Defines a named field that maps to specific bit positions within a Word. The field will be accessible as a regular attribute on Word instances but will raise AttributeError on assignment attempts.
:param offset: Starting bit position within the word (0-based from LSB) :param width: Number of consecutive bits to include in the field
busylight_core.vendors.epos.implementation.ColorField
¶
Bases: BitField
8-bit color component field for RGB values.
Create a read-only bit field descriptor.
Defines a named field that maps to specific bit positions within a Word. The field will be accessible as a regular attribute on Word instances but will raise AttributeError on assignment attempts.
:param offset: Starting bit position within the word (0-based from LSB) :param width: Number of consecutive bits to include in the field
busylight_core.vendors.epos.implementation.OnField
¶
Bases: BitField
8-bit field that controls the device power state.
Create a read-only bit field descriptor.
Defines a named field that maps to specific bit positions within a Word. The field will be accessible as a regular attribute on Word instances but will raise AttributeError on assignment attempts.
:param offset: Starting bit position within the word (0-based from LSB) :param width: Number of consecutive bits to include in the field
busylight_core.vendors.epos.implementation.ReportField
¶
Bases: BitField
8-bit report field for HID communication.
Create a read-only bit field descriptor.
Defines a named field that maps to specific bit positions within a Word. The field will be accessible as a regular attribute on Word instances but will raise AttributeError on assignment attempts.
:param offset: Starting bit position within the word (0-based from LSB) :param width: Number of consecutive bits to include in the field
busylight_core.vendors.epos.implementation.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.
Attributes¶
busylight_core.vendors.epos.implementation.State.initial_value
instance-attribute
¶
busylight_core.vendors.epos.implementation.State.bits
instance-attribute
¶
busylight_core.vendors.epos.implementation.State.value
property
¶
Return the integer value of the word.
busylight_core.vendors.epos.implementation.State.range
property
¶
Return the range of bit offsets for this word.
busylight_core.vendors.epos.implementation.State.hex
property
¶
Return a string hexadecimal representation of the word.
busylight_core.vendors.epos.implementation.State.bin
property
¶
Return a string binary representation of the word.
busylight_core.vendors.epos.implementation.State.report
class-attribute
instance-attribute
¶
report = ReportField(72, 8)
busylight_core.vendors.epos.implementation.State.action
class-attribute
instance-attribute
¶
action = ActionField(56, 16)
busylight_core.vendors.epos.implementation.State.red0
class-attribute
instance-attribute
¶
red0 = ColorField(48, 8)
busylight_core.vendors.epos.implementation.State.green0
class-attribute
instance-attribute
¶
green0 = ColorField(40, 8)
busylight_core.vendors.epos.implementation.State.blue0
class-attribute
instance-attribute
¶
blue0 = ColorField(32, 8)
busylight_core.vendors.epos.implementation.State.red1
class-attribute
instance-attribute
¶
red1 = ColorField(24, 8)
busylight_core.vendors.epos.implementation.State.green1
class-attribute
instance-attribute
¶
green1 = ColorField(16, 8)
busylight_core.vendors.epos.implementation.State.blue1
class-attribute
instance-attribute
¶
blue1 = ColorField(8, 8)
busylight_core.vendors.epos.implementation.State.on
class-attribute
instance-attribute
¶
on = OnField(0, 8)
busylight_core.vendors.epos.implementation.State.color0
property
writable
¶
Get the first LED color as a tuple of RGB values.
busylight_core.vendors.epos.implementation.State.color1
property
writable
¶
Get the second LED color as a tuple of RGB values.
busylight_core.vendors.epos.implementation.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.