le_wdog_common.h

Go to the documentation of this file.
1 
2 /*
3  * ====================== WARNING ======================
4  *
5  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
6  * DO NOT MODIFY IN ANY WAY.
7  *
8  * ====================== WARNING ======================
9  */
10 /**
11  * @file le_wdog_common.h
12  *
13  * Type definitions for le_wdog.
14  *
15  */
16 #ifndef LE_WDOG_COMMON_H_INCLUDE_GUARD
17 #define LE_WDOG_COMMON_H_INCLUDE_GUARD
18 
19 
20 #include "legato.h"
21 
22 #define IFGEN_LE_WDOG_PROTOCOL_ID "572ba176b790548eed89b7ba6f9f4b14"
23 #define IFGEN_LE_WDOG_MSG_SIZE 20
24 /** @addtogroup le_wdog
25  * @{ **/
26 
27 
28 //--------------------------------------------------------------------------------------------------
29 /**
30  * Suspend the watchdog so that it never times out.
31  */
32 //--------------------------------------------------------------------------------------------------
33 #define LE_WDOG_TIMEOUT_NEVER -1
34 
35 //--------------------------------------------------------------------------------------------------
36 /**
37  * Timeout immediately
38  */
39 //--------------------------------------------------------------------------------------------------
40 #define LE_WDOG_TIMEOUT_NOW 0
41 
42 //--------------------------------------------------------------------------------------------------
43 /**
44  * External watchdog kick handler
45  */
46 //--------------------------------------------------------------------------------------------------
48 (
49  void* contextPtr
50  ///<
51 );
52 
53 
54 //--------------------------------------------------------------------------------------------------
55 /**
56  * Get if this client bound locally.
57  */
58 //--------------------------------------------------------------------------------------------------
59 LE_SHARED bool ifgen_le_wdog_HasLocalBinding
60 (
61  void
62 );
63 
64 
65 //--------------------------------------------------------------------------------------------------
66 /**
67  * Init data that is common across all threads
68  */
69 //--------------------------------------------------------------------------------------------------
70 LE_SHARED void ifgen_le_wdog_InitCommonData
71 (
72  void
73 );
74 
75 
76 //--------------------------------------------------------------------------------------------------
77 /**
78  * Perform common initialization and open a session
79  */
80 //--------------------------------------------------------------------------------------------------
81 LE_SHARED le_result_t ifgen_le_wdog_OpenSession
82 (
83  le_msg_SessionRef_t _ifgen_sessionRef,
84  bool isBlocking
85 );
86 
87 //--------------------------------------------------------------------------------------------------
88 /**
89  * Kicks the watchdog timer.
90  *
91  * Once the watchdog has been kicked it must be kicked again before the expiration of the current
92  * effective timeout else the configured WatchdogAction will be executed.
93  */
94 //--------------------------------------------------------------------------------------------------
95 LE_SHARED void ifgen_le_wdog_Kick
96 (
97  le_msg_SessionRef_t _ifgen_sessionRef
98 );
99 
100 //--------------------------------------------------------------------------------------------------
101 /**
102  * Set a time out.
103  *
104  * The watchdog is kicked and a new effective timeout value is set. The new timeout will be
105  * effective until the next kick at which point it will revert to the original value.
106  */
107 //--------------------------------------------------------------------------------------------------
108 LE_SHARED void ifgen_le_wdog_Timeout
109 (
110  le_msg_SessionRef_t _ifgen_sessionRef,
111  int32_t milliseconds
112  ///< [IN] The number of milliseconds until this timer expires
113 );
114 
115 //--------------------------------------------------------------------------------------------------
116 /**
117  * Get the watchdog timeout configured for this process
118  *
119  * @return
120  * - LE_OK The watchdog timeout is configured and returned
121  * - LE_NOT_FOUND The watchdog timeout is not set
122  */
123 //--------------------------------------------------------------------------------------------------
124 LE_SHARED le_result_t ifgen_le_wdog_GetWatchdogTimeout
125 (
126  le_msg_SessionRef_t _ifgen_sessionRef,
127  uint64_t* millisecondsPtr
128  ///< [OUT] The watchdog timeout set for this process
129 );
130 
131 //--------------------------------------------------------------------------------------------------
132 /**
133  * Get the max watchdog timeout configured for this process
134  *
135  * @return
136  * - LE_OK The max watchdog timeout is configured and returned
137  * - LE_NOT_FOUND The max watchdog timeout is not set
138  */
139 //--------------------------------------------------------------------------------------------------
140 LE_SHARED le_result_t ifgen_le_wdog_GetMaxWatchdogTimeout
141 (
142  le_msg_SessionRef_t _ifgen_sessionRef,
143  uint64_t* millisecondsPtr
144  ///< [OUT] The max watchdog timeout set for this process
145 );
146 /** @} **/
147 #endif // LE_WDOG_COMMON_H_INCLUDE_GUARD
#define LE_SHARED
Definition: le_basics.h:300
le_result_t
Definition: le_basics.h:46
void(* le_wdog_ExternalWatchdogHandlerFunc_t)(void *contextPtr)
Definition: le_wdog_common.h:48
struct le_msg_Session * le_msg_SessionRef_t
Definition: le_messaging.h:860