Memory optimization and bugfix

This commit is contained in:
Gunnar Skjold
2021-01-16 16:02:39 +01:00
parent a830a52863
commit af8f5a7c24
23 changed files with 2041 additions and 2312 deletions

View File

@@ -167,6 +167,14 @@ int DlmsReader::GetRawData(byte *dataBuffer, int start, int length)
return 0;
}
int DlmsReader::getBytesRead() {
return dataLength - (3 + destinationAddressLength + sourceAddressLength + 2 + 1);
}
byte* DlmsReader::getBuffer() {
return buffer + (3 + destinationAddressLength + sourceAddressLength + 2 + 1);
}
int DlmsReader::GetAddress(int addressPosition, byte* addressBuffer, int start, int length)
{
int addressBufferPos = start;