2024-08-02 04:27:56 +00:00
|
|
|
<a id="packet-base-packet"></a>
|
2024-08-01 22:03:59 +00:00
|
|
|
|
2024-08-02 04:27:56 +00:00
|
|
|
# Packet: Base packet
|
2024-07-28 11:21:15 +00:00
|
|
|
|
2024-11-26 17:43:02 +00:00
|
|
|
### *class* Packets.Packet.Packet(data: bytes, packetsID: int = -1, packetNumber=False, packetCount: int = 1, packetsClass: int = -1, primaryMessage=None)
|
2024-08-01 01:00:46 +00:00
|
|
|
|
|
|
|
Base class for Packets
|
|
|
|
|
|
|
|
#### data
|
|
|
|
|
|
|
|
Data part this packet is delivering (usually none when creating a header packet)
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
bytes
|
|
|
|
|
|
|
|
#### packetsID
|
|
|
|
|
|
|
|
6 digit (maximum) ID for parent Message (TODO: Change to MessageID)
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### packetNumber
|
|
|
|
|
|
|
|
Index of packet or False
|
|
|
|
|
|
|
|
#### packetCount
|
|
|
|
|
|
|
|
Number of packets in parent Message
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### packetsClass
|
|
|
|
|
|
|
|
3 digit (maximum) class/protocol for message (TODO: Chajge to messageProtocol)
|
|
|
|
|
|
|
|
* **Type:**
|
|
|
|
int
|
|
|
|
|
|
|
|
#### dump()
|
|
|
|
|
|
|
|
Dump packet to msgpack encoded binary data
|
|
|
|
|
|
|
|
#### parsePayload()
|
|
|
|
|
|
|
|
Parse bytes to Packet (TODO: Fix)
|