enum class MsgType
{
/* Send stream beginning and stream end messages. */
- STREAM,
+ Stream,
/* Send a message iterator inactivity message. */
- MSG_ITER_INACTIVITY,
+ MsgIterInactivity,
};
__attribute__((used)) const char *format_as(MsgType msgType) noexcept
{
switch (msgType) {
- case MsgType::STREAM:
+ case MsgType::Stream:
return "stream beginning/end";
- case MsgType::MSG_ITER_INACTIVITY:
+ case MsgType::MsgIterInactivity:
return "message iterator inactivity";
}
const auto clockCls = _mData->createClockClass(_mSelf.component());
switch (_mData->msgType) {
- case MsgType::STREAM:
+ case MsgType::Stream:
{
const auto traceCls = _mSelf.component().createTraceClass();
const auto streamCls = traceCls->createStreamClass();
break;
}
- case MsgType::MSG_ITER_INACTIVITY:
+ case MsgType::MsgIterInactivity:
msgs.append(
this->_createMessageIteratorInactivityMessage(*clockCls, *_mData->clockSnapshot));
break;
void ErrorTestCase::run() const noexcept
{
static constexpr std::array<MsgType, 2> msgTypes {
- MsgType::STREAM,
- MsgType::MSG_ITER_INACTIVITY,
+ MsgType::Stream,
+ MsgType::MsgIterInactivity,
};
for (const auto msgType1 : msgTypes) {
* It's not possible to create message iterator inactivity
* messages without a clock class. Skip those cases.
*/
- if ((msgType1 == MsgType::MSG_ITER_INACTIVITY && _mCreateClockClass1 == noClockClass) ||
- (msgType2 == MsgType::MSG_ITER_INACTIVITY && _mCreateClockClass2 == noClockClass)) {
+ if ((msgType1 == MsgType::MsgIterInactivity && _mCreateClockClass1 == noClockClass) ||
+ (msgType2 == MsgType::MsgIterInactivity && _mCreateClockClass2 == noClockClass)) {
continue;
}
*
* Skip those cases.
*/
- if (msgType1 == MsgType::MSG_ITER_INACTIVITY && _mCreateClockClass2 == noClockClass) {
+ if (msgType1 == MsgType::MsgIterInactivity && _mCreateClockClass2 == noClockClass) {
continue;
}
const auto srcComp1 =
graph->addComponent(*srcCompCls, "source-1",
TestSourceData {_mCreateClockClass1, msgType1,
- msgType1 == MsgType::MSG_ITER_INACTIVITY ?
+ msgType1 == MsgType::MsgIterInactivity ?
bt2s::optional<std::uint64_t> {10} :
bt2s::nullopt});
const auto srcComp2 =