
cbus Documentation, Release 0.1-dev
classmethod decode(data, packet)
Decodes a enable control application packet and returns it’s SAL(s).
Parameters
• data (str) – SAL data to be parsed.
• packet (cbus.protocol.base_packet.BasePacket) – The packet that this data is associated
with.
Returns The SAL messages contained within the given data.
Return type list of cbus.protocol.application.enable.EnableSAL
encode()
Encodes the SAL into a format for sending over the C-Bus network.
class cbus.protocol.application.enable.EnableSetNetworkVariableSAL(packet, vari-
able, value)
Bases: cbus.protocol.application.enable.EnableSAL
Enable control Set Network Variable SAL.
Sets a network variable.
Creates a new SAL Enable Control Set Network Variable
Parameters
• packet (cbus.protocol.base_packet.BasePacket) – The packet that this SAL is to be included
in.
• variable (int) – The variable ID being changed
• value (int) – The value of the network variable
classmethod decode(data, packet, command_code)
Do not call this method directly – use EnableSAL.decode
encode()
Lighting Application
The lighting application is the most commonly used application on the C-Bus network.
It is used for turning lights on and off, and setting lights to a particular brightness.
Sometimes the lighting application is used to control other, non-lighting loads, such as exhaust fans.
Please refer to this document in conjunction with the Lighting Application Guide published by Clipsal.
class cbus.protocol.application.lighting.LightingApplication
Bases: object
This class is called in the cbus.protocol.applications.APPLICATIONS dict in order to describe how to decode
lighting application events recieved from the network.
Do not call this class directly.
classmethod decode_sal(data, packet)
Decodes a lighting application packet and returns it’s SAL(s).
class cbus.protocol.application.lighting.LightingSAL(packet=None,
group_address=None)
Bases: object
44 Chapter 8. libcbus module index
Comentários a estes Manuais