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