renamed to pool manager for consistency
This commit is contained in:
parent
0b08ac1004
commit
634a8f3469
@ -24,7 +24,7 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId,
|
||||
wiretappingMode(OFF), storedRawData(StorageManagerIF::INVALID_ADDRESS),
|
||||
deviceCommunicationId(deviceCommunication), comCookie(comCookie),
|
||||
healthHelper(this,setObjectId), modeHelper(this), parameterHelper(this),
|
||||
actionHelper(this, nullptr), hkManager(this, nullptr),
|
||||
actionHelper(this, nullptr), poolManager(this, nullptr),
|
||||
childTransitionFailure(RETURN_OK), fdirInstance(fdirInstance),
|
||||
hkSwitcher(this), defaultFDIRUsed(fdirInstance == nullptr),
|
||||
switchOffWasReported(false), childTransitionDelay(5000),
|
||||
@ -107,7 +107,7 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
|
||||
doGetRead();
|
||||
// This will be performed after datasets have been updated by the
|
||||
// custom device implementation.
|
||||
hkManager.performHkOperation();
|
||||
poolManager.performHkOperation();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -210,7 +210,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
||||
return result;
|
||||
}
|
||||
|
||||
result = hkManager.initialize(commandQueue);
|
||||
result = poolManager.initialize(commandQueue);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
@ -280,7 +280,7 @@ void DeviceHandlerBase::readCommandQueue() {
|
||||
return;
|
||||
}
|
||||
|
||||
result = hkManager.handleHousekeepingMessage(&command);
|
||||
result = poolManager.handleHousekeepingMessage(&command);
|
||||
if (result == RETURN_OK) {
|
||||
return;
|
||||
}
|
||||
@ -1438,7 +1438,7 @@ ReturnValue_t DeviceHandlerBase::initializeAfterTaskCreation() {
|
||||
if(executingTask != nullptr) {
|
||||
pstIntervalMs = executingTask->getPeriodMs();
|
||||
}
|
||||
this->hkManager.initializeAfterTaskCreation();
|
||||
this->poolManager.initializeAfterTaskCreation();
|
||||
|
||||
if(setStartupImmediately) {
|
||||
startTransition(MODE_ON, SUBMODE_NONE);
|
||||
@ -1484,7 +1484,7 @@ void DeviceHandlerBase::setNormalDatapoolEntriesInvalid() {
|
||||
}
|
||||
|
||||
AccessPoolManagerIF* DeviceHandlerBase::getAccessorHandle() {
|
||||
return &hkManager;
|
||||
return &poolManager;
|
||||
}
|
||||
|
||||
void DeviceHandlerBase::printWarningOrError(sif::OutputTypes errorType,
|
||||
@ -1533,5 +1533,5 @@ void DeviceHandlerBase::printWarningOrError(sif::OutputTypes errorType,
|
||||
}
|
||||
|
||||
ProvidesDataPoolSubscriptionIF* DeviceHandlerBase::getSubscriptionInterface() {
|
||||
return &hkManager;
|
||||
return &poolManager;
|
||||
}
|
||||
|
@ -517,12 +517,14 @@ protected:
|
||||
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
|
||||
|
||||
/** Get the HK manager object handle */
|
||||
//LocalDataPoolManager* getHkManagerHandle() override;
|
||||
|
||||
/**
|
||||
* Provides the subscription handle which can be used by classes like controllers
|
||||
* to get messages on data updates.
|
||||
* @return
|
||||
*/
|
||||
ProvidesDataPoolSubscriptionIF* getSubscriptionInterface() override;
|
||||
|
||||
//! Accessor handle required for internal handling.
|
||||
AccessPoolManagerIF* getAccessorHandle() override;
|
||||
|
||||
/**
|
||||
@ -653,7 +655,7 @@ protected:
|
||||
/** Action helper for HasActionsIF */
|
||||
ActionHelper actionHelper;
|
||||
/** Housekeeping Manager */
|
||||
LocalDataPoolManager hkManager;
|
||||
LocalDataPoolManager poolManager;
|
||||
|
||||
/**
|
||||
* @brief Information about commands
|
||||
|
@ -27,7 +27,7 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
||||
// Subscribe for an update message.
|
||||
poolOwner->dataset.setChanged(true);
|
||||
// Now the update message should be generated.
|
||||
REQUIRE(poolOwner->hkManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner->poolManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(mqMock->wasMessageSent() == true);
|
||||
|
||||
REQUIRE(mqMock->receiveMessage(&messageSent) == retval::CATCH_OK);
|
||||
@ -38,7 +38,7 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
||||
CHECK(poolOwner->dataset.hasChanged() == false);
|
||||
// Set changed again, result should be the same.
|
||||
poolOwner->dataset.setChanged(true);
|
||||
REQUIRE(poolOwner->hkManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner->poolManager.performHkOperation() == retval::CATCH_OK);
|
||||
|
||||
REQUIRE(mqMock->wasMessageSent(&messagesSent) == true);
|
||||
CHECK(messagesSent == 1);
|
||||
@ -49,7 +49,7 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
||||
// now subscribe for set update HK as well.
|
||||
REQUIRE(poolOwner->subscribeWrapperSetUpdateHk() == retval::CATCH_OK);
|
||||
poolOwner->dataset.setChanged(true);
|
||||
REQUIRE(poolOwner->hkManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner->poolManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(mqMock->wasMessageSent(&messagesSent) == true);
|
||||
CHECK(messagesSent == 2);
|
||||
// first message sent should be the update notification, considering
|
||||
@ -77,7 +77,7 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
||||
poolOwner->getPoolObjectHandle(lpool::uint8VarId));
|
||||
REQUIRE(poolVar != nullptr);
|
||||
poolVar->setChanged(true);
|
||||
REQUIRE(poolOwner->hkManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner->poolManager.performHkOperation() == retval::CATCH_OK);
|
||||
|
||||
// Check update notification was sent.
|
||||
REQUIRE(mqMock->wasMessageSent(&messagesSent) == true);
|
||||
@ -93,7 +93,7 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
||||
REQUIRE(poolOwner->subscribeWrapperSetUpdateHk() == retval::CATCH_OK);
|
||||
|
||||
poolOwner->dataset.setChanged(true);
|
||||
REQUIRE(poolOwner->hkManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner->poolManager.performHkOperation() == retval::CATCH_OK);
|
||||
// now two messages should be sent.
|
||||
REQUIRE(mqMock->wasMessageSent(&messagesSent) == true);
|
||||
CHECK(messagesSent == 2);
|
||||
@ -101,7 +101,7 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
||||
|
||||
poolOwner->dataset.setChanged(true);
|
||||
poolVar->setChanged(true);
|
||||
REQUIRE(poolOwner->hkManager.performHkOperation() == retval::CATCH_OK);
|
||||
REQUIRE(poolOwner->poolManager.performHkOperation() == retval::CATCH_OK);
|
||||
// now three messages should be sent.
|
||||
REQUIRE(mqMock->wasMessageSent(&messagesSent) == true);
|
||||
CHECK(messagesSent == 3);
|
||||
|
Loading…
Reference in New Issue
Block a user