#include <stdbool.h>
-#include "lib/assert-pre.h"
+#include "lib/assert-cond.h"
#include "lib/object.h"
#include "compat/compiler.h"
#include <babeltrace2/trace-ir/clock-class.h>
uint64_t end_raw_value)
{
BT_ASSERT_PRE_DEV_NO_ERROR();
+ BT_ASSERT_PRE_BEGIN_LE_END(message_iterator, beginning_raw_value, end_raw_value);
return create_discarded_items_message(message_iterator,
BT_MESSAGE_TYPE_DISCARDED_EVENTS, (void *) stream,
{
BT_ASSERT_PRE_NON_NULL(message, "Message");
BT_ASSERT_PRE_MSG_IS_TYPE(message, BT_MESSAGE_TYPE_DISCARDED_EVENTS);
+ BT_ASSERT_PRE(count > 0, "Discarded event count is 0.");
set_discarded_items_message_count(message, count);
}
uint64_t end_raw_value)
{
BT_ASSERT_PRE_DEV_NO_ERROR();
+ BT_ASSERT_PRE_BEGIN_LE_END(message_iterator, beginning_raw_value, end_raw_value);
return create_discarded_items_message(message_iterator,
BT_MESSAGE_TYPE_DISCARDED_PACKETS, (void *) stream,
{
BT_ASSERT_PRE_NON_NULL(message, "Message");
BT_ASSERT_PRE_MSG_IS_TYPE(message, BT_MESSAGE_TYPE_DISCARDED_PACKETS);
+ BT_ASSERT_PRE(count > 0, "Discarded packet count is 0.");
set_discarded_items_message_count(message, count);
}