sched-host-tran: support multi-host
The State.Host objects are now templated, so the ScheduledHostTransition
similarly needs to be templated.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I60751dbe5fff5e3c0c2c7a19515524cf5f6bc8f7
diff --git a/scheduled_host_transition.hpp b/scheduled_host_transition.hpp
index 4d917af..ec97c52 100644
--- a/scheduled_host_transition.hpp
+++ b/scheduled_host_transition.hpp
@@ -30,10 +30,10 @@
{
public:
ScheduledHostTransition(sdbusplus::bus::bus& bus, const char* objPath,
- const sdeventplus::Event& event) :
+ size_t id, const sdeventplus::Event& event) :
ScheduledHostTransitionInherit(
bus, objPath, ScheduledHostTransition::action::defer_emit),
- bus(bus), event(event),
+ bus(bus), id(id), event(event),
timer(event, std::bind(&ScheduledHostTransition::callback, this))
{
initialize();
@@ -62,6 +62,9 @@
/** @brief sdbusplus bus client connection */
sdbusplus::bus::bus& bus;
+ /** @brief Host id. **/
+ const size_t id = 0;
+
/** @brief sdbusplus event */
const sdeventplus::Event& event;