#endif
extern const bt_clock_snapshot *
-bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
const bt_message *msg);
#ifdef __cplusplus
extern
bt_message *bt_message_message_iterator_inactivity_create(
bt_self_message_iterator *message_iterator,
- const bt_clock_class *default_clock_class, uint64_t raw_value);
+ const bt_clock_class *clock_class, uint64_t raw_value);
#ifdef __cplusplus
}
class _MessageIteratorInactivityMessageConst(
_MessageConst, _MessageWithDefaultClockSnapshot
):
- _borrow_default_clock_snapshot_ptr = staticmethod(
- native_bt.message_message_iterator_inactivity_borrow_default_clock_snapshot_const
+ _borrow_clock_snapshot_ptr = staticmethod(
+ native_bt.message_message_iterator_inactivity_borrow_clock_snapshot_const
)
@property
- def default_clock_snapshot(self):
- # This kind of message always has a default clock class: no
+ def clock_snapshot(self):
+ # This kind of message always has a clock class: no
# need to call self._check_has_default_clock_class() here.
- return self._get_default_clock_snapshot(self._borrow_default_clock_snapshot_ptr)
+ return self._get_default_clock_snapshot(self._borrow_clock_snapshot_ptr)
class _MessageIteratorInactivityMessage(
{
struct bt_message_message_iterator_inactivity *inactivity_msg =
(struct bt_message_message_iterator_inactivity *) msg;
- clock_snapshot = inactivity_msg->default_cs;
+ clock_snapshot = inactivity_msg->cs;
break;
}
case BT_MESSAGE_TYPE_PACKET_BEGINNING:
const struct bt_message_message_iterator_inactivity *inactivity_msg =
(const void *) msg;
- clk_snapshot = inactivity_msg->default_cs;
+ clk_snapshot = inactivity_msg->cs;
BT_ASSERT_DBG(clk_snapshot);
break;
}
BT_LIB_LOGD("Destroying message iterator inactivity message: %!+n",
message);
- if (message->default_cs) {
- bt_clock_snapshot_recycle(message->default_cs);
- message->default_cs = NULL;
+ if (message->cs) {
+ bt_clock_snapshot_recycle(message->cs);
+ message->cs = NULL;
}
g_free(message);
struct bt_message *bt_message_message_iterator_inactivity_create(
struct bt_self_message_iterator *self_msg_iter,
- const struct bt_clock_class *default_clock_class,
+ const struct bt_clock_class *clock_class,
uint64_t value_cycles)
{
struct bt_message_iterator *msg_iter =
BT_ASSERT_PRE_DEV_NO_ERROR();
BT_ASSERT_PRE_NON_NULL(msg_iter, "Message iterator");
- BT_ASSERT_PRE_NON_NULL(default_clock_class, "Default clock class");
+ BT_ASSERT_PRE_NON_NULL(clock_class, "Default clock class");
BT_LIB_LOGD("Creating message iterator inactivity message object: "
- "%![iter-]+i, %![default-cc-]+K, value=%" PRIu64, msg_iter,
- default_clock_class, value_cycles);
+ "%![iter-]+i, %![cc-]+K, value=%" PRIu64, msg_iter,
+ clock_class, value_cycles);
message = g_new0(struct bt_message_message_iterator_inactivity, 1);
if (!message) {
BT_LIB_LOGE_APPEND_CAUSE(
BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY,
bt_message_message_iterator_inactivity_destroy, NULL);
ret_msg = &message->parent;
- message->default_cs = bt_clock_snapshot_create(
- (void *) default_clock_class);
- if (!message->default_cs) {
+ message->cs = bt_clock_snapshot_create(
+ (void *) clock_class);
+ if (!message->cs) {
goto error;
}
- bt_clock_snapshot_set_raw_value(message->default_cs, value_cycles);
+ bt_clock_snapshot_set_raw_value(message->cs, value_cycles);
BT_LIB_LOGD("Created message iterator inactivity message object: %!+n",
ret_msg);
}
extern const struct bt_clock_snapshot *
-bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
const bt_message *msg)
{
struct bt_message_message_iterator_inactivity *inactivity = (void *) msg;
BT_ASSERT_PRE_DEV_NON_NULL(msg, "Message");
BT_ASSERT_PRE_DEV_MSG_IS_TYPE(msg,
BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY);
- return inactivity->default_cs;
+ return inactivity->cs;
}
struct bt_message_message_iterator_inactivity {
struct bt_message parent;
- struct bt_clock_snapshot *default_cs;
+ struct bt_clock_snapshot *cs;
};
#endif /* BABELTRACE_GRAPH_MESSAGE_MESSAGE_ITERATOR_INACTIVITY_INTERNAL_H */
case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
{
const bt_clock_snapshot *left_cs =
- bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(msgs->left.msg);
+ bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(msgs->left.msg);
const bt_clock_snapshot *right_cs =
- bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(msgs->right.msg);
+ bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(msgs->right.msg);
ret = compare_clock_snapshots_and_clock_classes(
left_cs, right_cs);
msg);
break;
case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
- clock_snapshot = bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+ clock_snapshot = bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
msg);
break;
default:
{
int ret = 0;
const bt_clock_snapshot *cs =
- bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+ bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
msg);
/* Write time */
break;
case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
- clock_snapshot = bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+ clock_snapshot = bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
msg);
break;
default:
BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY)) {
const bt_clock_snapshot *cs;
- cs = bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+ cs = bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
msg);
ret = validate_clock_class(muxer_msg_iter, muxer_comp,
bt_clock_snapshot_borrow_clock_class_const(cs));
break;
case BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY:
clock_snapshot =
- bt_message_message_iterator_inactivity_borrow_default_clock_snapshot_const(
+ bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(
msg);
break;
default:
elif i == 3:
self.assertIs(type(msg), bt2._MessageIteratorInactivityMessageConst)
self.assertIs(
- type(msg.default_clock_snapshot),
- bt2_clock_snapshot._ClockSnapshotConst,
+ type(msg.clock_snapshot), bt2_clock_snapshot._ClockSnapshotConst
)
- self.assertEqual(msg.default_clock_snapshot.value, i)
+ self.assertEqual(msg.clock_snapshot.value, i)
elif i == 4:
self.assertIs(type(msg), bt2._DiscardedEventsMessageConst)
self.assertIs(type(msg.stream), bt2_stream._StreamConst)