Skip to content

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.

Attributes
busylight_core.vendors.epos.implementation.Action.SetColor class-attribute instance-attribute
SetColor = 4610

busylight_core.vendors.epos.implementation.Report

Bases: IntEnum

Report type enumeration for HID communication.

Defines the HID report numbers used for communication with EPOS devices.

Attributes
busylight_core.vendors.epos.implementation.Report.ONE class-attribute instance-attribute
ONE = 1

busylight_core.vendors.epos.implementation.ActionField

ActionField(offset, width=1)

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

Attributes
busylight_core.vendors.epos.implementation.ActionField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.ActionField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.ActionField.width instance-attribute
width = width

busylight_core.vendors.epos.implementation.ColorField

ColorField(offset, width=1)

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

Attributes
busylight_core.vendors.epos.implementation.ColorField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.ColorField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.ColorField.width instance-attribute
width = width

busylight_core.vendors.epos.implementation.OnField

OnField(offset, width=1)

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

Attributes
busylight_core.vendors.epos.implementation.OnField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.OnField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.OnField.width instance-attribute
width = width

busylight_core.vendors.epos.implementation.ReportField

ReportField(offset, width=1)

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

Attributes
busylight_core.vendors.epos.implementation.ReportField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.ReportField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.ReportField.width instance-attribute
width = width

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.

Attributes
busylight_core.vendors.epos.implementation.State.initial_value instance-attribute
initial_value = value
busylight_core.vendors.epos.implementation.State.length instance-attribute
length = length
busylight_core.vendors.epos.implementation.State.bits instance-attribute
bits = array('B', [value >> n & 1 for n in range])
busylight_core.vendors.epos.implementation.State.value property
value

Return the integer value of the word.

busylight_core.vendors.epos.implementation.State.range property
range

Return the range of bit offsets for this word.

busylight_core.vendors.epos.implementation.State.hex property
hex

Return a string hexadecimal representation of the word.

busylight_core.vendors.epos.implementation.State.bin property
bin

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
color0

Get the first LED color as a tuple of RGB values.

busylight_core.vendors.epos.implementation.State.color1 property writable
color1

Get the second LED color as a tuple of RGB values.

busylight_core.vendors.epos.implementation.State.color property writable
color

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.

Functions
busylight_core.vendors.epos.implementation.State.clear
clear()

Clear all bits in the word.