Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | |
| 5 | /** |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 6 | * @brief dump collection handler |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 7 | * |
| 8 | * Handle collection due to host going down |
| 9 | */ |
| 10 | |
| 11 | namespace watchdog |
| 12 | { |
| 13 | namespace dump |
| 14 | { |
| 15 | |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 16 | /** @brief Dump types supported by dump request */ |
| 17 | enum class DumpType |
| 18 | { |
| 19 | Hostboot, |
| 20 | SBE |
| 21 | }; |
| 22 | |
| 23 | /** @brief Structure for dump request parameters */ |
| 24 | struct DumpParameters |
| 25 | { |
| 26 | uint32_t logId; |
| 27 | uint32_t unitId; |
| 28 | uint32_t timeout; |
| 29 | DumpType dumpType; |
| 30 | }; |
| 31 | |
| 32 | /** @brief Dump progress states */ |
| 33 | enum class DumpProgressStatus |
| 34 | { |
| 35 | InProgress, |
| 36 | Completed, |
| 37 | Failed |
| 38 | }; |
| 39 | |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 40 | /** |
| 41 | * @brief Request a dump from the dump manager |
| 42 | * |
| 43 | * Request a dump from the dump manager and register a monitor for observing |
| 44 | * the dump progress. |
| 45 | * |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 46 | * @param dumpParameters - parameters for the dump request |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 47 | * |
| 48 | */ |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 49 | void requestDump(const DumpParameters&); |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 50 | |
| 51 | } // namespace dump |
| 52 | } // namespace watchdog |