From: Francis Deslauriers Date: Mon, 30 May 2022 20:00:28 +0000 (-0400) Subject: cpp-common: message.hpp: add `asDiscardedPackets()` function X-Git-Url: https://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=bd7dbf87c742c1c4016f487d490f913c7dd09834 cpp-common: message.hpp: add `asDiscardedPackets()` function Signed-off-by: Francis Deslauriers Change-Id: I909290879d90806124119b00d91f5ad17d176abc Reviewed-on: https://review.lttng.org/c/babeltrace/+/8189 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/10832 CI-Build: Philippe Proulx Tested-by: jenkins --- diff --git a/src/cpp-common/bt2/message.hpp b/src/cpp-common/bt2/message.hpp index 35dd2c5b..da006a5f 100644 --- a/src/cpp-common/bt2/message.hpp +++ b/src/cpp-common/bt2/message.hpp @@ -1142,6 +1142,13 @@ CommonDiscardedEventsMessage CommonMessage::asDiscardedEvents( return CommonDiscardedEventsMessage {this->libObjPtr()}; } +template +CommonDiscardedPacketsMessage CommonMessage::asDiscardedPackets() const noexcept +{ + BT_ASSERT_DBG(this->isDiscardedPackets()); + return CommonDiscardedPacketsMessage {this->libObjPtr()}; +} + template CommonMessageIteratorInactivityMessage CommonMessage::asMessageIteratorInactivity() const noexcept