bt2: InactivityNotification, _Event: use mapping protocol for clock values
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 19 Feb 2018 23:25:05 +0000 (18:25 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 12 Apr 2019 21:25:04 +0000 (17:25 -0400)
commit4e27613a536dda20de99cd09e64f09b391256922
tree30cc5903342138c2b42b2106a31b1aca4015c886
parent37cb299886327b094e3a898af755fe0cb170bffb
bt2: InactivityNotification, _Event: use mapping protocol for clock values

The bt2._Event and bt2.InactivityNotification classes both have the
clock_value() and add_clock_value() methods to get and add clock values
associated to clock classes. This can be replaced with a mapping
protocol accessible with the `clock_value` property.

The mapping's add() method can be used to add a clock value to the
mapping (instead of using __setitem__() because the clock value has a
reference to its clock class (the key) anyway).

Tests are updated accordingly.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
bindings/python/bt2/bt2/event.py
bindings/python/bt2/bt2/notification.py
tests/Makefile.am
tests/bindings/python/babeltrace/test_reader_event.py
tests/bindings/python/bt2/test_event.py
tests/bindings/python/bt2/test_notification.py
This page took 0.028717 seconds and 5 git commands to generate.