added new mode for local datapool manager

This commit is contained in:
Robin Müller 2020-09-26 17:28:03 +02:00
parent c3830da3d0
commit 6eaade2395
3 changed files with 8 additions and 0 deletions

View File

@ -146,6 +146,8 @@ public:
enum class ReportingType: uint8_t {
//! Periodic generation of HK packets.
PERIODIC,
//! Housekeeping packet will be generated if values have changed.
UPDATE_HK,
//! Update notification will be sent out as message.
UPDATE_NOTIFICATION,
//! Notification will be sent out as message and a snapshot of the

View File

@ -12,6 +12,7 @@ InternalErrorReporter::InternalErrorReporter(object_id_t setObjectId,
commandQueue(QueueFactory::instance()->
createMessageQueue(messageQueueDepth)),
poolManager(this, commandQueue),
internalErrorSid(setObjectId, InternalErrorDataset::ERROR_SET_ID),
internalErrorDataset(this) {
mutex = MutexFactory::instance()->createMutex();
}
@ -154,6 +155,10 @@ ReturnValue_t InternalErrorReporter::initializeLocalDataPool(
new PoolEntry<uint32_t>());
localDataPoolMap.emplace(errorPoolIds::STORE_HITS,
new PoolEntry<uint32_t>());
// todo: Only send HK if values have changed, will be supported by
// pool manager soon.
poolManager.subscribeForPeriodicPacket(internalErrorSid, false,
getPeriodicOperationFrequency(), false);
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -60,6 +60,7 @@ protected:
PeriodicTaskIF* executingTask = nullptr;
MutexIF* mutex = nullptr;
sid_t internalErrorSid;
InternalErrorDataset internalErrorDataset;
bool diagnosticPrintout = true;