X-Git-Url: https://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fplugins%2Futils%2Fmuxer%2Fmsg-iter.hpp;fp=src%2Fplugins%2Futils%2Fmuxer%2Fmsg-iter.hpp;h=73620b5e16f3e2df9204f89a3239878667bbd77f;hp=d8c33c3787bb1b6a38b210098498c053f25c2db6;hb=df8863ad5159ab802e0f6b06df0428e61176ec8f;hpb=ea48e980dd93f0f9467aeb39d69b61e154d59070 diff --git a/src/plugins/utils/muxer/msg-iter.hpp b/src/plugins/utils/muxer/msg-iter.hpp index d8c33c37..73620b5e 100644 --- a/src/plugins/utils/muxer/msg-iter.hpp +++ b/src/plugins/utils/muxer/msg-iter.hpp @@ -11,12 +11,10 @@ #include #include "cpp-common/bt2/component-class-dev.hpp" -#include "cpp-common/bt2/optional-borrowed-object.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 { @@ -28,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 { @@ -77,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. * @@ -115,21 +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. - * - * For `ORIG_ISNT_UNIX_EPOCH_AND_NO_UUID`, `_mExpectedClkCls` is the - * expected clock class. - */ - _ClkClsExpectation _mClkClsExpectation = _ClkClsExpectation::ANY; - bt2s::optional _mExpectedClkClsUuid; - bt2::ConstClockClass::Shared _mExpectedClkCls; + /* Clock class correlation validator */ + bt2ccv::ClockCorrelationValidator _mClkCorrValidator; }; } /* namespace bt2mux */