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:
Michael Schwarz 2025-10-10 14:07:07 +02:00
parent 2b16beb851
commit 2690adeba3
61 changed files with 278 additions and 216 deletions

View File

@ -176,8 +176,10 @@ void SunSpecFlowBatteryModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -44,7 +44,7 @@ class SunSpecFlowBatteryModelRepeatingBlock : public SunSpecModelRepeatingBlock
Q_OBJECT Q_OBJECT
public: 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; ~SunSpecFlowBatteryModelRepeatingBlock() override = default;
SunSpecFlowBatteryModel *parentModel() const; SunSpecFlowBatteryModel *parentModel() const;

View File

@ -176,8 +176,10 @@ void SunSpecFlowBatteryModuleModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -44,7 +44,7 @@ class SunSpecFlowBatteryModuleModelRepeatingBlock : public SunSpecModelRepeating
Q_OBJECT Q_OBJECT
public: 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; ~SunSpecFlowBatteryModuleModelRepeatingBlock() override = default;
SunSpecFlowBatteryModuleModel *parentModel() const; SunSpecFlowBatteryModuleModel *parentModel() const;

View File

@ -176,8 +176,10 @@ void SunSpecFlowBatteryStackModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -44,7 +44,7 @@ class SunSpecFlowBatteryStackModelRepeatingBlock : public SunSpecModelRepeatingB
Q_OBJECT Q_OBJECT
public: 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; ~SunSpecFlowBatteryStackModelRepeatingBlock() override = default;
SunSpecFlowBatteryStackModel *parentModel() const; SunSpecFlowBatteryStackModel *parentModel() const;

View File

@ -1133,8 +1133,10 @@ void SunSpecFlowBatteryStringModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -167,7 +167,7 @@ public:
Q_DECLARE_FLAGS(Modevt2Flags, Modevt2) Q_DECLARE_FLAGS(Modevt2Flags, Modevt2)
Q_FLAG(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; ~SunSpecFlowBatteryStringModelRepeatingBlock() override = default;
SunSpecFlowBatteryStringModel *parentModel() const; SunSpecFlowBatteryStringModel *parentModel() const;

View File

@ -2083,8 +2083,10 @@ void SunSpecFreqWattModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecFreqWattModelRepeatingBlock() override = default;
SunSpecFreqWattModel *parentModel() const; SunSpecFreqWattModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecHfrtcModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecHfrtcModelRepeatingBlock() override = default;
SunSpecHfrtcModel *parentModel() const; SunSpecHfrtcModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecHfrtModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecHfrtModelRepeatingBlock() override = default;
SunSpecHfrtModel *parentModel() const; SunSpecHfrtModel *parentModel() const;

View File

@ -1814,8 +1814,10 @@ void SunSpecHfrtxModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecHfrtxModelRepeatingBlock() override = default;
SunSpecHfrtxModel *parentModel() const; SunSpecHfrtxModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecHvrtcModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecHvrtcModelRepeatingBlock() override = default;
SunSpecHvrtcModel *parentModel() const; SunSpecHvrtcModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecHvrtModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecHvrtModelRepeatingBlock() override = default;
SunSpecHvrtModel *parentModel() const; SunSpecHvrtModel *parentModel() const;

View File

@ -1814,8 +1814,10 @@ void SunSpecHvrtxModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecHvrtxModelRepeatingBlock() override = default;
SunSpecHvrtxModel *parentModel() const; SunSpecHvrtxModel *parentModel() const;

View File

@ -234,8 +234,10 @@ void SunSpecIrradianceModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -44,7 +44,7 @@ class SunSpecIrradianceModelRepeatingBlock : public SunSpecModelRepeatingBlock
Q_OBJECT Q_OBJECT
public: 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; ~SunSpecIrradianceModelRepeatingBlock() override = default;
SunSpecIrradianceModel *parentModel() const; SunSpecIrradianceModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecLfrtcModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecLfrtcModelRepeatingBlock() override = default;
SunSpecLfrtcModel *parentModel() const; SunSpecLfrtcModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecLfrtModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecLfrtModelRepeatingBlock() override = default;
SunSpecLfrtModel *parentModel() const; SunSpecLfrtModel *parentModel() const;

View File

@ -1814,8 +1814,10 @@ void SunSpecLfrtxModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecLfrtxModelRepeatingBlock() override = default;
SunSpecLfrtxModel *parentModel() const; SunSpecLfrtxModel *parentModel() const;

View File

@ -1168,8 +1168,10 @@ void SunSpecLithiumIonBankModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -156,7 +156,7 @@ public:
Q_DECLARE_FLAGS(Strevt1Flags, Strevt1) Q_DECLARE_FLAGS(Strevt1Flags, Strevt1)
Q_FLAG(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; ~SunSpecLithiumIonBankModelRepeatingBlock() override = default;
SunSpecLithiumIonBankModel *parentModel() const; SunSpecLithiumIonBankModel *parentModel() const;

View File

@ -714,8 +714,10 @@ void SunSpecLithiumIonModuleModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
Q_DECLARE_FLAGS(CellstFlags, Cellst) Q_DECLARE_FLAGS(CellstFlags, Cellst)
Q_FLAG(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; ~SunSpecLithiumIonModuleModelRepeatingBlock() override = default;
SunSpecLithiumIonModuleModel *parentModel() const; SunSpecLithiumIonModuleModel *parentModel() const;

View File

@ -1246,8 +1246,10 @@ void SunSpecLithiumIonStringModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -44,7 +44,7 @@ class SunSpecLithiumIonStringModelRepeatingBlock : public SunSpecModelRepeatingB
Q_OBJECT Q_OBJECT
public: 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; ~SunSpecLithiumIonStringModelRepeatingBlock() override = default;
SunSpecLithiumIonStringModel *parentModel() const; SunSpecLithiumIonStringModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecLvrtcModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecLvrtcModelRepeatingBlock() override = default;
SunSpecLvrtcModel *parentModel() const; SunSpecLvrtcModel *parentModel() const;

View File

@ -1813,8 +1813,10 @@ void SunSpecLvrtModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecLvrtModelRepeatingBlock() override = default;
SunSpecLvrtModel *parentModel() const; SunSpecLvrtModel *parentModel() const;

View File

@ -1814,8 +1814,10 @@ void SunSpecLvrtxModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecLvrtxModelRepeatingBlock() override = default;
SunSpecLvrtxModel *parentModel() const; SunSpecLvrtxModel *parentModel() const;

View File

@ -452,8 +452,10 @@ void SunSpecMpptModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -86,7 +86,7 @@ public:
Q_DECLARE_FLAGS(DcevtFlags, Dcevt) Q_DECLARE_FLAGS(DcevtFlags, Dcevt)
Q_FLAG(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; ~SunSpecMpptModelRepeatingBlock() override = default;
SunSpecMpptModel *parentModel() const; SunSpecMpptModel *parentModel() const;

View File

@ -1252,8 +1252,10 @@ void SunSpecScheduleModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -83,7 +83,7 @@ public:
}; };
Q_ENUM(Ytyp) 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; ~SunSpecScheduleModelRepeatingBlock() override = default;
SunSpecScheduleModel *parentModel() const; SunSpecScheduleModel *parentModel() const;

View File

@ -799,8 +799,10 @@ void SunSpecSecureAcMeterSelectedReadingsModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -44,7 +44,7 @@ class SunSpecSecureAcMeterSelectedReadingsModelRepeatingBlock : public SunSpecMo
Q_OBJECT Q_OBJECT
public: 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; ~SunSpecSecureAcMeterSelectedReadingsModelRepeatingBlock() override = default;
SunSpecSecureAcMeterSelectedReadingsModel *parentModel() const; SunSpecSecureAcMeterSelectedReadingsModel *parentModel() const;

View File

@ -752,8 +752,10 @@ void SunSpecStringCombinerAdvancedModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -68,7 +68,7 @@ public:
Q_DECLARE_FLAGS(InevtFlags, Inevt) Q_DECLARE_FLAGS(InevtFlags, Inevt)
Q_FLAG(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; ~SunSpecStringCombinerAdvancedModelRepeatingBlock() override = default;
SunSpecStringCombinerAdvancedModel *parentModel() const; SunSpecStringCombinerAdvancedModel *parentModel() const;

View File

@ -496,8 +496,10 @@ void SunSpecStringCombinerCurrentModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -68,7 +68,7 @@ public:
Q_DECLARE_FLAGS(InevtFlags, Inevt) Q_DECLARE_FLAGS(InevtFlags, Inevt)
Q_FLAG(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; ~SunSpecStringCombinerCurrentModelRepeatingBlock() override = default;
SunSpecStringCombinerCurrentModel *parentModel() const; SunSpecStringCombinerCurrentModel *parentModel() const;

View File

@ -610,8 +610,10 @@ void SunSpecTrackerControllerModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -59,7 +59,7 @@ public:
Q_DECLARE_FLAGS(AlmFlags, Alm) Q_DECLARE_FLAGS(AlmFlags, Alm)
Q_FLAG(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; ~SunSpecTrackerControllerModelRepeatingBlock() override = default;
SunSpecTrackerControllerModel *parentModel() const; SunSpecTrackerControllerModel *parentModel() const;

View File

@ -1926,8 +1926,10 @@ void SunSpecVoltVarModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -57,7 +57,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecVoltVarModelRepeatingBlock() override = default;
SunSpecVoltVarModel *parentModel() const; SunSpecVoltVarModel *parentModel() const;

View File

@ -1948,8 +1948,10 @@ void SunSpecVoltWattModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -56,7 +56,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecVoltWattModelRepeatingBlock() override = default;
SunSpecVoltWattModel *parentModel() const; SunSpecVoltWattModel *parentModel() const;

View File

@ -1932,8 +1932,10 @@ void SunSpecWattPfModel::setupRepeatingBlocks()
<< repeatingBlocksDataSize << repeatingBlocksDataSize
<< "(repeating block size:" << "(repeating block size:"
<< m_repeatingBlockLength << m_repeatingBlockLength
<< "), extra bytes:" << ", extra bytes:"
<< repeatingBlocksDataSize % m_repeatingBlockLength; << repeatingBlocksDataSize % m_repeatingBlockLength
<< "). Repeating blocks will not be handled!";
return;
} }
const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength; const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;
const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength; const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;

View File

@ -50,7 +50,7 @@ public:
}; };
Q_ENUM(Readonly) 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; ~SunSpecWattPfModelRepeatingBlock() override = default;
SunSpecWattPfModel *parentModel() const; SunSpecWattPfModel *parentModel() const;

View File

@ -827,8 +827,10 @@ def writeSetupRepeatingBlocksImplementation(fileDescriptor, className):
writeLine(fileDescriptor, ' << repeatingBlocksDataSize') writeLine(fileDescriptor, ' << repeatingBlocksDataSize')
writeLine(fileDescriptor, ' << "(repeating block size:"') writeLine(fileDescriptor, ' << "(repeating block size:"')
writeLine(fileDescriptor, ' << m_repeatingBlockLength') writeLine(fileDescriptor, ' << m_repeatingBlockLength')
writeLine(fileDescriptor, ' << "), extra bytes:"') writeLine(fileDescriptor, ' << ", extra bytes:"')
writeLine(fileDescriptor, ' << repeatingBlocksDataSize % m_repeatingBlockLength;') writeLine(fileDescriptor, ' << repeatingBlocksDataSize % m_repeatingBlockLength')
writeLine(fileDescriptor, ' << "). Repeating blocks will not be handled!";')
writeLine(fileDescriptor, ' return;')
writeLine(fileDescriptor, ' }') writeLine(fileDescriptor, ' }')
writeLine(fileDescriptor, ' const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;') writeLine(fileDescriptor, ' const auto numberOfBlocks = repeatingBlocksDataSize / m_repeatingBlockLength;')
writeLine(fileDescriptor, ' const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;') writeLine(fileDescriptor, ' const auto repeatingBlocksOffset = m_fixedBlockLength + headerLength;')