bt_message_discarded_events_borrow_default_end_clock_snapshot_const(
const bt_message *msg, const bt_clock_snapshot **snapshot);
+extern const bt_clock_class *
+bt_message_discarded_events_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg);
+
extern const bt_stream *
bt_message_discarded_events_borrow_stream_const(const bt_message *message);
bt_message_discarded_packets_borrow_default_end_clock_snapshot_const(
const bt_message *msg, const bt_clock_snapshot **snapshot);
+extern const bt_clock_class *
+bt_message_discarded_packets_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg);
+
extern const bt_stream *
bt_message_discarded_packets_borrow_stream_const(const bt_message *message);
* SOFTWARE.
*/
-/* For bt_message, bt_event */
+/* For bt_bool, bt_message, bt_event. bt_clock_class, bt_clock_snapshot */
#include <babeltrace/types.h>
/* For bt_clock_snapshot_state */
bt_message_event_borrow_default_clock_snapshot_const(
const bt_message *msg, const bt_clock_snapshot **snapshot);
+extern const bt_clock_class *
+bt_message_event_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg);
+
#ifdef __cplusplus
}
#endif
* SOFTWARE.
*/
-/* For bt_message, bt_packet */
+/* For bt_message, bt_packet, bt_clock_snapshot, bt_clock_class */
#include <babeltrace/types.h>
/* For bt_clock_snapshot_state */
bt_message_packet_beginning_borrow_default_clock_snapshot_const(
const bt_message *msg, const bt_clock_snapshot **snapshot);
+extern const bt_clock_class *
+bt_message_packet_beginning_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg);
+
#ifdef __cplusplus
}
#endif
* SOFTWARE.
*/
-/* For bt_message, bt_packet */
+/* For bt_message, bt_packet, bt_clock_snapshot, bt_clock_class */
#include <babeltrace/types.h>
/* For bt_clock_snapshot_state */
bt_message_packet_end_borrow_default_clock_snapshot_const(
const bt_message *msg, const bt_clock_snapshot **snapshot);
+extern const bt_clock_class *
+bt_message_packet_end_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg);
+
#ifdef __cplusplus
}
#endif
* SOFTWARE.
*/
-/* For bt_message, bt_clock_snapshot, bt_stream */
+/* For bt_message, bt_clock_snapshot, bt_stream, bt_clock_class */
#include <babeltrace/types.h>
/* For bt_message_stream_activity_clock_snapshot_state */
bt_message_stream_activity_beginning_borrow_default_clock_snapshot_const(
const bt_message *msg, const bt_clock_snapshot **snapshot);
+extern const bt_clock_class *
+bt_message_stream_activity_beginning_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg);
+
extern const bt_stream *
bt_message_stream_activity_beginning_borrow_stream_const(
const bt_message *message);
* SOFTWARE.
*/
-/* For bt_message, bt_clock_snapshot, bt_stream */
+/* For bt_message, bt_clock_snapshot, bt_stream, bt_clock_class */
#include <babeltrace/types.h>
/* For bt_message_stream_activity_clock_snapshot_state */
bt_message_stream_activity_end_borrow_default_clock_snapshot_const(
const bt_message *msg, const bt_clock_snapshot **snapshot);
+extern const bt_clock_class *
+bt_message_stream_activity_end_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg);
+
extern const bt_stream *
bt_message_stream_activity_end_borrow_stream_const(
const bt_message *message);
BT_ASSERT_PRE_MSG_IS_TYPE(message, BT_MESSAGE_TYPE_DISCARDED_PACKETS);
return get_discarded_items_message_count(message, count);
}
+
+static inline
+const struct bt_clock_class *
+borrow_discarded_items_message_stream_class_default_clock_class(
+ const struct bt_message *msg)
+{
+ struct bt_message_discarded_items *disc_items_msg = (void *) msg;
+
+ BT_ASSERT(msg);
+ return disc_items_msg->stream->class->default_clock_class;
+}
+
+const struct bt_clock_class *
+bt_message_discarded_events_borrow_stream_class_default_clock_class_const(
+ const struct bt_message *msg)
+{
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_DISCARDED_EVENTS);
+ return borrow_discarded_items_message_stream_class_default_clock_class(
+ msg);
+}
+
+const struct bt_clock_class *
+bt_message_discarded_packets_borrow_stream_class_default_clock_class_const(
+ const struct bt_message *msg)
+{
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_DISCARDED_PACKETS);
+ return borrow_discarded_items_message_stream_class_default_clock_class(
+ msg);
+}
{
struct bt_stream_class *stream_class;
- stream_class = bt_event_class_borrow_stream_class(event_class);
+ stream_class = bt_event_class_borrow_stream_class_inline(event_class);
BT_ASSERT(stream_class);
return bt_stream_class_borrow_trace_class(stream_class) != NULL;
}
BT_ASSERT_PRE_NON_NULL(msg, "Message");
BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_EVENT);
- BT_ASSERT(msg);
- stream_class = bt_event_class_borrow_stream_class(
+ stream_class = bt_event_class_borrow_stream_class_inline(
event_msg->event->class);
BT_ASSERT(stream_class);
BT_ASSERT_PRE(stream_class->default_clock_class,
*snapshot = event_msg->default_cs;
return BT_CLOCK_SNAPSHOT_STATE_KNOWN;
}
+
+const bt_clock_class *
+bt_message_event_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg)
+{
+ struct bt_message_event *event_msg = (void *) msg;
+ struct bt_stream_class *stream_class;
+
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_EVENT);
+ stream_class = bt_event_class_borrow_stream_class_inline(
+ event_msg->event->class);
+ BT_ASSERT(stream_class);
+ return stream_class->default_clock_class;
+}
return borrow_packet_message_default_clock_snapshot_const(
msg, snapshot);
}
+
+static inline
+const struct bt_clock_class *
+borrow_packet_message_stream_class_default_clock_class(
+ const struct bt_message *msg)
+{
+ struct bt_message_packet *packet_msg = (void *) msg;
+
+ BT_ASSERT(msg);
+ return packet_msg->packet->stream->class->default_clock_class;
+}
+
+const struct bt_clock_class *
+bt_message_packet_beginning_borrow_stream_class_default_clock_class_const(
+ const struct bt_message *msg)
+{
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_BEGINNING);
+ return borrow_packet_message_stream_class_default_clock_class(msg);
+}
+
+const struct bt_clock_class *
+bt_message_packet_end_borrow_stream_class_default_clock_class_const(
+ const struct bt_message *msg)
+{
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_PACKET_END);
+ return borrow_packet_message_stream_class_default_clock_class(msg);
+}
BT_MESSAGE_TYPE_STREAM_ACTIVITY_END);
set_stream_activity_message_default_clock_snapshot_state(msg, state);
}
+
+static inline
+const struct bt_clock_class *
+borrow_stream_activity_message_stream_class_default_clock_class(
+ const struct bt_message *msg)
+{
+ struct bt_message_stream_activity *stream_act_msg = (void *) msg;
+
+ BT_ASSERT(msg);
+ return stream_act_msg->stream->class->default_clock_class;
+}
+
+const struct bt_clock_class *
+bt_message_stream_activity_beginning_borrow_stream_class_default_clock_class_const(
+ const struct bt_message *msg)
+{
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg,
+ BT_MESSAGE_TYPE_STREAM_ACTIVITY_BEGINNING);
+ return borrow_stream_activity_message_stream_class_default_clock_class(
+ msg);
+}
+
+const struct bt_clock_class *
+bt_message_stream_activity_end_borrow_stream_class_default_clock_class_const(
+ const struct bt_message *msg)
+{
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_STREAM_ACTIVITY_END);
+ return borrow_stream_activity_message_stream_class_default_clock_class(
+ msg);
+}