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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:19:33 +0000 (18:19 -0400)
commit8ae92ae27bb77cd51a014eae28ade8f18ed10fed
treeedf731e51be0269d72c8b26d92f4980b4fa48f2d
parent001b7a8964fc2fdf1c24222c51e732b13ca0d2cb
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.027444 seconds and 4 git commands to generate.