Skip to content

Commit

Permalink
Release v5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed May 28, 2024
2 parents a497307 + f71e41d commit d410045
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions lib/include/cc_tools_qt/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#define CC_TOOLS_QT_MAJOR_VERSION 5U

/// @brief Minor verion of the library
#define CC_TOOLS_QT_MINOR_VERSION 2U
#define CC_TOOLS_QT_MINOR_VERSION 3U

/// @brief Patch level of the library
#define CC_TOOLS_QT_PATCH_VERSION 1U
#define CC_TOOLS_QT_PATCH_VERSION 0U

/// @brief Macro to create numeric version as single unsigned number
#define CC_TOOLS_QT_MAKE_VERSION(major_, minor_, patch_) \
Expand Down
12 changes: 6 additions & 6 deletions lib/src/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ QList<DataInfoPtr> Filter::recvData(DataInfoPtr dataPtr)
{
unsigned long long milliseconds = 0U;

if (0U < m_debugLevel) {
if (1U <= m_debugLevel) {
auto timestamp = dataPtr->m_timestamp;
if (timestamp == DataInfo::Timestamp()) {
timestamp = DataInfo::TimestampClock::now();
Expand All @@ -70,18 +70,18 @@ QList<DataInfoPtr> Filter::recvData(DataInfoPtr dataPtr)
auto sinceEpoch = timestamp.time_since_epoch();
milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(sinceEpoch).count();
std::cout << '[' << milliseconds << "] (" << debugNameImpl() << ") <-- " << dataPtr->m_data.size() << " bytes";
if (1U < m_debugLevel) {
if (2U <= m_debugLevel) {
std::cout << " | " << dataToStr(dataPtr->m_data);
}
std::cout << std::endl;
}

auto result = recvDataImpl(std::move(dataPtr));
if (0U < m_debugLevel) {
if (1U <= m_debugLevel) {
for (auto& resultDataPtr : result) {
std::cout << '[' << milliseconds << "] " << resultDataPtr->m_data.size() << " bytes <-- (" << debugNameImpl() << ")";
if (1U < m_debugLevel) {
std::cout << " | " << dataToStr(dataPtr->m_data);
if (2U <= m_debugLevel) {
std::cout << " | " << dataToStr(resultDataPtr->m_data);
}
std::cout << std::endl;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ QList<DataInfoPtr> Filter::sendData(DataInfoPtr dataPtr)
for (auto& resultDataPtr : result) {
std::cout << '[' << milliseconds << "] (" << debugNameImpl() << ") --> " << resultDataPtr->m_data.size() << " bytes";
if (1U < m_debugLevel) {
std::cout << " | " << dataToStr(dataPtr->m_data);
std::cout << " | " << dataToStr(resultDataPtr->m_data);
}
std::cout << std::endl;
}
Expand Down
16 changes: 8 additions & 8 deletions lib/src/Protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Protocol::MessagesList Protocol::read(
{
unsigned long long milliseconds = 0U;

if (0U < m_debugLevel) {
if (1U <= m_debugLevel) {
auto timestamp = dataInfo.m_timestamp;
if (timestamp == DataInfo::Timestamp()) {
timestamp = DataInfo::TimestampClock::now();
Expand All @@ -77,16 +77,16 @@ Protocol::MessagesList Protocol::read(
auto sinceEpoch = timestamp.time_since_epoch();
milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(sinceEpoch).count();
std::cout << '[' << milliseconds << "] " << debugPrefix() << " <-- " << dataInfo.m_data.size() << " bytes";
if (1U < m_debugLevel) {
if (2U <= m_debugLevel) {
std::cout << " | " << dataToStr(dataInfo.m_data);
}
std::cout << std::endl;
}

auto messages = readImpl(dataInfo, final);
if (0U < m_debugLevel) {
if (1U <= m_debugLevel) {
for (auto& msgPtr : messages) {
std::cout << '[' << milliseconds << "] " << debugPrefix() << " <-- " << msgPtr->name() << std::endl;
std::cout << '[' << milliseconds << "] " << msgPtr->name() << " <-- " << debugPrefix() << std::endl;
}
}

Expand All @@ -96,14 +96,14 @@ Protocol::MessagesList Protocol::read(
DataInfoPtr Protocol::write(Message& msg)
{
unsigned long long milliseconds = property::message::Timestamp().getFrom(msg);;
if (0U < m_debugLevel) {
if (1U <= m_debugLevel) {
if (milliseconds == 0) {
auto timestamp = DataInfo::TimestampClock::now();
auto sinceEpoch = timestamp.time_since_epoch();
milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(sinceEpoch).count();
}

std::cout << '[' << milliseconds << "] " << debugPrefix() << " --> " << msg.name() << std::endl;
std::cout << '[' << milliseconds << "] " << msg.name() << " --> " << debugPrefix() << std::endl;
}

if (msg.idAsString().isEmpty()) {
Expand All @@ -123,9 +123,9 @@ DataInfoPtr Protocol::write(Message& msg)
}

auto dataPtr = writeImpl(msg);
if (0U < m_debugLevel) {
if (1U <= m_debugLevel) {
std::cout << '[' << milliseconds << "] " << debugPrefix() << " --> " << dataPtr->m_data.size() << " bytes";
if (1U < m_debugLevel) {
if (2U <= m_debugLevel) {
std::cout << " | " << dataToStr(dataPtr->m_data);
}
std::cout << std::endl;
Expand Down
8 changes: 4 additions & 4 deletions lib/src/Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ void Socket::sendData(DataInfoPtr dataPtr)
dataPtr->m_timestamp = DataInfo::TimestampClock::now();
}

if (0U < m_debugLevel) {
if (1U < m_debugLevel) {
auto sinceEpoch = dataPtr->m_timestamp.time_since_epoch();
auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(sinceEpoch).count();
std::cout << '[' << milliseconds << "] " << debugPrefix() << " --> " << dataPtr->m_data.size() << " bytes";
if (1U < m_debugLevel) {
if (2U < m_debugLevel) {
std::cout << " | " << dataToStr(dataPtr->m_data);
}
std::cout << std::endl;
Expand Down Expand Up @@ -172,11 +172,11 @@ void Socket::reportDataReceived(DataInfoPtr dataPtr)
dataPtr->m_timestamp = DataInfo::TimestampClock::now();
}

if (0U < m_debugLevel) {
if (1U <= m_debugLevel) {
auto sinceEpoch = dataPtr->m_timestamp.time_since_epoch();
auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(sinceEpoch).count();
std::cout << '[' << milliseconds << "] " << debugPrefix() << " <-- " << dataPtr->m_data.size() << " bytes";
if (1U < m_debugLevel) {
if (2U <= m_debugLevel) {
std::cout << " | " << dataToStr(dataPtr->m_data);
}
std::cout << std::endl;
Expand Down

0 comments on commit d410045

Please sign in to comment.