#define BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(_iter) \
BT_ASSERT_PRE((_iter)->state == BT_MESSAGE_ITERATOR_STATE_ACTIVE || \
- (_iter)->state == BT_MESSAGE_ITERATOR_STATE_ENDED || \
+ (_iter)->state == BT_MESSAGE_ITERATOR_STATE_ENDED || \
(_iter)->state == BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_AGAIN || \
(_iter)->state == BT_MESSAGE_ITERATOR_STATE_LAST_SEEKING_RETURNED_ERROR, \
"Message iterator is in the wrong state: %!+i", _iter)
struct bt_component_class_with_iterator_class *upstream_comp_cls_with_iter_cls;
int status;
- BT_ASSERT_PRE_NON_NULL(message_iterator, "Created message iterator");
+ BT_ASSERT_PRE_NON_NULL(message_iterator,
+ "Created message iterator (output)");
BT_ASSERT_PRE_NON_NULL(port, "Input port");
comp = bt_port_borrow_component_inline(port);
BT_ASSERT_PRE(bt_port_is_connected(port),
struct bt_message_iterator **message_iterator)
{
BT_ASSERT_PRE_NO_ERROR();
- BT_ASSERT_PRE_NON_NULL(self_msg_iter, "Message iterator");
+ BT_ASSERT_PRE_MSG_ITER_NON_NULL(self_msg_iter);
return create_self_component_input_port_message_iterator(self_msg_iter,
input_port, message_iterator);
}
struct bt_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_MSG_ITER_NON_NULL(iterator);
return iterator->user_data;
}
struct bt_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_MSG_ITER_NON_NULL(iterator);
iterator->user_data = data;
BT_LIB_LOGD("Set message iterator's user data: "
"%!+i, user-data-addr=%p", iterator, data);
enum bt_message_iterator_next_status status = BT_FUNC_STATUS_OK;
BT_ASSERT_PRE_DEV_NO_ERROR();
- BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_MSG_ITER_NON_NULL(iterator);
BT_ASSERT_PRE_DEV_NON_NULL(msgs, "Message array (output)");
BT_ASSERT_PRE_DEV_NON_NULL(user_count, "Message count (output)");
BT_ASSERT_PRE_DEV(iterator->state ==
bt_message_iterator_borrow_component(
struct bt_message_iterator *iterator)
{
- BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_MSG_ITER_NON_NULL(iterator);
return iterator->upstream_component;
}
struct bt_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_MSG_ITER_NON_NULL(iterator);
return (void *) iterator->upstream_component;
}
struct bt_message_iterator *iterator =
(void *) self_iterator;
- BT_ASSERT_PRE_DEV_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_DEV_MSG_ITER_NON_NULL(iterator);
return (void *) iterator->upstream_port;
}
enum bt_message_iterator_can_seek_ns_from_origin_status status;
BT_ASSERT_PRE_NO_ERROR();
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
- BT_ASSERT_PRE_NON_NULL(can_seek, "Result (output)");
+ BT_ASSERT_PRE_MSG_ITER_NON_NULL(iterator);
+ BT_ASSERT_PRE_RES_OUT_NON_NULL(can_seek);
BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(iterator);
BT_ASSERT_PRE(
bt_component_borrow_graph(iterator->upstream_component)->config_state !=
enum bt_message_iterator_can_seek_beginning_status status;
BT_ASSERT_PRE_NO_ERROR();
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
- BT_ASSERT_PRE_NON_NULL(can_seek, "Result (output)");
+ BT_ASSERT_PRE_MSG_ITER_NON_NULL(iterator);
+ BT_ASSERT_PRE_RES_OUT_NON_NULL(can_seek);
BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(iterator);
BT_ASSERT_PRE(
bt_component_borrow_graph(iterator->upstream_component)->config_state !=
int status;
BT_ASSERT_PRE_NO_ERROR();
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_MSG_ITER_NON_NULL(iterator);
BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(iterator);
BT_ASSERT_PRE(
bt_component_borrow_graph(iterator->upstream_component)->config_state !=
bt_message_iterator_can_seek_forward(
bt_message_iterator *iterator)
{
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_MSG_ITER_NON_NULL(iterator);
return iterator->config.can_seek_forward;
}
bt_bool can_seek_by_itself;
BT_ASSERT_PRE_NO_ERROR();
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_MSG_ITER_NON_NULL(iterator);
BT_ASSERT_PRE_ITER_HAS_STATE_TO_SEEK(iterator);
BT_ASSERT_PRE(
bt_component_borrow_graph(iterator->upstream_component)->config_state !=
const struct bt_message_iterator *iterator =
(const void *) self_msg_iter;
- BT_ASSERT_PRE_NON_NULL(iterator, "Message iterator");
+ BT_ASSERT_PRE_MSG_ITER_NON_NULL(iterator);
return (bt_bool) bt_graph_is_interrupted(iterator->graph);
}