Clipsal C-Bus Guia do Utilizador Página 49

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 60
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 48
cbus Documentation, Release 0.1-dev
Base type for lighting application SALs.
This should not be called directly by your code!
Use one of the subclasses of cbus.protocol.lighting.LightingSAL instead.
classmethod decode(data, packet)
Decodes a lighting 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.lighting.LightingSAL
encode()
Encodes the SAL into a format for sending over the C-Bus network.
class cbus.protocol.application.lighting.LightingRampSAL(packet, group_address, dura-
tion, level)
Bases: cbus.protocol.application.lighting.LightingSAL
Lighting Ramp (fade) event SAL
Instructs the given group address to fade to a lighting level (brightness) over a given duration.
Creates a new SAL Lighting Ramp message.
Parameters
packet (cbus.protocol.base_packet.BasePacket) The packet that this SAL is to be included
in.
group_address (int) – The group address to ramp.
duration (int) – The duration to ramp over, in seconds.
level (float) The level to ramp to, with 0.0 indicating off, and 1.0 indicating full brightness.
classmethod decode(data, packet, command_code, group_address)
Do not call this method directly – use LightingSAL.decode
encode()
class cbus.protocol.application.lighting.LightingOnSAL(packet, group_address)
Bases: cbus.protocol.application.lighting.LightingSAL
Lighting on event SAL
Instructs a given group address to turn it’s load on.
Creates a new SAL Lighting On message.
Parameters
packet (cbus.protocol.base_packet.BasePacket) The packet that this SAL is to be included
in.
group_address (int) – The group address to turn on.
classmethod decode(data, packet, command_code, group_address)
Do not call this method directly – use LightingSAL.decode
encode()
8.1. cbus Package 45
Vista de página 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 59 60

Comentários a estes Manuais

Sem comentários