bt_bool no_timestamp;
} params;
+ bt_self_component_source *self_comp;
bt_trace_class *trace_class;
bt_stream_class *stream_class;
bt_event_class *event_class;
};
static
-bt_field_class *create_event_payload_fc(void)
+bt_field_class *create_event_payload_fc(bt_trace_class *trace_class)
{
bt_field_class *root_fc = NULL;
bt_field_class *fc = NULL;
int ret;
- root_fc = bt_field_class_structure_create();
+ root_fc = bt_field_class_structure_create(trace_class);
if (!root_fc) {
BT_LOGE_STR("Cannot create an empty structure field class object.");
goto error;
}
- fc = bt_field_class_string_create();
+ fc = bt_field_class_string_create(trace_class);
if (!fc) {
BT_LOGE_STR("Cannot create a string field class object.");
goto error;
bt_field_class *fc = NULL;
int ret = 0;
- dmesg_comp->trace_class = bt_trace_class_create();
+ dmesg_comp->trace_class = bt_trace_class_create(
+ bt_self_component_source_as_self_component(
+ dmesg_comp->self_comp));
if (!dmesg_comp->trace_class) {
BT_LOGE_STR("Cannot create an empty trace class object.");
goto error;
}
if (has_ts) {
- dmesg_comp->clock_class = bt_clock_class_create();
+ dmesg_comp->clock_class = bt_clock_class_create(
+ dmesg_comp->trace_class);
if (!dmesg_comp->clock_class) {
BT_LOGE_STR("Cannot create clock class.");
goto error;
goto error;
}
- fc = create_event_payload_fc();
+ fc = create_event_payload_fc(dmesg_comp->trace_class);
if (!fc) {
BT_LOGE_STR("Cannot create event payload field class.");
goto error;
}
static
-enum bt_self_component_status create_port(
+bt_self_component_status create_port(
bt_self_component_source *self_comp)
{
return bt_self_component_source_add_output_port(self_comp,
}
BT_HIDDEN
-enum bt_self_component_status dmesg_init(
+bt_self_component_status dmesg_init(
bt_self_component_source *self_comp,
bt_value *params, void *init_method_data)
{
int ret = 0;
struct dmesg_component *dmesg_comp = g_new0(struct dmesg_component, 1);
- enum bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
+ bt_self_component_status status = BT_SELF_COMPONENT_STATUS_OK;
if (!dmesg_comp) {
BT_LOGE_STR("Failed to allocate one dmesg component structure.");
goto error;
}
+ dmesg_comp->self_comp = self_comp;
dmesg_comp->params.path = g_string_new(NULL);
if (!dmesg_comp->params.path) {
BT_LOGE_STR("Failed to allocate a GString.");
}
BT_HIDDEN
-enum bt_self_message_iterator_status dmesg_msg_iter_init(
+bt_self_message_iterator_status dmesg_msg_iter_init(
bt_self_message_iterator *self_msg_iter,
bt_self_component_source *self_comp,
bt_self_component_port_output *self_port)
struct dmesg_component *dmesg_comp;
struct dmesg_msg_iter *dmesg_msg_iter =
g_new0(struct dmesg_msg_iter, 1);
- enum bt_self_message_iterator_status status =
+ bt_self_message_iterator_status status =
BT_SELF_MESSAGE_ITERATOR_STATUS_OK;
if (!dmesg_msg_iter) {
}
static
-enum bt_self_message_iterator_status dmesg_msg_iter_next_one(
+bt_self_message_iterator_status dmesg_msg_iter_next_one(
struct dmesg_msg_iter *dmesg_msg_iter,
bt_message **msg)
{
ssize_t len;
struct dmesg_component *dmesg_comp;
- enum bt_self_message_iterator_status status =
+ bt_self_message_iterator_status status =
BT_SELF_MESSAGE_ITERATOR_STATUS_OK;
BT_ASSERT(dmesg_msg_iter);
}
BT_HIDDEN
-enum bt_self_message_iterator_status dmesg_msg_iter_next(
+bt_self_message_iterator_status dmesg_msg_iter_next(
bt_self_message_iterator *self_msg_iter,
bt_message_array_const msgs, uint64_t capacity,
uint64_t *count)
struct dmesg_msg_iter *dmesg_msg_iter =
bt_self_message_iterator_get_data(
self_msg_iter);
- enum bt_self_message_iterator_status status =
+ bt_self_message_iterator_status status =
BT_SELF_MESSAGE_ITERATOR_STATUS_OK;
uint64_t i = 0;