ProtocolMessage#

class ProtocolMessage#

A message in a multi-party protocol.

get_destination_role(self: pyhelayers.ProtocolMessage) pyhelayers.MultiPartyRole#

Get the destination role of this message.

Returns:

The destination role.

Return type:

MultiPartyRole.

get_metadata_as_string(self: pyhelayers.ProtocolMessage, single_line: bool) str#
Parameters:

single_line (bool.) – Whether to print the metadata in a single line.

Returns:

Returns the metadata of this protocol message object as a string.

Return type:

str.

get_protocol_type(self: pyhelayers.ProtocolMessage) pyhelayers.ProtocolType#

Get the protocol type of the protocol of this message.

Returns:

The protocol type.

Return type:

ProtocolType.

get_source_participant_id(self: pyhelayers.ProtocolMessage) int#

Get the source participant ID of this message.

Returns:

The source participant ID.

Return type:

int.

get_to_be_received_on_round(self: pyhelayers.ProtocolMessage) int#

Get the round number in which this message is to be received by the destination.

Returns:

The round number.

Return type:

int.