Skip to content

Fields

busylight_core.vendors.epos.implementation.fields

EPOS Busylight bit field definitions.

This module defines BitField classes used to construct device commands. Each field represents a specific portion of the 80-bit command structure that controls various aspects of EPOS Busylight device behavior.

Classes

busylight_core.vendors.epos.implementation.fields.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

Source code in src/busylight_core/word.py
def __init__(self, offset: int, width: int = 1) -> None:
    """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
    """
    self.field = slice(offset, offset + width)
    self.offset = offset  # Store for introspection
    self.width = width  # Store for introspection
Attributes
busylight_core.vendors.epos.implementation.fields.ReportField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.fields.ReportField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.fields.ReportField.width instance-attribute
width = width

busylight_core.vendors.epos.implementation.fields.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

Source code in src/busylight_core/word.py
def __init__(self, offset: int, width: int = 1) -> None:
    """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
    """
    self.field = slice(offset, offset + width)
    self.offset = offset  # Store for introspection
    self.width = width  # Store for introspection
Attributes
busylight_core.vendors.epos.implementation.fields.ActionField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.fields.ActionField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.fields.ActionField.width instance-attribute
width = width

busylight_core.vendors.epos.implementation.fields.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

Source code in src/busylight_core/word.py
def __init__(self, offset: int, width: int = 1) -> None:
    """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
    """
    self.field = slice(offset, offset + width)
    self.offset = offset  # Store for introspection
    self.width = width  # Store for introspection
Attributes
busylight_core.vendors.epos.implementation.fields.ColorField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.fields.ColorField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.fields.ColorField.width instance-attribute
width = width

busylight_core.vendors.epos.implementation.fields.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

Source code in src/busylight_core/word.py
def __init__(self, offset: int, width: int = 1) -> None:
    """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
    """
    self.field = slice(offset, offset + width)
    self.offset = offset  # Store for introspection
    self.width = width  # Store for introspection
Attributes
busylight_core.vendors.epos.implementation.fields.OnField.field instance-attribute
field = slice(offset, offset + width)
busylight_core.vendors.epos.implementation.fields.OnField.offset instance-attribute
offset = offset
busylight_core.vendors.epos.implementation.fields.OnField.width instance-attribute
width = width