Abort setup of SunSpec repeating blocks if repeating block data size is unexpected. Improve warning message to clarify this behaviour. Fix indentation in generated code. Regenerate SunSpec model classes.
This commit is contained in:
parent
2b16beb851
commit
2690adeba3
@ -172,12 +172,14 @@ void SunSpecFlowBatteryModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -44,7 +44,7 @@ class SunSpecFlowBatteryModelRepeatingBlock : public SunSpecModelRepeatingBlock
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit SunSpecFlowBatteryModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryModel *parent);
|
||||
explicit SunSpecFlowBatteryModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryModel *parent = nullptr);
|
||||
~SunSpecFlowBatteryModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecFlowBatteryModel *parentModel() const;
|
||||
|
||||
@ -172,12 +172,14 @@ void SunSpecFlowBatteryModuleModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -44,7 +44,7 @@ class SunSpecFlowBatteryModuleModelRepeatingBlock : public SunSpecModelRepeating
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit SunSpecFlowBatteryModuleModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryModuleModel *parent);
|
||||
explicit SunSpecFlowBatteryModuleModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryModuleModel *parent = nullptr);
|
||||
~SunSpecFlowBatteryModuleModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecFlowBatteryModuleModel *parentModel() const;
|
||||
|
||||
@ -172,12 +172,14 @@ void SunSpecFlowBatteryStackModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -44,7 +44,7 @@ class SunSpecFlowBatteryStackModelRepeatingBlock : public SunSpecModelRepeatingB
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit SunSpecFlowBatteryStackModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryStackModel *parent);
|
||||
explicit SunSpecFlowBatteryStackModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryStackModel *parent = nullptr);
|
||||
~SunSpecFlowBatteryStackModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecFlowBatteryStackModel *parentModel() const;
|
||||
|
||||
@ -1129,12 +1129,14 @@ void SunSpecFlowBatteryStringModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -167,7 +167,7 @@ public:
|
||||
Q_DECLARE_FLAGS(Modevt2Flags, Modevt2)
|
||||
Q_FLAG(Modevt2)
|
||||
|
||||
explicit SunSpecFlowBatteryStringModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryStringModel *parent);
|
||||
explicit SunSpecFlowBatteryStringModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFlowBatteryStringModel *parent = nullptr);
|
||||
~SunSpecFlowBatteryStringModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecFlowBatteryStringModel *parentModel() const;
|
||||
|
||||
@ -2079,12 +2079,14 @@ void SunSpecFreqWattModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecFreqWattModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFreqWattModel *parent);
|
||||
explicit SunSpecFreqWattModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecFreqWattModel *parent = nullptr);
|
||||
~SunSpecFreqWattModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecFreqWattModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecHfrtcModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecHfrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHfrtcModel *parent);
|
||||
explicit SunSpecHfrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHfrtcModel *parent = nullptr);
|
||||
~SunSpecHfrtcModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecHfrtcModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecHfrtModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecHfrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHfrtModel *parent);
|
||||
explicit SunSpecHfrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHfrtModel *parent = nullptr);
|
||||
~SunSpecHfrtModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecHfrtModel *parentModel() const;
|
||||
|
||||
@ -1810,12 +1810,14 @@ void SunSpecHfrtxModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecHfrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHfrtxModel *parent);
|
||||
explicit SunSpecHfrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHfrtxModel *parent = nullptr);
|
||||
~SunSpecHfrtxModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecHfrtxModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecHvrtcModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecHvrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHvrtcModel *parent);
|
||||
explicit SunSpecHvrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHvrtcModel *parent = nullptr);
|
||||
~SunSpecHvrtcModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecHvrtcModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecHvrtModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecHvrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHvrtModel *parent);
|
||||
explicit SunSpecHvrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHvrtModel *parent = nullptr);
|
||||
~SunSpecHvrtModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecHvrtModel *parentModel() const;
|
||||
|
||||
@ -1810,12 +1810,14 @@ void SunSpecHvrtxModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecHvrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHvrtxModel *parent);
|
||||
explicit SunSpecHvrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecHvrtxModel *parent = nullptr);
|
||||
~SunSpecHvrtxModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecHvrtxModel *parentModel() const;
|
||||
|
||||
@ -230,12 +230,14 @@ void SunSpecIrradianceModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -44,7 +44,7 @@ class SunSpecIrradianceModelRepeatingBlock : public SunSpecModelRepeatingBlock
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit SunSpecIrradianceModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecIrradianceModel *parent);
|
||||
explicit SunSpecIrradianceModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecIrradianceModel *parent = nullptr);
|
||||
~SunSpecIrradianceModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecIrradianceModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecLfrtcModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecLfrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLfrtcModel *parent);
|
||||
explicit SunSpecLfrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLfrtcModel *parent = nullptr);
|
||||
~SunSpecLfrtcModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLfrtcModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecLfrtModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecLfrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLfrtModel *parent);
|
||||
explicit SunSpecLfrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLfrtModel *parent = nullptr);
|
||||
~SunSpecLfrtModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLfrtModel *parentModel() const;
|
||||
|
||||
@ -1810,12 +1810,14 @@ void SunSpecLfrtxModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecLfrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLfrtxModel *parent);
|
||||
explicit SunSpecLfrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLfrtxModel *parent = nullptr);
|
||||
~SunSpecLfrtxModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLfrtxModel *parentModel() const;
|
||||
|
||||
@ -1164,12 +1164,14 @@ void SunSpecLithiumIonBankModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -156,7 +156,7 @@ public:
|
||||
Q_DECLARE_FLAGS(Strevt1Flags, Strevt1)
|
||||
Q_FLAG(Strevt1)
|
||||
|
||||
explicit SunSpecLithiumIonBankModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLithiumIonBankModel *parent);
|
||||
explicit SunSpecLithiumIonBankModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLithiumIonBankModel *parent = nullptr);
|
||||
~SunSpecLithiumIonBankModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLithiumIonBankModel *parentModel() const;
|
||||
|
||||
@ -710,12 +710,14 @@ void SunSpecLithiumIonModuleModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
Q_DECLARE_FLAGS(CellstFlags, Cellst)
|
||||
Q_FLAG(Cellst)
|
||||
|
||||
explicit SunSpecLithiumIonModuleModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLithiumIonModuleModel *parent);
|
||||
explicit SunSpecLithiumIonModuleModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLithiumIonModuleModel *parent = nullptr);
|
||||
~SunSpecLithiumIonModuleModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLithiumIonModuleModel *parentModel() const;
|
||||
|
||||
@ -1242,12 +1242,14 @@ void SunSpecLithiumIonStringModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -44,7 +44,7 @@ class SunSpecLithiumIonStringModelRepeatingBlock : public SunSpecModelRepeatingB
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit SunSpecLithiumIonStringModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLithiumIonStringModel *parent);
|
||||
explicit SunSpecLithiumIonStringModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLithiumIonStringModel *parent = nullptr);
|
||||
~SunSpecLithiumIonStringModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLithiumIonStringModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecLvrtcModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecLvrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLvrtcModel *parent);
|
||||
explicit SunSpecLvrtcModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLvrtcModel *parent = nullptr);
|
||||
~SunSpecLvrtcModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLvrtcModel *parentModel() const;
|
||||
|
||||
@ -1809,12 +1809,14 @@ void SunSpecLvrtModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecLvrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLvrtModel *parent);
|
||||
explicit SunSpecLvrtModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLvrtModel *parent = nullptr);
|
||||
~SunSpecLvrtModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLvrtModel *parentModel() const;
|
||||
|
||||
@ -1810,12 +1810,14 @@ void SunSpecLvrtxModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecLvrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLvrtxModel *parent);
|
||||
explicit SunSpecLvrtxModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecLvrtxModel *parent = nullptr);
|
||||
~SunSpecLvrtxModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecLvrtxModel *parentModel() const;
|
||||
|
||||
@ -448,12 +448,14 @@ void SunSpecMpptModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -86,7 +86,7 @@ public:
|
||||
Q_DECLARE_FLAGS(DcevtFlags, Dcevt)
|
||||
Q_FLAG(Dcevt)
|
||||
|
||||
explicit SunSpecMpptModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecMpptModel *parent);
|
||||
explicit SunSpecMpptModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecMpptModel *parent = nullptr);
|
||||
~SunSpecMpptModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecMpptModel *parentModel() const;
|
||||
|
||||
@ -1248,12 +1248,14 @@ void SunSpecScheduleModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Ytyp)
|
||||
|
||||
explicit SunSpecScheduleModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecScheduleModel *parent);
|
||||
explicit SunSpecScheduleModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecScheduleModel *parent = nullptr);
|
||||
~SunSpecScheduleModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecScheduleModel *parentModel() const;
|
||||
|
||||
@ -795,12 +795,14 @@ void SunSpecSecureAcMeterSelectedReadingsModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -44,7 +44,7 @@ class SunSpecSecureAcMeterSelectedReadingsModelRepeatingBlock : public SunSpecMo
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
explicit SunSpecSecureAcMeterSelectedReadingsModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecSecureAcMeterSelectedReadingsModel *parent);
|
||||
explicit SunSpecSecureAcMeterSelectedReadingsModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecSecureAcMeterSelectedReadingsModel *parent = nullptr);
|
||||
~SunSpecSecureAcMeterSelectedReadingsModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecSecureAcMeterSelectedReadingsModel *parentModel() const;
|
||||
|
||||
@ -748,12 +748,14 @@ void SunSpecStringCombinerAdvancedModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -68,7 +68,7 @@ public:
|
||||
Q_DECLARE_FLAGS(InevtFlags, Inevt)
|
||||
Q_FLAG(Inevt)
|
||||
|
||||
explicit SunSpecStringCombinerAdvancedModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecStringCombinerAdvancedModel *parent);
|
||||
explicit SunSpecStringCombinerAdvancedModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecStringCombinerAdvancedModel *parent = nullptr);
|
||||
~SunSpecStringCombinerAdvancedModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecStringCombinerAdvancedModel *parentModel() const;
|
||||
|
||||
@ -492,12 +492,14 @@ void SunSpecStringCombinerCurrentModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -68,7 +68,7 @@ public:
|
||||
Q_DECLARE_FLAGS(InevtFlags, Inevt)
|
||||
Q_FLAG(Inevt)
|
||||
|
||||
explicit SunSpecStringCombinerCurrentModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecStringCombinerCurrentModel *parent);
|
||||
explicit SunSpecStringCombinerCurrentModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecStringCombinerCurrentModel *parent = nullptr);
|
||||
~SunSpecStringCombinerCurrentModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecStringCombinerCurrentModel *parentModel() const;
|
||||
|
||||
@ -606,12 +606,14 @@ void SunSpecTrackerControllerModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -59,7 +59,7 @@ public:
|
||||
Q_DECLARE_FLAGS(AlmFlags, Alm)
|
||||
Q_FLAG(Alm)
|
||||
|
||||
explicit SunSpecTrackerControllerModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecTrackerControllerModel *parent);
|
||||
explicit SunSpecTrackerControllerModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecTrackerControllerModel *parent = nullptr);
|
||||
~SunSpecTrackerControllerModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecTrackerControllerModel *parentModel() const;
|
||||
|
||||
@ -1922,12 +1922,14 @@ void SunSpecVoltVarModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -57,7 +57,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecVoltVarModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecVoltVarModel *parent);
|
||||
explicit SunSpecVoltVarModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecVoltVarModel *parent = nullptr);
|
||||
~SunSpecVoltVarModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecVoltVarModel *parentModel() const;
|
||||
|
||||
@ -1944,12 +1944,14 @@ void SunSpecVoltWattModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecVoltWattModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecVoltWattModel *parent);
|
||||
explicit SunSpecVoltWattModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecVoltWattModel *parent = nullptr);
|
||||
~SunSpecVoltWattModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecVoltWattModel *parentModel() const;
|
||||
|
||||
@ -1928,12 +1928,14 @@ void SunSpecWattPfModel::setupRepeatingBlocks()
|
||||
const auto headerLength = 2;
|
||||
const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;
|
||||
if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< "), extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength;
|
||||
qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"
|
||||
<< repeatingBlocksDataSize
|
||||
<< "(repeating block size:"
|
||||
<< m_repeatingBlockLength
|
||||
<< ", extra bytes:"
|
||||
<< repeatingBlocksDataSize % m_repeatingBlockLength
|
||||
<< "). Repeating blocks will not be handled!";
|
||||
return;
|
||||
}
|
||||
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
|
||||
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
};
|
||||
Q_ENUM(Readonly)
|
||||
|
||||
explicit SunSpecWattPfModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecWattPfModel *parent);
|
||||
explicit SunSpecWattPfModelRepeatingBlock(quint16 blockIndex, quint16 blockSize, quint16 modbusStartRegister, SunSpecWattPfModel *parent = nullptr);
|
||||
~SunSpecWattPfModelRepeatingBlock() override = default;
|
||||
|
||||
SunSpecWattPfModel *parentModel() const;
|
||||
|
||||
@ -823,12 +823,14 @@ def writeSetupRepeatingBlocksImplementation(fileDescriptor, className):
|
||||
writeLine(fileDescriptor, ' const auto headerLength = 2;')
|
||||
writeLine(fileDescriptor, ' const auto repeatingBlocksDataSize = m_blockData.size() - headerLength - m_fixedBlockLength;')
|
||||
writeLine(fileDescriptor, ' if (repeatingBlocksDataSize % m_repeatingBlockLength != 0) {')
|
||||
writeLine(fileDescriptor, ' qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"')
|
||||
writeLine(fileDescriptor, ' << repeatingBlocksDataSize')
|
||||
writeLine(fileDescriptor, ' << "(repeating block size:"')
|
||||
writeLine(fileDescriptor, ' << m_repeatingBlockLength')
|
||||
writeLine(fileDescriptor, ' << "), extra bytes:"')
|
||||
writeLine(fileDescriptor, ' << repeatingBlocksDataSize % m_repeatingBlockLength;')
|
||||
writeLine(fileDescriptor, ' qCWarning(dcSunSpecModelData()) << "Unexpected repeating block data size:"')
|
||||
writeLine(fileDescriptor, ' << repeatingBlocksDataSize')
|
||||
writeLine(fileDescriptor, ' << "(repeating block size:"')
|
||||
writeLine(fileDescriptor, ' << m_repeatingBlockLength')
|
||||
writeLine(fileDescriptor, ' << ", extra bytes:"')
|
||||
writeLine(fileDescriptor, ' << repeatingBlocksDataSize % m_repeatingBlockLength')
|
||||
writeLine(fileDescriptor, ' << "). Repeating blocks will not be handled!";')
|
||||
writeLine(fileDescriptor, ' return;')
|
||||
writeLine(fileDescriptor, ' }')
|
||||
writeLine(fileDescriptor, ' const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;')
|
||||
writeLine(fileDescriptor, ' const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;')
|
||||
|
||||
Reference in New Issue
Block a user