1*d98174e9SGeorge Liu #include "virtualSensor.hpp" 2*d98174e9SGeorge Liu 3*d98174e9SGeorge Liu #include <sdbusplus/server.hpp> 4*d98174e9SGeorge Liu main()5*d98174e9SGeorge Liuint main() 6*d98174e9SGeorge Liu { 7*d98174e9SGeorge Liu // Get a handle to system dbus 8*d98174e9SGeorge Liu auto bus = sdbusplus::bus::new_default(); 9*d98174e9SGeorge Liu 10*d98174e9SGeorge Liu // Add the ObjectManager interface 11*d98174e9SGeorge Liu sdbusplus::server::manager_t objManager(bus, 12*d98174e9SGeorge Liu "/xyz/openbmc_project/sensors"); 13*d98174e9SGeorge Liu 14*d98174e9SGeorge Liu // Create an virtual sensors object 15*d98174e9SGeorge Liu phosphor::virtual_sensor::VirtualSensors virtualSensors(bus); 16*d98174e9SGeorge Liu 17*d98174e9SGeorge Liu // Request service bus name 18*d98174e9SGeorge Liu bus.request_name("xyz.openbmc_project.VirtualSensor"); 19*d98174e9SGeorge Liu 20*d98174e9SGeorge Liu // Run the dbus loop. 21*d98174e9SGeorge Liu bus.process_loop(); 22*d98174e9SGeorge Liu 23*d98174e9SGeorge Liu return 0; 24*d98174e9SGeorge Liu } 25