fixed map full() function added.

Pool raw access debugging
This commit is contained in:
Robin Müller 2020-01-14 00:49:09 +01:00
parent 01551b8fa5
commit c747952336
3 changed files with 13 additions and 2 deletions

View File

@ -164,6 +164,15 @@ public:
return theMap.maxSize();
}
bool full() {
if(_size == theMap.maxSize()) {
return true;
}
else {
return false;
}
}
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
const uint32_t max_size, bool bigEndian) const {
ReturnValue_t result = SerializeAdapter<uint32_t>::serialize(&this->_size,

View File

@ -38,6 +38,7 @@ ReturnValue_t PoolRawAccess::read() {
result = READ_TYPE_TOO_LARGE;
}
} else {
info << "PoolRawAccess: Size: " << (int)read_out->getSize() << std::endl;
result = READ_INDEX_TOO_LARGE;
}
} else {

View File

@ -92,11 +92,12 @@ ReturnValue_t PoolRawAccessHelper::handlePoolEntrySerialization(uint32_t current
counter ++;
DataSet currentDataSet = DataSet();
info << "Current array position: " << (int)arrayPosition << std::endl;
PoolRawAccess currentPoolRawAccess(currentPoolId,arrayPosition,&currentDataSet,PoolVariableIF::VAR_READ);
result = currentDataSet.read();
if (result != RETURN_OK) {
debug << std::hex << "Pool Raw Access Helper: Error reading raw dataset with returncode "
debug << std::hex << "Pool Raw Access Helper: Error reading raw dataset with returncode 0x"
<< result << std::dec << std::endl;
return result;
}
@ -134,7 +135,7 @@ ReturnValue_t PoolRawAccessHelper::checkRemainingSize(PoolRawAccess * currentPoo
*isSerialized = true;
}
else if(remainingSize > 0) {
*arrayPosition += currentPoolRawAccess->getSizeOfType();
*arrayPosition += 1;
}
else {
return RETURN_FAILED;