le_wdog_interface.h

Go to the documentation of this file.
1 /*
2  * ====================== WARNING ======================
3  *
4  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
5  * DO NOT MODIFY IN ANY WAY.
6  *
7  * ====================== WARNING ======================
8  */
9 
10 /**
11  * @page c_wdog Watchdog Service
12  *
13  * @ref le_wdog_interface.h "API Reference"
14  *
15  * <HR>
16  *
17  * Simple watchdog service.
18  *
19  * Provides a kickable watchdog with a timeout that can be configured in <c> .adef</c> or specified at run
20  * time. If a kick is not received within the specified time, the supervisor will be signalled
21  * to perform the action specified in WatchdogAction.
22  *
23  * <HR>
24  *
25  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
26  */
27 /**
28  * @file le_wdog_interface.h
29  *
30  * Legato @ref c_wdog include file.
31  *
32  * Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
33  */
34 /**
35  * Special values that have specific meaning when used as durations in Timeout():
36  * - @ref LE_WDOG_TIMEOUT_NEVER
37  * - @ref LE_WDOG_TIMEOUT_NOW
38  */
39 
40 #ifndef LE_WDOG_INTERFACE_H_INCLUDE_GUARD
41 #define LE_WDOG_INTERFACE_H_INCLUDE_GUARD
42 
43 
44 #include "legato.h"
45 
46 //--------------------------------------------------------------------------------------------------
47 /**
48  *
49  * Connect the current client thread to the service providing this API. Block until the service is
50  * available.
51  *
52  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
53  * called before any other functions in this API. Normally, ConnectService is automatically called
54  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
55  *
56  * This function is created automatically.
57  */
58 //--------------------------------------------------------------------------------------------------
60 (
61  void
62 );
63 
64 //--------------------------------------------------------------------------------------------------
65 /**
66  *
67  * Try to connect the current client thread to the service providing this API. Return with an error
68  * if the service is not available.
69  *
70  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
71  * called before any other functions in this API. Normally, ConnectService is automatically called
72  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
73  *
74  * This function is created automatically.
75  *
76  * @return
77  * - LE_OK if the client connected successfully to the service.
78  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
79  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
80  * - LE_COMM_ERROR if the Service Directory cannot be reached.
81  */
82 //--------------------------------------------------------------------------------------------------
84 (
85  void
86 );
87 
88 //--------------------------------------------------------------------------------------------------
89 /**
90  *
91  * Disconnect the current client thread from the service providing this API.
92  *
93  * Normally, this function doesn't need to be called. After this function is called, there's no
94  * longer a connection to the service, and the functions in this API can't be used. For details, see
95  * @ref apiFilesC_client.
96  *
97  * This function is created automatically.
98  */
99 //--------------------------------------------------------------------------------------------------
101 (
102  void
103 );
104 
105 
106 //--------------------------------------------------------------------------------------------------
107 /**
108  * Suspend the watchdog so that it never times out.
109  */
110 //--------------------------------------------------------------------------------------------------
111 #define LE_WDOG_TIMEOUT_NEVER -1
112 
113 
114 //--------------------------------------------------------------------------------------------------
115 /**
116  * Timeout immediately
117  */
118 //--------------------------------------------------------------------------------------------------
119 #define LE_WDOG_TIMEOUT_NOW 0
120 
121 //--------------------------------------------------------------------------------------------------
122 /**
123  * Kicks the watchdog timer.
124  *
125  * Once the watchdog has been kicked it must be kicked again before the expiration of the current
126  * effective timeout else the configured WatchdogAction will be executed.
127  */
128 //--------------------------------------------------------------------------------------------------
129 void le_wdog_Kick
130 (
131  void
132 );
133 
134 //--------------------------------------------------------------------------------------------------
135 /**
136  * Set a time out.
137  *
138  * The watchdog is kicked and a new effective timeout value is set. The new timeout will be
139  * effective until the next kick at which point it will revert to the original value.
140  */
141 //--------------------------------------------------------------------------------------------------
142 void le_wdog_Timeout
143 (
144  int32_t milliseconds
145  ///< [IN] The number of milliseconds until this timer expires
146 );
147 
148 
149 #endif // LE_WDOG_INTERFACE_H_INCLUDE_GUARD
150 
le_result_t
Definition: le_basics.h:35
void le_wdog_Kick(void)
le_result_t le_wdog_TryConnectService(void)
void le_wdog_Timeout(int32_t milliseconds)
void le_wdog_DisconnectService(void)
void le_wdog_ConnectService(void)