Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 3 | #include "comm_module.hpp" |
| 4 | |
Vernon Mauery | 9e801a2 | 2018-10-12 13:20:49 -0700 | [diff] [blame] | 5 | #include <sdbusplus/bus/match.hpp> |
George Liu | bc8958f | 2022-07-04 09:29:49 +0800 | [diff] [blame] | 6 | |
| 7 | #include <cstddef> |
Vernon Mauery | 9e801a2 | 2018-10-12 13:20:49 -0700 | [diff] [blame] | 8 | #include <vector> |
| 9 | |
Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 10 | namespace command |
| 11 | { |
| 12 | |
| 13 | constexpr size_t BMC_GUID_LEN = 16; |
| 14 | |
Tom Joseph | 83029cb | 2017-09-01 16:37:31 +0530 | [diff] [blame] | 15 | using Guid = std::array<uint8_t, BMC_GUID_LEN>; |
| 16 | |
Tom Joseph | 3563f8f | 2017-05-08 15:42:54 +0530 | [diff] [blame] | 17 | /** |
Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 18 | * @brief Get System GUID |
| 19 | * |
| 20 | * @return If UUID is successfully read from the Chassis DBUS object, then the |
| 21 | * GUID is returned, else a canned GUID is returned |
| 22 | */ |
Tom Joseph | 83029cb | 2017-09-01 16:37:31 +0530 | [diff] [blame] | 23 | Guid getSystemGUID(); |
| 24 | |
| 25 | /** |
| 26 | * @brief Register the callback to update the cache when the GUID changes |
| 27 | */ |
| 28 | void registerGUIDChangeCallback(); |
Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 29 | |
| 30 | } // namespace command |
Tom Joseph | 83029cb | 2017-09-01 16:37:31 +0530 | [diff] [blame] | 31 | |
| 32 | namespace cache |
| 33 | { |
| 34 | |
| 35 | extern command::Guid guid; |
| 36 | |
Vernon Mauery | 9e801a2 | 2018-10-12 13:20:49 -0700 | [diff] [blame] | 37 | } // namespace cache |