pldm: Implement PCIeSlot interface

Adding support to host dbus PCIeSlot interface.
Based on the PDRs received from remote PLDM terminus,
PLDM hosts the dbus interface based on the entity type.
The Slot interface is defined at [1].

Tested:
    Functional test passed.

[1]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory/Item/PCIeSlot.interface.yaml

Change-Id: I98db6c31ddcb35e5c124d060c4ee0ab0f8819e72
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/host-bmc/dbus/pcie_slot.hpp b/host-bmc/dbus/pcie_slot.hpp
new file mode 100644
index 0000000..1acea80
--- /dev/null
+++ b/host-bmc/dbus/pcie_slot.hpp
@@ -0,0 +1,59 @@
+#pragma once
+
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server.hpp>
+#include <sdbusplus/server/object.hpp>
+#include <xyz/openbmc_project/Inventory/Item/PCIeSlot/server.hpp>
+
+#include <string>
+
+namespace pldm
+{
+namespace dbus
+{
+using ItemSlot = sdbusplus::server::object_t<
+    sdbusplus::xyz::openbmc_project::Inventory::Item::server::PCIeSlot>;
+
+/**
+ * @class PCIeSlot
+ * @brief PCIeSlot support includes the slot properties and functions
+ */
+class PCIeSlot : public ItemSlot
+{
+  public:
+    PCIeSlot() = delete;
+    ~PCIeSlot() = default;
+    PCIeSlot(const PCIeSlot&) = delete;
+    PCIeSlot& operator=(const PCIeSlot&) = delete;
+
+    PCIeSlot(sdbusplus::bus_t& bus, const std::string& objPath) :
+        ItemSlot(bus, objPath.c_str())
+    {}
+
+    /** Get value of Generation */
+    Generations generation() const override;
+
+    /** Set value of Generation */
+    Generations generation(Generations value) override;
+
+    /** Get value of Lanes */
+    size_t lanes() const override;
+
+    /** Set value of Lanes */
+    size_t lanes(size_t value) override;
+
+    /** Get value of SlotType */
+    SlotTypes slotType() const override;
+
+    /** Set value of SlotType */
+    SlotTypes slotType(SlotTypes value) override;
+
+    /** Get value of HotPluggable */
+    bool hotPluggable() const override;
+
+    /** Set value of HotPluggable */
+    bool hotPluggable(bool value) override;
+};
+
+} // namespace dbus
+} // namespace pldm