From 44a5430555766db0d6bae8a1dca7221c122c80a9 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 7 Jan 2021 20:28:03 +0100 Subject: [PATCH] pool vector improvements --- datapoollocal/LocalPoolVector.tpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/datapoollocal/LocalPoolVector.tpp b/datapoollocal/LocalPoolVector.tpp index 99e37a87..88ba084a 100644 --- a/datapoollocal/LocalPoolVector.tpp +++ b/datapoollocal/LocalPoolVector.tpp @@ -32,10 +32,10 @@ inline ReturnValue_t LocalPoolVector::read( template inline ReturnValue_t LocalPoolVector::readWithoutLock() { if(readWriteMode == pool_rwm_t::VAR_WRITE) { -#if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::warning << "LocalPoolVector: Invalid read write " - "mode for read() call." << std::endl; -#endif + object_id_t targetObjectId = hkManager->getOwner()->getObjectId(); + reportReadCommitError("LocalPoolVector", + PoolVariableIF::INVALID_READ_WRITE_MODE, true, targetObjectId, + localPoolId); return PoolVariableIF::INVALID_READ_WRITE_MODE; } @@ -64,20 +64,17 @@ inline ReturnValue_t LocalPoolVector::commit( template inline ReturnValue_t LocalPoolVector::commitWithoutLock() { if(readWriteMode == pool_rwm_t::VAR_READ) { -#if FSFW_CPP_OSTREAM_ENABLED == 1 - sif::warning << "LocalPoolVector: Invalid read write " - "mode for commit call." << std::endl; -#else - sif::warning << "LocalPoolVector: Invalid read write " - "mode for commit call." << std::endl; -#endif + object_id_t targetObjectId = hkManager->getOwner()->getObjectId(); + reportReadCommitError("LocalPoolVector", + PoolVariableIF::INVALID_READ_WRITE_MODE, false, targetObjectId, + localPoolId); return PoolVariableIF::INVALID_READ_WRITE_MODE; } PoolEntry* poolEntry = nullptr; ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry); if(result != RETURN_OK) { object_id_t targetObjectId = hkManager->getOwner()->getObjectId(); - reportReadCommitError("LocalPoolVector", result, true, targetObjectId, + reportReadCommitError("LocalPoolVector", result, false, targetObjectId, localPoolId); return result; }