summaryrefslogtreecommitdiffstats
path: root/command/guid.hpp
blob: f73e4491eb8ce8a0a3099ebdd2ad25aa580266d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include "comm_module.hpp"

#include <cstddef>
#include <sdbusplus/bus/match.hpp>
#include <vector>

namespace command
{

constexpr size_t BMC_GUID_LEN = 16;

using Guid = std::array<uint8_t, BMC_GUID_LEN>;

/**
 * @brief Get System GUID
 *
 * @return If UUID is successfully read from the Chassis DBUS object, then the
 *         GUID is returned, else a canned GUID is returned
 */
Guid getSystemGUID();

/**
 *  @brief Register the callback to update the cache when the GUID changes
 */
void registerGUIDChangeCallback();

} // namespace command

namespace cache
{

extern command::Guid guid;

} // namespace cache
OpenPOWER on IntegriCloud