base_packet
: Base Packet¶
-
class
cbus.protocol.base_packet.
BasePacket
(checksum: bool = True, destination_address_type: cbus.common.DestinationAddressType = <DestinationAddressType.UNSET: 0>, rc: int = 0, dp: bool = False, priority_class: cbus.common.PriorityClass = <PriorityClass.CLASS_4: 0>)¶ Bases:
abc.ABC
-
encode
() → bytes¶
-
encode_packet
() → bytes¶
-
flags
¶
-
-
class
cbus.protocol.base_packet.
InvalidPacket
(payload: bytes, exception: Optional[Exception] = None)¶ Bases:
cbus.protocol.base_packet._SpecialPacket
Invalid packet data.
-
encode
()¶
-
exception
= None¶
-
-
class
cbus.protocol.base_packet.
SpecialClientPacket
¶ Bases:
cbus.protocol.base_packet._SpecialPacket
,abc.ABC
Client -> PCI communications have some special packets, which we make subclasses of SpecialClientPacket to make them entirely separate from normal packets.
These have non-standard methods for serialisation.
-
class
cbus.protocol.base_packet.
SpecialServerPacket
¶ Bases:
cbus.protocol.base_packet._SpecialPacket
,abc.ABC
PCI -> Client has some special packets that we make subclasses of this, because they’re different to regular packets.
These have non-standard serialisation methods.