blob: f73e4491eb8ce8a0a3099ebdd2ad25aa580266d3 [file] [log] [blame]
Tom Josephf8da32a2016-12-06 16:56:04 +05301#pragma once
2
Tom Josephf8da32a2016-12-06 16:56:04 +05303#include "comm_module.hpp"
4
Vernon Mauery9e801a22018-10-12 13:20:49 -07005#include <cstddef>
6#include <sdbusplus/bus/match.hpp>
7#include <vector>
8
Tom Josephf8da32a2016-12-06 16:56:04 +05309namespace command
10{
11
12constexpr size_t BMC_GUID_LEN = 16;
13
Tom Joseph83029cb2017-09-01 16:37:31 +053014using Guid = std::array<uint8_t, BMC_GUID_LEN>;
15
Tom Joseph3563f8f2017-05-08 15:42:54 +053016/**
Tom Josephf8da32a2016-12-06 16:56:04 +053017 * @brief Get System GUID
18 *
19 * @return If UUID is successfully read from the Chassis DBUS object, then the
20 * GUID is returned, else a canned GUID is returned
21 */
Tom Joseph83029cb2017-09-01 16:37:31 +053022Guid getSystemGUID();
23
24/**
25 * @brief Register the callback to update the cache when the GUID changes
26 */
27void registerGUIDChangeCallback();
Tom Josephf8da32a2016-12-06 16:56:04 +053028
29} // namespace command
Tom Joseph83029cb2017-09-01 16:37:31 +053030
31namespace cache
32{
33
34extern command::Guid guid;
35
Vernon Mauery9e801a22018-10-12 13:20:49 -070036} // namespace cache