wdog_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_wdog Supervisor Watchdog API
14  *
15  * @ref wdog_interface.h "API Reference"
16  *
17  * A Supervisor API used by the Watchdog daemon to let the Supervisor know that a watched
18  * process has timed out
19  *
20  * <HR>
21  *
22  * Copyright (C) Sierra Wireless Inc.
23  */
24 /**
25  * @file wdog_interface.h
26  *
27  * Legato @ref c_wdog include file.
28  *
29  * Copyright (C) Sierra Wireless Inc.
30  */
31 
32 #ifndef WDOG_INTERFACE_H_INCLUDE_GUARD
33 #define WDOG_INTERFACE_H_INCLUDE_GUARD
34 
35 
36 #include "legato.h"
37 
38 
39 //--------------------------------------------------------------------------------------------------
40 /**
41  * Type for handler called when a server disconnects.
42  */
43 //--------------------------------------------------------------------------------------------------
44 typedef void (*wdog_DisconnectHandler_t)(void *);
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
79  * bound.
80  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
81  * - LE_COMM_ERROR if the Service Directory cannot be reached.
82  */
83 //--------------------------------------------------------------------------------------------------
85 (
86  void
87 );
88 
89 //--------------------------------------------------------------------------------------------------
90 /**
91  * Set handler called when server disconnection is detected.
92  *
93  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
94  * to continue without exiting, it should call longjmp() from inside the handler.
95  */
96 //--------------------------------------------------------------------------------------------------
98 (
99  wdog_DisconnectHandler_t disconnectHandler,
100  void *contextPtr
101 );
102 
103 //--------------------------------------------------------------------------------------------------
104 /**
105  *
106  * Disconnect the current client thread from the service providing this API.
107  *
108  * Normally, this function doesn't need to be called. After this function is called, there's no
109  * longer a connection to the service, and the functions in this API can't be used. For details, see
110  * @ref apiFilesC_client.
111  *
112  * This function is created automatically.
113  */
114 //--------------------------------------------------------------------------------------------------
116 (
117  void
118 );
119 
120 
121 //--------------------------------------------------------------------------------------------------
122 /**
123  * WatchdogTimedOut is called by the Watchdog Daemon to alert the Supervisor that a watchdog has
124  * timed out and the Supervisor should check for configured actions for that app/process and
125  * execute them.
126  */
127 //--------------------------------------------------------------------------------------------------
129 (
130  uint32_t userId,
131  ///< [IN] [IN] The Id of the user that owns the process
132  uint32_t procId
133  ///< [IN] [IN] The Id of the process that timed out
134 );
135 
136 #endif // WDOG_INTERFACE_H_INCLUDE_GUARD
void(* wdog_DisconnectHandler_t)(void *)
Definition: wdog_interface.h:44
le_result_t
Definition: le_basics.h:35
void wdog_WatchdogTimedOut(uint32_t userId, uint32_t procId)
void wdog_ConnectService(void)
le_result_t wdog_TryConnectService(void)
void wdog_DisconnectService(void)
void wdog_SetServerDisconnectHandler(wdog_DisconnectHandler_t disconnectHandler, void *contextPtr)