This is the multi-page printable view of this section. Click here to print...

Return to the regular view of this page

As of 2026-11-05

mwings.serializers.app_pal_notice_detailed Module

mwings.serializers.app_pal_notice_detailed

    Serializers that generate commands representing detailed packets to be sent to the PAL App (Notification PAL), and the data structures to handle them.

    src/mwings/serializers/app_pal_notice_detailed.py

    CommandSerializer

    Static class serializer that generates commands representing detailed packets to be sent to the PAL App (Notification PAL).

    Inherits from: common.CommandSerializerBase

    serialize()

    serialize(command)

    Expands the given command into a raw packet byte sequence.

    Parameters

    NameTypeDescription
    commandCommandCommand data

    Returns

    TypeValueDescription
    optional common.BarePacketcommon.BarePacketExpanded data
    NoneInvalid command data

    Command

    Data structure for storing data used to generate commands representing detailed packets to be sent to the PAL App (Notification PAL).

    Inherits from: common.CommandBase

    Command()

    Command(*, destination_logical_id=120, color=AppPalNoticeRGBWColor(red=0, green=0, blue=0, white=15), blink_duty_percentage=100, blink_period_in_sec=1.0, duration_in_sec=1)

    Parameters

    NameTypeDescription
    destination_logical_idcommon.UInt8Destination logical device ID
    colorcommon.AppPalNoticeRGBWColorRGBW color for illumination
    blink_duty_percentagecommon.UInt8Percentage of on-time during blinking
    blink_period_in_seccommon.Float64Blink period in seconds
    duration_in_seccommon.UInt8Total duration of illumination (blinking)

    You can also pass a dictionary unpacked with **.

    is_valid()

    is_valid()

    Checks whether the command data is valid.

    Parameters

    None

    Returns

    TypeValueDescription
    boolTrueValid
    FalseInvalid

    model_*()