Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
@@ -217,7 +217,7 @@ CoPrtCnvRadioTelegram::CoPrtCnvRadioTelegram(const std::shared_ptr<CoPrtCnvRadio
|
||||
const uint8_t nbrOfFragmentedTelegrams = uint8_t((payloadSize - 1) / MAX_TELEGRAM_SIZE);
|
||||
if (nbrOfFragmentedTelegrams > (MAX_NBR_OF_FRAGMENTS - 1))
|
||||
{
|
||||
ERROR_LOG() << "Radio-telegram is too big (" << nbrOfFragmentedTelegrams + 1
|
||||
ERROR_LOG(m_logger) << "Radio-telegram is too big (" << nbrOfFragmentedTelegrams + 1
|
||||
<< " fragments). There are max " << MAX_NBR_OF_FRAGMENTS
|
||||
<< " fragments of size=" << MAX_RADIO_TELEGRAM_PAYLOAD_LENGTH
|
||||
<< " (=" << MAX_NBR_OF_FRAGMENTS *MAX_RADIO_TELEGRAM_PAYLOAD_LENGTH
|
||||
@@ -227,7 +227,7 @@ CoPrtCnvRadioTelegram::CoPrtCnvRadioTelegram(const std::shared_ptr<CoPrtCnvRadio
|
||||
}
|
||||
if (nbrOfFragmentedTelegrams == 0)
|
||||
{
|
||||
ERROR_LOG() << "Radio-telegram is too small for fragmentation. It must have at least a size of "
|
||||
ERROR_LOG(m_logger) << "Radio-telegram is too small for fragmentation. It must have at least a size of "
|
||||
<< (MAX_RADIO_TELEGRAM_PAYLOAD_LENGTH + 1);
|
||||
a_error = true;
|
||||
return;
|
||||
@@ -271,7 +271,7 @@ CoPrtCnvRadioTelegram::CoPrtCnvRadioTelegram(const std::shared_ptr<CoPrtCnvRadio
|
||||
else
|
||||
{
|
||||
|
||||
ERROR_LOG() << "Internal error: size must be bigger than 1";
|
||||
ERROR_LOG(m_logger) << "Internal error: size must be bigger than 1";
|
||||
a_error = true;
|
||||
return;
|
||||
}
|
||||
@@ -283,7 +283,7 @@ CoPrtCnvRadioTelegram::CoPrtCnvRadioTelegram(const std::shared_ptr<CoPrtCnvRadio
|
||||
CoPrtCnvRadioTelegram::~CoPrtCnvRadioTelegram()
|
||||
{
|
||||
if (m_BroadcastOnlyTelegram != nullptr)
|
||||
ERROR_LOG() << "Internal error: m_BroadcastOnlyTelegram was not nullptr while deletion of radio-telegram";
|
||||
ERROR_LOG(m_logger) << "Internal error: m_BroadcastOnlyTelegram was not nullptr while deletion of radio-telegram";
|
||||
}
|
||||
|
||||
|
||||
@@ -403,7 +403,7 @@ uint32_t CoPrtCnvRadioTelegram::getPayloadDataUInt32(size_t a_offset, uint16_t a
|
||||
break;
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
ERROR_LOG() << "a_size must be between 1..4";
|
||||
ERROR_LOG(m_logger) << "a_size must be between 1..4";
|
||||
}
|
||||
|
||||
return value;
|
||||
@@ -531,7 +531,7 @@ bool CoPrtCnvRadioTelegram::isCrcOk() const
|
||||
|
||||
if (sum != checksum)
|
||||
{
|
||||
ERROR_LOG() << "Checksum of telegram is wrong: " << QString::number(checksum, 16)
|
||||
ERROR_LOG(m_logger) << "Checksum of telegram is wrong: " << QString::number(checksum, 16)
|
||||
<< " (expected: " << QString::number(sum, 16) << "), issi: " << getUInt32(5);
|
||||
return true;
|
||||
}
|
||||
@@ -778,7 +778,7 @@ uint8_t CoPrtCnvRadioTelegram::getPriority() const
|
||||
case GEF_WF_SAMMELDEAKTIVIERUNG_FUNKTIONSRAUM:
|
||||
return 99;
|
||||
default:
|
||||
ERROR_LOG() << "Priority of telegram with telId=" << getTelID() << " not defined.";
|
||||
ERROR_LOG(m_logger) << "Priority of telegram with telId=" << getTelID() << " not defined.";
|
||||
|
||||
#ifdef DEBUG
|
||||
abort();
|
||||
@@ -1269,7 +1269,7 @@ bool CoPrtCnvRadioTelegram::isContentValid()
|
||||
{
|
||||
if (wirkfeldkennung > 0 && wirkfeldkennung <= 32767)
|
||||
return true;
|
||||
ERROR_LOG() << "Wirkfeldkennung (" << wirkfeldkennung << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..32768.";
|
||||
ERROR_LOG(m_logger) << "Wirkfeldkennung (" << wirkfeldkennung << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..32768.";
|
||||
return false;
|
||||
}
|
||||
if (GEF_WIRKFELD_AENDERUNG_BEZEICHNER == getTelID() && wirkfeldkennung > 0)
|
||||
@@ -1277,7 +1277,7 @@ bool CoPrtCnvRadioTelegram::isContentValid()
|
||||
|
||||
|
||||
|
||||
ERROR_LOG() << "Wirkfeldtyp (" << wirkfeldtyp << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..5 or 8.";
|
||||
ERROR_LOG(m_logger) << "Wirkfeldtyp (" << wirkfeldtyp << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..5 or 8.";
|
||||
return false;
|
||||
|
||||
case GEF_DEAKTIVIERUNG_EINZELMINE:
|
||||
@@ -1287,7 +1287,7 @@ bool CoPrtCnvRadioTelegram::isContentValid()
|
||||
{
|
||||
if (wirkfeldkennung > 32767)
|
||||
{
|
||||
ERROR_LOG() << "DeaktivierungEinzelmine: wirkfeldkennung=" << wirkfeldkennung << " too big. Must be 1..32767";
|
||||
ERROR_LOG(m_logger) << "DeaktivierungEinzelmine: wirkfeldkennung=" << wirkfeldkennung << " too big. Must be 1..32767";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1303,7 +1303,7 @@ bool CoPrtCnvRadioTelegram::isContentValid()
|
||||
if (funktionsraumkennung > 0)
|
||||
return true;
|
||||
|
||||
ERROR_LOG() << "Funktionsraumkennung (" << funktionsraumkennung << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..65535.";
|
||||
ERROR_LOG(m_logger) << "Funktionsraumkennung (" << funktionsraumkennung << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..65535.";
|
||||
return false;
|
||||
}
|
||||
case GEF_EINTRETEN_FUNKTIONSRAUM:
|
||||
@@ -1313,7 +1313,7 @@ bool CoPrtCnvRadioTelegram::isContentValid()
|
||||
if (funktionsraumkennung > 0)
|
||||
return true;
|
||||
|
||||
ERROR_LOG() << "Funktionsraumkennung (" << funktionsraumkennung << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..65535.";
|
||||
ERROR_LOG(m_logger) << "Funktionsraumkennung (" << funktionsraumkennung << ") of telegram with telId=" << getTelID() << " is invalid. Must be 1..65535.";
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
@@ -1324,7 +1324,7 @@ bool CoPrtCnvRadioTelegram::isContentValid()
|
||||
if (sprache <= 3)
|
||||
return true;
|
||||
|
||||
ERROR_LOG() << "Sprache (" << sprache << ") of telegram with telId=" << getTelID() << " is invalid. Must be 0..3.";
|
||||
ERROR_LOG(m_logger) << "Sprache (" << sprache << ") of telegram with telId=" << getTelID() << " is invalid. Must be 0..3.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1375,7 +1375,7 @@ bool CoPrtCnvRadioTelegram::isContentValid()
|
||||
if (length >= MIN_LENGTH)
|
||||
return true;
|
||||
|
||||
ERROR_LOG() << "The payload-length of telegram with telId=" << getTelID() << " must be at least " << MIN_LENGTH << ", but it is only " << length;
|
||||
ERROR_LOG(m_logger) << "The payload-length of telegram with telId=" << getTelID() << " must be at least " << MIN_LENGTH << ", but it is only " << length;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1472,7 +1472,7 @@ bool CoPrtCnvRadioTelegram::isPayloadLengthOk(uint16_t a_minLength,
|
||||
uint16_t expectedLength = dataSize + a_minLength;
|
||||
if (expectedLength != length)
|
||||
{
|
||||
WARNING_LOG() << "The payload-length of telegram with telId: "
|
||||
WARNING_LOG(m_logger) << "The payload-length of telegram with telId: "
|
||||
<< getTelID() << " must be " << expectedLength
|
||||
<< ", but it is " << length << " (the amount of variable data in telegram was "
|
||||
<< dataAmount << " => " << dataSize << " bytes)";
|
||||
@@ -1481,7 +1481,7 @@ bool CoPrtCnvRadioTelegram::isPayloadLengthOk(uint16_t a_minLength,
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG() << "The payload-length of telegram with telId: " << getTelID()
|
||||
WARNING_LOG(m_logger) << "The payload-length of telegram with telId: " << getTelID()
|
||||
<< " must be at least " << a_minLength << ", but it is only " << length;
|
||||
return false;
|
||||
}
|
||||
@@ -1497,7 +1497,7 @@ bool CoPrtCnvRadioTelegram::isPayloadLengthOk(uint16_t a_minLength,
|
||||
const uint16_t length = getPayloadSize();
|
||||
if (length < a_minLength)
|
||||
{
|
||||
WARNING_LOG() << "The payload-length of telegram with telId: "
|
||||
WARNING_LOG(m_logger) << "The payload-length of telegram with telId: "
|
||||
<< getTelID() << " must be greater or equal to "
|
||||
<< a_minLength << ", but it is " << length;
|
||||
return false;
|
||||
@@ -1505,7 +1505,7 @@ bool CoPrtCnvRadioTelegram::isPayloadLengthOk(uint16_t a_minLength,
|
||||
|
||||
if (length > a_maxLength)
|
||||
{
|
||||
WARNING_LOG() << "The payload-length of telegram with telId: "
|
||||
WARNING_LOG(m_logger) << "The payload-length of telegram with telId: "
|
||||
<< getTelID() << " must be fewer than "
|
||||
<< a_minLength << ", but it is " << length;
|
||||
return false;
|
||||
@@ -1519,7 +1519,7 @@ bool CoPrtCnvRadioTelegram::isPayloadLengthOk(uint16_t a_length) const
|
||||
if (length == a_length)
|
||||
return true;
|
||||
|
||||
WARNING_LOG() << "The payload-length of telegram with telId: "
|
||||
WARNING_LOG(m_logger) << "The payload-length of telegram with telId: "
|
||||
<< getTelID() << " must be "
|
||||
<< a_length << ", but it is " << length;
|
||||
return false;
|
||||
@@ -1531,7 +1531,7 @@ bool CoPrtCnvRadioTelegram::isPayloadLengthOk(const std::vector<uint16_t> &a_len
|
||||
if (std::any_of(a_lengths.begin(), a_lengths.end(), [length](int len) { return len == length;}))
|
||||
return true;
|
||||
|
||||
WARNING_LOG() << "The payload-length of telegram with telId: "
|
||||
WARNING_LOG(m_logger) << "The payload-length of telegram with telId: "
|
||||
<< getTelID() << ", is: " << length;
|
||||
return false;
|
||||
}
|
||||
@@ -1555,7 +1555,7 @@ bool CoPrtCnvRadioTelegram::mustBeSentAsBroadcast(time_t a_currentTime, bool &a_
|
||||
if (s_2ndDelay >= 0)
|
||||
{
|
||||
m_NextSendTime = time(nullptr) + s_2ndDelay;
|
||||
INFO_LOG() << "1st Broadcast-Telegram telId=" << getTelID() << " BC=" << getBroadcastIndex();
|
||||
INFO_LOG(m_logger) << "1st Broadcast-Telegram telId=" << getTelID() << " BC=" << getBroadcastIndex();
|
||||
break;
|
||||
}
|
||||
++m_BroadcastCounter;
|
||||
@@ -1564,13 +1564,13 @@ bool CoPrtCnvRadioTelegram::mustBeSentAsBroadcast(time_t a_currentTime, bool &a_
|
||||
if (s_3rdDelay >= 0)
|
||||
{
|
||||
m_NextSendTime = time(nullptr) + s_3rdDelay;
|
||||
INFO_LOG() << "2nd Broadcast-Telegram telId=" << getTelID() << " BC=" << getBroadcastIndex();
|
||||
INFO_LOG(m_logger) << "2nd Broadcast-Telegram telId=" << getTelID() << " BC=" << getBroadcastIndex();
|
||||
break;
|
||||
}
|
||||
++m_BroadcastCounter;
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
INFO_LOG() << "3rd Broadcast-Telegram telId=" << getTelID() << " BC=" << getBroadcastIndex();
|
||||
INFO_LOG(m_logger) << "3rd Broadcast-Telegram telId=" << getTelID() << " BC=" << getBroadcastIndex();
|
||||
m_NextSendTime = 0;
|
||||
a_wasLastBroadcast = true;
|
||||
}
|
||||
@@ -1636,10 +1636,10 @@ bool CoPrtCnvRadioTelegram::isBroadcastOnly() const
|
||||
void CoPrtCnvRadioTelegram::setBroadcastonlyTelegram(const std::shared_ptr<N_CoPrtCnv::CoPrtCnvRadioTelegram> &a_radioTelegram)
|
||||
{
|
||||
if (a_radioTelegram != nullptr && m_BroadcastOnlyTelegram != nullptr)
|
||||
ERROR_LOG() << "Internal error: m_BroadcastOnlyTelegram was not nullptr";
|
||||
ERROR_LOG(m_logger) << "Internal error: m_BroadcastOnlyTelegram was not nullptr";
|
||||
if (a_radioTelegram != nullptr)
|
||||
{
|
||||
INFO_LOG() << "Set braodcastonly-telegram: telId=" << a_radioTelegram->getTelID()
|
||||
INFO_LOG(m_logger) << "Set braodcastonly-telegram: telId=" << a_radioTelegram->getTelID()
|
||||
<< " BC=" << a_radioTelegram->getBroadcastIndex();
|
||||
}
|
||||
m_BroadcastOnlyTelegram = a_radioTelegram;
|
||||
|
||||
Reference in new issue
Block a user