hololinked.core.zmq.message.EventMessage
Bases: ResponseMessage
Event message class for handling events in the system.
Message indices:
| Index | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Desc | address | header | payload | preserialized payload |
Source code in hololinked/hololinked/core/zmq/message.py
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | |
Functions
event_id
craft_from_arguments
classmethod
craft_from_arguments(event_id: str, sender_id: str, message_type: str = EVENT, payload: SerializableData = SerializableNone, preserialized_payload: PreserializedData = PreserializedEmptyByte) -> EventMessage
create a plain message with a certain type, for example a handshake message.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
id of the event (used by ZMQ pub-sub) |
required |
|
str
|
id of the sender (ZMQ socket identity) |
required |
|
str
|
message type to be sent ( |
EVENT
|
|
SerializableData
|
event payload to send to the client |
SerializableNone
|
|
PreserializedData
|
pre-encoded data, generally used for large or custom data that is already serialized |
PreserializedEmptyByte
|
Returns:
| Type | Description |
|---|---|
EventMessage
|
the crafted message |