X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Futils%2Fmuxer%2Fmsg-iter.hpp;h=73620b5e16f3e2df9204f89a3239878667bbd77f;hb=df8863ad5159ab802e0f6b06df0428e61176ec8f;hp=993ed4a43f914467da59fd3927ccef4b0e3042af;hpb=fca1d0f55bf24741f07d2a86d70ad7274d3ec851;p=babeltrace.git diff --git a/src/plugins/utils/muxer/msg-iter.hpp b/src/plugins/utils/muxer/msg-iter.hpp index 993ed4a4..73620b5e 100644 --- a/src/plugins/utils/muxer/msg-iter.hpp +++ b/src/plugins/utils/muxer/msg-iter.hpp @@ -10,12 +10,11 @@ #include -#include "cpp-common/bt2/optional-borrowed-object.hpp" -#include "cpp-common/bt2/plugin-dev.hpp" +#include "cpp-common/bt2/component-class-dev.hpp" +#include "cpp-common/bt2/self-message-iterator-configuration.hpp" #include "cpp-common/bt2c/prio-heap.hpp" -#include "cpp-common/bt2c/uuid.hpp" -#include "cpp-common/bt2s/optional.hpp" +#include "clock-correlation-validator/clock-correlation-validator.hpp" #include "upstream-msg-iter.hpp" namespace bt2mux { @@ -27,16 +26,6 @@ class MsgIter final : public bt2::UserMessageIterator friend bt2::UserMessageIterator; private: - /* Clock class nature expectation */ - enum class _ClkClsExpectation - { - ANY, - NONE, - ORIG_IS_UNIX_EPOCH, - ORIG_ISNT_UNIX_EPOCH_AND_SPEC_UUID, - ORIG_ISNT_UNIX_EPOCH_AND_NO_UUID, - }; - /* Comparator for `_mHeap` with its own logger */ class _HeapComparator final { @@ -76,19 +65,6 @@ private: */ void _validateMsgClkCls(bt2::ConstMessage msg); - /* - * Sets the clock class expectation (`_mClkClsExpectation` and - * `_mExpectedClkClsUuid`) according to `clkCls`. - */ - void _setClkClsExpectation(bt2::OptionalBorrowedObject clkCls) noexcept; - - /* - * Checks that `clkCls` meets the current clock class expectation, - * throwing if it doesn't. - */ - void _makeSureClkClsIsExpected(bt2::ConstMessage msg, - bt2::OptionalBorrowedObject clkCls) const; - /* * Container of all the upstream message iterators. * @@ -114,17 +90,8 @@ private: */ std::vector _mUpstreamMsgItersToReload; - /* - * Which kind of clock class to expect from any incoming message. - * - * The very first received message determines this for all the - * following. - * - * For `ORIG_ISNT_UNIX_EPOCH_AND_SPEC_UUID`, `*_mExpectedClkClsUuid` - * is the expected specific UUID. - */ - _ClkClsExpectation _mClkClsExpectation = _ClkClsExpectation::ANY; - bt2s::optional _mExpectedClkClsUuid; + /* Clock class correlation validator */ + bt2ccv::ClockCorrelationValidator _mClkCorrValidator; }; } /* namespace bt2mux */