// Copyright (c) 2023 Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.

/** @cond */
include "IWatchdog.idl"
/** @endcond */

/**
 * @file IWatchdogFactory.idl
 *
 * IWatchdogFactory can be used to a create a new instance of a watchdog,
 * which will instigate certain actions if not pet within a certain time
 * (for example, resetting the device).
 *
 */

/** @cond */
interface IWatchdogFactory {
/** @endcond */

  /**
   * @addtogroup IWatchdogFactory
   * @{
   */

  /** List of watchdog actions which occur upon watchdog expiration */

  /** Reset the device */
  const uint8 ACTION_RESET_DEVICE = 0x01;

  /**
   * Create a new watchdog instance.  This starts the watchdog timer.
   * The watchdog can be disabled by releasing the wdog object.
   *
   * @param[in] action - The action taken when the watchdog expires.
                         Use IWatchdogFactory_ACTION_* const values from above.
   * @param[in] interval - The time allowed in milliseconds between pets
                           before the watchdog expires and action is taken.
   * @param[out] wdog - Object reference for the newly created Watchdog instance.
   *
   */
  method newWdog(in uint8 action,
                 in uint64 interval,
                 out IWatchdog wdog);

  /** @} */
};

