X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Fgraph%2Fmessage%2Fiterator.h;fp=src%2Flib%2Fgraph%2Fmessage%2Fiterator.h;h=36795bd083baa4e7902ada7a788d87604e37a3c7;hb=54b135a0370e1ff40ff39515058b2f941955cd40;hp=a174f3e9c17f99c4fb879c7db4c067c314250f5a;hpb=d79a835343447b4e7f62af721cfb2a05fa9f450a;p=babeltrace.git diff --git a/src/lib/graph/message/iterator.h b/src/lib/graph/message/iterator.h index a174f3e9..36795bd0 100644 --- a/src/lib/graph/message/iterator.h +++ b/src/lib/graph/message/iterator.h @@ -32,6 +32,7 @@ #include #include "common/assert.h" #include +#include struct bt_port; struct bt_graph; @@ -113,6 +114,40 @@ struct bt_self_component_port_input_message_iterator { enum bt_self_component_port_input_message_iterator_state state; + /* + * Timestamp of the last received message (or INT64_MIN in the + * beginning, or after a seek to beginning). + */ + int64_t last_ns_from_origin; + + struct { + enum { + /* We haven't recorded clock properties yet. */ + CLOCK_EXPECTATION_UNSET, + + /* Expect to have no clock. */ + CLOCK_EXPECTATION_NONE, + + /* Clock with origin_is_unix_epoch true.*/ + CLOCK_EXPECTATION_ORIGIN_UNIX, + + /* Clock with origin_is_unix_epoch false, with a UUID.*/ + CLOCK_EXPECTATION_ORIGIN_OTHER_UUID, + + /* Clock with origin_is_unix_epoch false, without a UUID.*/ + CLOCK_EXPECTATION_ORIGIN_OTHER_NO_UUID, + } type; + + /* + * Expected UUID of the clock, if `type`is CLOCK_EXPECTATION_ORIGIN_OTHER_UUID. + * + * If the clock's origin is the unix epoch, the UUID is + * irrelevant (as the clock will be correlatable with other + * clocks having the same origin). + */ + uint8_t uuid[BABELTRACE_UUID_LEN]; + } clock_expectation; + /* * Data necessary for auto seek (the seek-to-beginning then fast-forward * seek strategy).