1 /*
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 
22 using GetSubTreeType = std::vector<
23     std::pair<std::string,
24               std::vector<std::pair<std::string, std::vector<std::string>>>>>;
25 using 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>;
28 using Association = std::tuple<std::string, std::string, std::string>;
29 
30 namespace mapper
31 {
32 constexpr const char* busName = "xyz.openbmc_project.ObjectMapper";
33 constexpr const char* path = "/xyz/openbmc_project/object_mapper";
34 constexpr const char* interface = "xyz.openbmc_project.ObjectMapper";
35 constexpr const char* subtree = "GetSubTree";
36 } // namespace mapper
37 
38 namespace entityManager
39 {
40 constexpr const char* busName = "xyz.openbmc_project.EntityManager";
41 } // namespace entityManager
42 
43 namespace inventory
44 {
45 constexpr const char* interface = "xyz.openbmc_project.Inventory.Item";
46 } // namespace inventory
47 
48 namespace ledGroup
49 {
50 constexpr const char* interface = "xyz.openbmc_project.Led.Group";
51 constexpr const char* asserted = "Asserted";
52 } // namespace ledGroup
53 
54 namespace hsbp
55 {
56 enum 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
85