Clipsal C-Bus User's Guide Page 38

  • Download
  • Add to my manuals
  • Print
  • Page
    / 60
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 37
cbus Documentation, Release 0.1-dev
Throws ValueError If the given duration is too long and cannot be represented.
cbus.common.get_real_cbus_checksum(i)
Calculates the supposedly correct cbus checksum for a message.
Assumes input of a base16 encoded message with the checksum ignored.
cbus.common.ramp_rate_to_duration(rate)
Converts a given ramp rate code into a duration in seconds.
Parameters rate (int) – The ramp rate code to convert.
Returns The number of seconds the ramp runs over.
Return type int
Throws KeyError If the given ramp rate code is invalid.
cbus.common.validate_cbus_checksum(i)
Verifies a C-Bus checksum from a given message.
Parameters i (str) – The C-Bus message to verify the checksum of. Must be in base16 format.
Returns True if the checksum is correct, False otherwise.
Return type bool
cbus.common.validate_ga(group_addr)
Validates a given group address to verify that it is valid.
Parameters group_addr (int) – Input group address to validate.
Returns True if the given group address is valid, False otherwise.
Return type bool
cbus.common.validate_ramp_rate(duration)
Validates the given ramp rate.
Parameters duration (int) A duration, in seconds, to check if it is within the allowed duration
constraints.
Returns True if the duration is within range, False otherwise.
Return type bool
8.1.2 Protocol
C-Bus uses it’s own protocol in order to send messages over the C-Bus PHY.
This is reflected in the PC Interface protocol.
This package contains classes needed in order to operate with the protocol.
base_packet: Base Packet
class cbus.protocol.base_packet.BasePacket(checksum=True, flags=None, destina-
tion_address_type=None, rc=None, dp=None,
priority_class=None)
Bases: object
confirmation = None
source_address = None
34 Chapter 8. libcbus module index
Page view 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 59 60

Comments to this Manuals

No comments