1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
5 #ifndef MVNC_WATCHDOG_H
6 #define MVNC_WATCHDOG_H
10 # define WD_API extern "C"
16 * @brief default ping interval is 1 second
18 #define WATCHDOG_PING_INTERVAL_MS 1000
20 typedef struct wd_context_tag {
32 * @brief initializes watchdog context, required to be called before any other WD API calls
35 WD_API wd_error_t watchdog_init_context(wd_context *ctx);
38 * @brief creates watchdog thread, if not created, and registers new watchee device, and initialise opaque handle to it
39 * @param d - newly connected device descriptor
42 WD_API wd_error_t watchdog_register_device(wd_context *ctx, devicePrivate_t *d);
45 * @brief remove watch_dog device from the list, and might stop watchdog worker thread
46 * @return result of operation
48 WD_API wd_error_t watchdog_unregister_device(wd_context *ctx);
51 #endif // MVNC_WATCHDOG_H