summaryrefslogtreecommitdiffstats
path: root/app/watchdog.hpp
blob: fa53ac7d8027552f79dafcc2898974f4acc3637a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once

#include <ipmid/api.hpp>

/** @brief The RESET watchdog IPMI command.
 */
ipmi::RspType<> ipmiAppResetWatchdogTimer();

/**@brief The setWatchdogTimer ipmi command.
 *
 * @param
 * - timerUse
 * - dontStopTimer
 * - dontLog
 * - timerAction
 * - pretimeout
 * - expireFlags
 * - initialCountdown
 *
 * @return completion code on success.
 **/
ipmi::RspType<> ipmiSetWatchdogTimer(
    uint3_t timerUse, uint3_t reserved, bool dontStopTimer, bool dontLog,
    uint3_t timeoutAction, uint1_t reserved1, uint3_t preTimeoutInterrupt,
    uint1_t reserved2, uint8_t preTimeoutInterval, std::bitset<8> expFlagValue,
    uint16_t initialCountdown);

/**@brief The getWatchdogTimer ipmi command.
 *
 * @return
 * - timerUse
 * - timerActions
 * - pretimeout
 * - timeruseFlags
 * - initialCountdown
 * - presentCountdown
 **/
ipmi::RspType<uint3_t, uint3_t, bool, bool,       // timerUse
              uint3_t, uint1_t, uint3_t, uint1_t, // timerAction
              uint8_t,                            // pretimeout
              std::bitset<8>,                     // expireFlags
              uint16_t, // initial Countdown - Little Endian (deciseconds)
              uint16_t  // present Countdown - Little Endian (deciseconds)
              >
    ipmiGetWatchdogTimer();
OpenPOWER on IntegriCloud