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>
Thu, 2 May 2019 03:32:03 +0000 (23:32 -0400)
commit71fd6f526fb8958500f72b97ce675f25a4284923
tree42069fec1e5f40e996dd3e41d479b138990e55ff
parente4d04867e71ae83fe983b52b26e75d3cf850fd77
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.024631 seconds and 4 git commands to generate.