renamed guard class

This commit is contained in:
Robin Müller 2021-03-04 16:38:35 +01:00
parent dae4a5fa74
commit 21a7fd621d
2 changed files with 6 additions and 6 deletions

View File

@ -8,9 +8,9 @@
/**
* @brief Helper class to read data sets or pool variables
*/
class PoolReadHelper {
class PoolReadGuard {
public:
PoolReadHelper(ReadCommitIF* readObject,
PoolReadGuard(ReadCommitIF* readObject,
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING,
uint32_t mutexTimeout = 20):
readObject(readObject), mutexTimeout(mutexTimeout) {
@ -42,7 +42,7 @@ public:
/**
* @brief Default destructor which will take care of commiting changed values.
*/
~PoolReadHelper() {
~PoolReadGuard() {
if(readObject != nullptr and not noCommit) {
readObject->commit(timeoutType, mutexTimeout);
}

View File

@ -192,7 +192,7 @@ public:
resetSubscriptionList();
ReturnValue_t status = HasReturnvaluesIF::RETURN_OK;
{
PoolReadHelper readHelper(&dataset);
PoolReadGuard readHelper(&dataset);
if(readHelper.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
status = readHelper.getReadResult();
}
@ -205,7 +205,7 @@ public:
}
{
PoolReadHelper readHelper(&testUint32);
PoolReadGuard readHelper(&testUint32);
if(readHelper.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
status = readHelper.getReadResult();
}
@ -214,7 +214,7 @@ public:
}
{
PoolReadHelper readHelper(&testInt64Vec);
PoolReadGuard readHelper(&testInt64Vec);
if(readHelper.getReadResult() != HasReturnvaluesIF::RETURN_OK) {
status = readHelper.getReadResult();
}