blob: 986c3b244b5459c5ae6fda37a11e6aa5ea2e9eea [file] [log] [blame]
Feist, Jamesc95cf672019-08-29 16:10:35 -07001/*
2// Copyright (c) 2019 Intel Corporation
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15*/
16
17#include <cstdint>
18#include <string>
19#include <variant>
20#include <vector>
21
22using GetSubTreeType = std::vector<
23 std::pair<std::string,
24 std::vector<std::pair<std::string, std::vector<std::string>>>>>;
25using BasicVariantType =
26 std::variant<std::vector<std::string>, std::string, int64_t, uint64_t,
27 double, int32_t, uint32_t, int16_t, uint16_t, uint8_t, bool>;
James Feist0b236ab2019-10-02 09:09:16 -070028using Association = std::tuple<std::string, std::string, std::string>;
Feist, Jamesc95cf672019-08-29 16:10:35 -070029
30namespace mapper
31{
32constexpr const char* busName = "xyz.openbmc_project.ObjectMapper";
33constexpr const char* path = "/xyz/openbmc_project/object_mapper";
34constexpr const char* interface = "xyz.openbmc_project.ObjectMapper";
35constexpr const char* subtree = "GetSubTree";
36} // namespace mapper
37
38namespace entityManager
39{
40constexpr const char* busName = "xyz.openbmc_project.EntityManager";
41} // namespace entityManager
42
43namespace inventory
44{
45constexpr const char* interface = "xyz.openbmc_project.Inventory.Item";
46} // namespace inventory
47
James Feist09dd2312019-10-09 09:29:03 -070048namespace ledGroup
49{
50constexpr const char* interface = "xyz.openbmc_project.Led.Group";
51constexpr const char* asserted = "Asserted";
52} // namespace ledGroup
53
Feist, Jamesc95cf672019-08-29 16:10:35 -070054namespace hsbp
55{
56enum class registers : uint8_t
57{
58 fpgaIdH = 0x0,
59 fpgaIdL = 0x1,
60 typeId = 0x2,
61 bootVer = 0x3,
62 fpgaVer = 0x4,
63 securityRev = 0x5,
64 funSupported = 0x6,
65 numDisks = 0x7,
66 presence = 0x8,
67 ssdIFDET = 0x9,
68 ifdetPart = 0xA,
69 statusLocate = 0xB,
70 statusFail = 0xC,
71 statusRebuild = 0xD,
72 ledOverride = 0xE,
73 ledStatus = 0xF,
74 ledPattern0 = 0x10,
75 ledPattern1 = 0x11,
76 ledPattern2 = 0x12,
77 ledPattern3 = 0x13,
78 ledPattern4 = 0x14,
79 ledPattern5 = 0x15,
80 ledPattern6 = 0x16,
81 ledPattern7 = 0x17,
82};
83
84} // namespace hsbp