new_exceptions
parameter
has been removed from the Frame()
constructor and the
Frame.pack_len()
method.dali.driver.hid.tridonic
[mbecker]The exceptions raised by dali.frame.Frame()
and the
Frame.pack_len()
method are changing. In release versions <= 0.8,
if you pass an invalid sequence to initialise a Frame
a
TypeError
will be raised. In release 0.9 this changed to
ValueError
. If you pass an invalid length to pack_len()
,
currently a ValueError
will be raised. In release 0.9 this changed
to OverflowError
.
To obtain the new behaviour when using release 0.8, pass
new_exceptions=True
to Frame()
and pack_len()
. In release
0.9, you can to continue to obtain the old behaviour by passing
new_exceptions=False
. In the release after that (provisionally
"0.10"), passing any value for new_exceptions
will issue a warning
and in the release after that, the new_exceptions
keyword
argument will be removed.
The new behaviour makes the library more consistent with the
exceptions raised by the native int.from_bytes()
and
int.to_bytes()
methods.
new_exceptions
when calling the
Frame()
constructor or the Frame.pack_len()
method will
issue a warning.dali.address
classes for gear and devices have been
separated. dali.address.Short()
has been split into
dali.address.GearShort()
and dali.address.DeviceShort()
;
similar changes have been made to Group()
, Broadcast()
and
BroadcastUnaddressed()
. The old names are still present and
usable for gear, and there is no plan to remove them. [sl-wallace]dali.device.general
has been
improved: commands now have appropriate Response
types. This
code has now been tested against real hardware. [sl-wallace]Command._devicetype
, Command.is_config
and
Command._response
have been removed. (They were deprecated in
release 0.7.)new_exceptions=False
when calling the Frame()
constructor
and the Frame.pack_len()
method.new_exceptions=True
when
calling the Frame()
constructor and the Frame.pack_len()
method.dali.driver.hasseb
[dgomes]pack_len()
method and simplify
str(BackwardFrame())
outputResponse.raw_value
attribute to Response
objects to give
access to the underlying BackwardFrame
of the response (or
None
if no response was received)NumericResponse
and NumericResponseMask
classes and make
use of them where appropriateCommand
class attributes, removing the initial _
to indicate that they are public. The API now supports
Command.response
, Command.devicetype
,
Command.uses_dtr{0,1,2}
, Command.inputdev
and
Command.appctrl
attributes.dali.bus
module; all of the useful code from
it is now implemented as sequencescommand.from_frame()
functiondali.device.Device._addressobj
to
dali.device.Device.address_obj
since it is used as API in
dali.command.Command
.
[rnix]dali.device.Device
class to dali.bus
, dali.device
module
has been removed which conflicted with dali.device
package.
[rnix]dali.exceptions
module and move all DALI related exceptions to it.
[rnix]dali.interfaces
to dali.drivers.daliserver
.
[rnix]此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。