Initial chassis state management code
This is just the basics to get the generated code
compiling and to verify the basic dbus interfaces.
Change-Id: I335964da456d8173e2ce792c6614770da43303b4
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/chassis_state_manager_main.cpp b/chassis_state_manager_main.cpp
new file mode 100644
index 0000000..27965e0
--- /dev/null
+++ b/chassis_state_manager_main.cpp
@@ -0,0 +1,32 @@
+#include <cstdlib>
+#include <iostream>
+#include <exception>
+#include <sdbusplus/bus.hpp>
+#include "config.h"
+#include "chassis_state_manager.hpp"
+
+
+int main(int argc, char *argv[])
+{
+ auto bus = sdbusplus::bus::new_default();
+
+ // For now, we only have one instance of the chassis
+ auto objPathInst = std::string{CHASSIS_OBJPATH} + '0';
+
+ // Add sdbusplus ObjectManager.
+ sdbusplus::server::manager::manager objManager(bus, objPathInst.c_str());
+
+ phosphor::state::manager::Chassis manager(bus,
+ CHASSIS_BUSNAME,
+ objPathInst.c_str());
+
+ bus.request_name(CHASSIS_BUSNAME);
+
+ while(true)
+ {
+ bus.process_discard();
+ bus.wait();
+ }
+
+ return 0;
+}