fixed map full() function added.
Pool raw access debugging
This commit is contained in:
parent
01551b8fa5
commit
c747952336
@ -164,6 +164,15 @@ public:
|
|||||||
return theMap.maxSize();
|
return theMap.maxSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool full() {
|
||||||
|
if(_size == theMap.maxSize()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
virtual ReturnValue_t serialize(uint8_t** buffer, uint32_t* size,
|
||||||
const uint32_t max_size, bool bigEndian) const {
|
const uint32_t max_size, bool bigEndian) const {
|
||||||
ReturnValue_t result = SerializeAdapter<uint32_t>::serialize(&this->_size,
|
ReturnValue_t result = SerializeAdapter<uint32_t>::serialize(&this->_size,
|
||||||
|
@ -38,6 +38,7 @@ ReturnValue_t PoolRawAccess::read() {
|
|||||||
result = READ_TYPE_TOO_LARGE;
|
result = READ_TYPE_TOO_LARGE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
info << "PoolRawAccess: Size: " << (int)read_out->getSize() << std::endl;
|
||||||
result = READ_INDEX_TOO_LARGE;
|
result = READ_INDEX_TOO_LARGE;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -92,11 +92,12 @@ ReturnValue_t PoolRawAccessHelper::handlePoolEntrySerialization(uint32_t current
|
|||||||
counter ++;
|
counter ++;
|
||||||
|
|
||||||
DataSet currentDataSet = DataSet();
|
DataSet currentDataSet = DataSet();
|
||||||
|
info << "Current array position: " << (int)arrayPosition << std::endl;
|
||||||
PoolRawAccess currentPoolRawAccess(currentPoolId,arrayPosition,¤tDataSet,PoolVariableIF::VAR_READ);
|
PoolRawAccess currentPoolRawAccess(currentPoolId,arrayPosition,¤tDataSet,PoolVariableIF::VAR_READ);
|
||||||
|
|
||||||
result = currentDataSet.read();
|
result = currentDataSet.read();
|
||||||
if (result != RETURN_OK) {
|
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;
|
<< result << std::dec << std::endl;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -134,7 +135,7 @@ ReturnValue_t PoolRawAccessHelper::checkRemainingSize(PoolRawAccess * currentPoo
|
|||||||
*isSerialized = true;
|
*isSerialized = true;
|
||||||
}
|
}
|
||||||
else if(remainingSize > 0) {
|
else if(remainingSize > 0) {
|
||||||
*arrayPosition += currentPoolRawAccess->getSizeOfType();
|
*arrayPosition += 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
|
Loading…
Reference in New Issue
Block a user