mwings.serializers.app_pal_notice_event Module
mwings.serializers.app_pal_notice_eventSerializers that generate commands representing event packets to be sent to the PAL App (Notification PAL), and the data structures to handle them.
CommandSerializer
Static class serializer that generates commands representing event data packets sent to the PAL App (Notification PAL)
Inherits from:
common.CommandSerializerBase
The members inherited from the base class are listed.
serialize()
serialize(command)
Expands the given command into a raw packet byte sequence.
Arguments
| Name | Type | Description |
|---|---|---|
command | Command | Command data |
Returns
| Type | Value | Description |
|---|---|---|
optional common.BarePacket | common.BarePacket | Expanded data |
None | Invalid command data |
Command
Structure to hold data used when generating commands representing event data packets sent to the PAL App (Notification PAL)
Inherits from:
common.CommandBase
Members inherited from the base class are also listed.
Command()
Command(*, destination_logical_id=120, event_id=0)
Arguments
| Name | Type | Description |
|---|---|---|
destination_logical_id | common.UInt8 | Destination logical device ID |
event_id | common.UInt8 | Event ID |
You can also pass a dictionary unpacked with
**.
is_valid()
is_valid()
Checks whether the command data is valid.
Arguments
None
Returns
| Type | Value | Description |
|---|---|---|
bool | True | Valid |
False | Invalid |
model_*()
In addition, you can use various methods of
pydantic.BaseModel.