 ///** @file
//
// IBMC Config form.
//
//  Copyright (c) 2018, Hisilicon Limited. All rights reserved.
//  Copyright (c) 2018, Linaro Limited. All rights reserved.
//  SPDX-License-Identifier: BSD-2-Clause-Patent
//
//**/
  form formid = IBMC_CONFIG_FORM_ID,
       title  = STRING_TOKEN(STR_IBMC_CONFIG_FORM_TITLE);

    oneof
        varid       = OEM_CONFIG_DATA.BmcWdtEnable,
        prompt      = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER),
        help        = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_HELP),
        option text = STRING_TOKEN(STR_DISABLE),  value = 0, flags = DEFAULT;
        option text = STRING_TOKEN(STR_ENABLE),   value = 1, flags = 0;
    endoneof;

    suppressif ideqval OEM_CONFIG_DATA.BmcWdtEnable == 0;
      numeric
        varid       = OEM_CONFIG_DATA.BmcWdtTimeout,
        prompt      = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_TIMEOUT),
        help        = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_TIMEOUT_C10_HELP),
        minimum     = 15,
        maximum     = 25,
        step        = 1,
        default     = 15,
      endnumeric;

      oneof
        varid       = OEM_CONFIG_DATA.BmcWdtAction,
        prompt      = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_ACTION),
        help        = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_ACTION_HELP),
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_NO_ACTION),   value = 0, flags = 0;
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_HARD_RESET),  value = 1, flags = DEFAULT;
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_POWER_DOWN),  value = 2, flags = 0;
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_POWER_CYCLE), value = 3, flags = 0;
      endoneof;
    endif;

    suppressif TRUE;
      oneof
        varid       = OEM_CONFIG_DATA.OSWdtEnable,
        prompt      = STRING_TOKEN(STR_BMC_OS_WATCHDOG_TIMER),
        help        = STRING_TOKEN(STR_BMC_OS_WATCHDOG_TIMER_HELP),
        option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT;
        option text = STRING_TOKEN(STR_ENABLE),  value = 1, flags = 0;
      endoneof;
    endif;

    suppressif ideqval OEM_CONFIG_DATA.OSWdtEnable == 0;
      numeric
        varid       = OEM_CONFIG_DATA.OSWdtTimeout,
        prompt      = STRING_TOKEN(STR_BMC_OS_WDT_TIMEOUT),
        help        = STRING_TOKEN(STR_BMC_OS_WDT_TIMEOUT_HELP),
        minimum     = 5,
        maximum     = 8,
        step        = 1,
        default     = 5,
      endnumeric;

      oneof
        varid       = OEM_CONFIG_DATA.OSWdtAction,
        prompt      = STRING_TOKEN(STR_BMC_OS_WDT_ACTION),
        help        = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_ACTION_HELP),
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_NO_ACTION),   value = 0, flags = 0;
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_HARD_RESET),  value = 1, flags = DEFAULT;
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_POWER_DOWN),  value = 2, flags = 0;
        option text = STRING_TOKEN(STR_BMC_WATCHDOG_TIMER_POWER_CYCLE), value = 3, flags = 0;
      endoneof;
    endif;

  endform;
