Archana Kakani | bf1fd27 | 2024-06-05 13:25:53 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <sdbusplus/bus.hpp> |
| 4 | #include <sdbusplus/server.hpp> |
| 5 | #include <sdbusplus/server/object.hpp> |
| 6 | #include <xyz/openbmc_project/Inventory/Item/PCIeSlot/server.hpp> |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | namespace pldm |
| 11 | { |
| 12 | namespace dbus |
| 13 | { |
| 14 | using ItemSlot = sdbusplus::server::object_t< |
| 15 | sdbusplus::xyz::openbmc_project::Inventory::Item::server::PCIeSlot>; |
| 16 | |
| 17 | /** |
| 18 | * @class PCIeSlot |
| 19 | * @brief PCIeSlot support includes the slot properties and functions |
| 20 | */ |
| 21 | class PCIeSlot : public ItemSlot |
| 22 | { |
| 23 | public: |
| 24 | PCIeSlot() = delete; |
| 25 | ~PCIeSlot() = default; |
| 26 | PCIeSlot(const PCIeSlot&) = delete; |
| 27 | PCIeSlot& operator=(const PCIeSlot&) = delete; |
| 28 | |
| 29 | PCIeSlot(sdbusplus::bus_t& bus, const std::string& objPath) : |
| 30 | ItemSlot(bus, objPath.c_str()) |
| 31 | {} |
| 32 | |
| 33 | /** Get value of Generation */ |
| 34 | Generations generation() const override; |
| 35 | |
| 36 | /** Set value of Generation */ |
| 37 | Generations generation(Generations value) override; |
| 38 | |
| 39 | /** Get value of Lanes */ |
| 40 | size_t lanes() const override; |
| 41 | |
| 42 | /** Set value of Lanes */ |
| 43 | size_t lanes(size_t value) override; |
| 44 | |
| 45 | /** Get value of SlotType */ |
| 46 | SlotTypes slotType() const override; |
| 47 | |
| 48 | /** Set value of SlotType */ |
| 49 | SlotTypes slotType(SlotTypes value) override; |
| 50 | |
| 51 | /** Get value of HotPluggable */ |
| 52 | bool hotPluggable() const override; |
| 53 | |
| 54 | /** Set value of HotPluggable */ |
| 55 | bool hotPluggable(bool value) override; |
| 56 | }; |
| 57 | |
| 58 | } // namespace dbus |
| 59 | } // namespace pldm |