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 <cstddef> |
| 6 | #include <sdbusplus/bus/match.hpp> |
| 7 | #include <vector> |
| 8 | |
Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 9 | namespace command |
| 10 | { |
| 11 | |
| 12 | constexpr size_t BMC_GUID_LEN = 16; |
| 13 | |
Tom Joseph | 83029cb | 2017-09-01 16:37:31 +0530 | [diff] [blame] | 14 | using Guid = std::array<uint8_t, BMC_GUID_LEN>; |
| 15 | |
Tom Joseph | 3563f8f | 2017-05-08 15:42:54 +0530 | [diff] [blame] | 16 | /** |
Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 17 | * @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 Joseph | 83029cb | 2017-09-01 16:37:31 +0530 | [diff] [blame] | 22 | Guid getSystemGUID(); |
| 23 | |
| 24 | /** |
| 25 | * @brief Register the callback to update the cache when the GUID changes |
| 26 | */ |
| 27 | void registerGUIDChangeCallback(); |
Tom Joseph | f8da32a | 2016-12-06 16:56:04 +0530 | [diff] [blame] | 28 | |
| 29 | } // namespace command |
Tom Joseph | 83029cb | 2017-09-01 16:37:31 +0530 | [diff] [blame] | 30 | |
| 31 | namespace cache |
| 32 | { |
| 33 | |
| 34 | extern command::Guid guid; |
| 35 | |
Vernon Mauery | 9e801a2 | 2018-10-12 13:20:49 -0700 | [diff] [blame] | 36 | } // namespace cache |