entity-manager: move startRemovedTimer to EM class
This enables us to remove static variables scannedPowerOff and
scannedPowerOn.
Tested: Not sure how to test this.
Did a power-cycle of the host, nothing unusual to be seen.
EM seems to work normally.
```
Jul 01 09:59:26 s8030-bmc-30303035c0c1 entity-manager[4204]: Inventory Added: Supermicro PWS 920P SQ 0
Jul 01 09:59:26 s8030-bmc-30303035c0c1 entity-manager[4204]: Inventory Added: Supermicro PWS 920P SQ 1
Jul 01 09:59:26 s8030-bmc-30303035c0c1 entity-manager[4204]: Inventory Added: chassis
Jul 01 09:59:26 s8030-bmc-30303035c0c1 entity-manager[4204]: Inventory Added: MBX 1.57 Chassis
```
Change-Id: Ic9f80d45d255f91875876bb7d11180b2ec20cd6a
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/entity_manager/entity_manager.hpp b/src/entity_manager/entity_manager.hpp
index a6095f0..81c2136 100644
--- a/src/entity_manager/entity_manager.hpp
+++ b/src/entity_manager/entity_manager.hpp
@@ -64,6 +64,12 @@
std::unique_ptr<sdbusplus::bus::match_t> nameOwnerChangedMatch = nullptr;
std::unique_ptr<sdbusplus::bus::match_t> interfacesAddedMatch = nullptr;
std::unique_ptr<sdbusplus::bus::match_t> interfacesRemovedMatch = nullptr;
+
+ bool scannedPowerOff = false;
+ bool scannedPowerOn = false;
+
+ void startRemovedTimer(boost::asio::steady_timer& timer,
+ nlohmann::json& systemConfiguration);
};
inline void logDeviceAdded(const nlohmann::json& record)