blob: e3ff2a02568a61c9b1e07a2cbc2d0ab2a85f3a25 [file] [log] [blame]
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -05001#pragma once
2
3#include <stdint.h>
4
5/**
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -05006 * @brief dump collection handler
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -05007 *
8 * Handle collection due to host going down
9 */
10
11namespace watchdog
12{
13namespace dump
14{
15
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050016/** @brief Dump types supported by dump request */
17enum class DumpType
18{
19 Hostboot,
20 SBE
21};
22
23/** @brief Structure for dump request parameters */
24struct DumpParameters
25{
26 uint32_t logId;
27 uint32_t unitId;
28 uint32_t timeout;
29 DumpType dumpType;
30};
31
32/** @brief Dump progress states */
33enum class DumpProgressStatus
34{
35 InProgress,
36 Completed,
37 Failed
38};
39
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -050040/**
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 Teekappanavar41d507e2021-10-05 12:17:55 -050046 * @param dumpParameters - parameters for the dump request
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -050047 *
48 */
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050049void requestDump(const DumpParameters&);
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -050050
51} // namespace dump
52} // namespace watchdog