1
0
forked from fsfw/fsfw

update notifications working

This commit is contained in:
2020-10-14 19:52:06 +02:00
parent 5b96161331
commit a9a31308ae
4 changed files with 35 additions and 15 deletions

View File

@ -128,10 +128,10 @@ ReturnValue_t LocalDataPoolManager::performHkOperation() {
continue;
}
if(poolObj->hasChanged()) {
// prepare and send update notification.
toReset = poolObj;
}
toReset = poolObj;
}
else {
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
@ -140,12 +140,22 @@ ReturnValue_t LocalDataPoolManager::performHkOperation() {
continue;
}
if(dataSet->hasChanged()) {
// prepare and send update notification
CommandMessage notification;
HousekeepingMessage::setUpdateNotificationSetCommand(
&notification, receiver.dataId.sid);
ReturnValue_t result = hkQueue->sendMessage(
receiver.destinationQueue, &notification);
if(result != HasReturnvaluesIF::RETURN_OK) {
status = result;
}
toReset = dataSet;
}
toReset = dataSet;
}
handleChangeResetLogic(receiver.dataType, receiver.dataId, toReset);
if(toReset != nullptr) {
handleChangeResetLogic(receiver.dataType,
receiver.dataId, toReset);
}
break;
}
case(ReportingType::UPDATE_SNAPSHOT): {
@ -159,8 +169,8 @@ ReturnValue_t LocalDataPoolManager::performHkOperation() {
}
if(poolObj->hasChanged()) {
// prepare and send update snapshot.
toReset = poolObj;
}
toReset = poolObj;
}
else {
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(
@ -170,10 +180,13 @@ ReturnValue_t LocalDataPoolManager::performHkOperation() {
}
if(dataSet->hasChanged()) {
// prepare and send update snapshot.
toReset = dataSet;
}
toReset = dataSet;
}
handleChangeResetLogic(receiver.dataType, receiver.dataId, toReset);
if(toReset != nullptr) {
handleChangeResetLogic(receiver.dataType,
receiver.dataId, toReset);
}
break;
}
default:
@ -425,6 +438,11 @@ ReturnValue_t LocalDataPoolManager::handleHousekeepingMessage(
dataSet, true);
}
case(HousekeepingMessage::UPDATE_NOTIFICATION_SET): {
owner->handleChangedDatasetOrVariable(sid);
return HasReturnvaluesIF::RETURN_OK;
}
default:
return CommandMessageIF::UNKNOWN_COMMAND;
}