Clipsal C-Bus Betriebsanweisung Seite 37

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 60
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 36
CHAPTER 8
libcbus module index
8.1 cbus Package
This is the package where all C-Bus modules are defined.
8.1.1 Common functions
cbus.common defines various common helper utilities used by the library, and constants required to communicate with
the C-Bus network.
The majority of the functionality shouldn’t be needed by your own application, however it is used internally within
the protocol encoders and decoders.
cbus.common.add_cbus_checksum(i)
Appends a C-Bus checksum to a given message.
Parameters i (str) – The C-Bus message to append a checksum to. Must not be in base16 format.
Returns The C-Bus message with the checksum appended to it.
Return type str
cbus.common.cbus_checksum(i, b16=False)
Calculates the checksum of a C-Bus command string.
Fun fact: C-Bus toolkit and C-Gate do not use commands with checksums.
Parameters
i (str) – The C-Bus data to calculate the checksum of.
b16 (bool) Indicates that the input is in base16 (network) format, and that the return should
be in base16 format.
Returns The checksum value of the given input
Return type int (if b16=False), str (if b16=True)
cbus.common.duration_to_ramp_rate(seconds)
Converts a given duration into a ramp rate code.
Parameters seconds (int) – The number of seconds that the ramp is over.
Returns The ramp rate code for the duration given.
Return type int
33
Seitenansicht 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 59 60

Kommentare zu diesen Handbüchern

Keine Kommentare