diff --git a/datapoollocal/LocalDataPoolManager.h b/datapoollocal/LocalDataPoolManager.h index 3b9b6cd92..6fb51b3e3 100644 --- a/datapoollocal/LocalDataPoolManager.h +++ b/datapoollocal/LocalDataPoolManager.h @@ -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 diff --git a/internalError/InternalErrorReporter.cpp b/internalError/InternalErrorReporter.cpp index 3f7a06190..767ece51b 100644 --- a/internalError/InternalErrorReporter.cpp +++ b/internalError/InternalErrorReporter.cpp @@ -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()); localDataPoolMap.emplace(errorPoolIds::STORE_HITS, new PoolEntry()); + // 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; } diff --git a/internalError/InternalErrorReporter.h b/internalError/InternalErrorReporter.h index 1deb14221..85ac0836d 100644 --- a/internalError/InternalErrorReporter.h +++ b/internalError/InternalErrorReporter.h @@ -60,6 +60,7 @@ protected: PeriodicTaskIF* executingTask = nullptr; MutexIF* mutex = nullptr; + sid_t internalErrorSid; InternalErrorDataset internalErrorDataset; bool diagnosticPrintout = true;