Packet¶
Packet objects are created by the Protocol component. They are analogous to transport layer packets in the Internet. They encode the sender and receiver of the packet along with the other properties listed below. Generally, users will not need to interact with Packet objects directly.
-
class
qunetsim.objects.packets.packet.
Packet
(sender, receiver, protocol, payload_type, payload, sequence_number=-1, await_ack=False)¶ Bases:
object
A transport layer packet.
-
property
await_ack
¶ If the packet triggers an ACK request.
- Returns
If the packet triggers an ACK request.
- Return type
await_ack (bool)
-
property
payload
¶ The payload.
- Returns
The payload.
- Return type
payload (Object)
-
property
payload_type
¶ The type of payload (e.g. classical, quantum, etc.)
- Returns
The type of payload.
- Return type
payload_type (str)
-
property
protocol
¶ The protocol constant.
- Returns
The protocol constant.
- Return type
protocol (str)
-
property
receiver
¶ The receiver ID of the packet.
- Returns
The receiver ID of the packet.
- Return type
receiver (str)
-
property
sender
¶ The sender ID of the packet.
- Returns
The sender ID of the packet.
- Return type
sender (str)
-
property
seq_num
¶ The sequence number of the packet.
- Returns
The sequence number of the packet.
- Return type
seq_num (int)
-
property