le_dualsys_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_dualsys_common.h
12  *
13  * Type definitions for le_dualsys.
14  *
15  */
16 #ifndef LE_DUALSYS_COMMON_H_INCLUDE_GUARD
17 #define LE_DUALSYS_COMMON_H_INCLUDE_GUARD
18 
19 
20 #include "legato.h"
21 
22 #define IFGEN_LE_DUALSYS_PROTOCOL_ID "69539775d6f1358ade33034c2fa222c4"
23 #define IFGEN_LE_DUALSYS_MSG_SIZE 16
24 /** @addtogroup le_dualsys
25  * @{ **/
26 
27 
28 //--------------------------------------------------------------------------------------------------
29 /**
30  * System
31  * Define on which system 1 or 2 belong the partition group (0 = system 1, 1 = system 2)
32  */
33 //--------------------------------------------------------------------------------------------------/// System 1 or 2 for MODEM sub-system
34 #define LE_DUALSYS_MODEM_GROUP 0x1/// System 1 or 2 for LK sub-system
35 #define LE_DUALSYS_LK_GROUP 0x2/// System 1 or 2 for LINUX sub-system
36 #define LE_DUALSYS_LINUX_GROUP 0x4
37 typedef uint32_t le_dualsys_System_t;
38 
39 
40 
41 //--------------------------------------------------------------------------------------------------
42 /**
43  * Get if this client bound locally.
44  */
45 //--------------------------------------------------------------------------------------------------
46 LE_SHARED bool ifgen_le_dualsys_HasLocalBinding
47 (
48  void
49 );
50 
51 
52 //--------------------------------------------------------------------------------------------------
53 /**
54  * Init data that is common across all threads
55  */
56 //--------------------------------------------------------------------------------------------------
57 LE_SHARED void ifgen_le_dualsys_InitCommonData
58 (
59  void
60 );
61 
62 
63 //--------------------------------------------------------------------------------------------------
64 /**
65  * Perform common initialization and open a session
66  */
67 //--------------------------------------------------------------------------------------------------
68 LE_SHARED le_result_t ifgen_le_dualsys_OpenSession
69 (
70  le_msg_SessionRef_t _ifgen_sessionRef,
71  bool isBlocking
72 );
73 
74 //--------------------------------------------------------------------------------------------------
75 /**
76  * Disable (true) or enable (false) the synchronisation check before performing an update.
77  * The default behavior at startup is always to have the check enabled. It remains enabled
78  * until this service is called with the value true. To re-enable the synchronization check
79  * call this service with the value false.
80  *
81  * @note Upgrading some partitions without performing a sync before may let the whole system
82  * into a unworkable state. THIS IS THE RESPONSABILITY OF THE CALLER TO KNOW WHAT IMAGES
83  * ARE ALREADY FLASHED INTO THE UPDATE SYSTEM.
84  *
85  * @note Fuction must be called after each target reboot or updateDaemon restart
86  *
87  * @return
88  * - LE_OK On success
89  * - LE_UNSUPPORTED The feature is not supported
90  * - LE_FAULT On failure
91  */
92 //--------------------------------------------------------------------------------------------------
93 LE_SHARED le_result_t ifgen_le_dualsys_DisableSyncBeforeUpdate
94 (
95  le_msg_SessionRef_t _ifgen_sessionRef,
96  bool isDisabled
97  ///< [IN] State of sync check : true (disable) or false (enable)
98 );
99 
100 //--------------------------------------------------------------------------------------------------
101 /**
102  * Define a new "system" by setting the three sub-systems. This system will become the current
103  * system in use after the reset performed by this service, if no error are reported.
104  *
105  * @note On success, a device reboot is initiated without returning any value.
106  *
107  * @return
108  * - LE_FAULT On failure
109  * - LE_UNSUPPORTED The feature is not supported
110  */
111 //--------------------------------------------------------------------------------------------------
112 LE_SHARED le_result_t ifgen_le_dualsys_SetSystem
113 (
114  le_msg_SessionRef_t _ifgen_sessionRef,
115  le_dualsys_System_t systemMask
116  ///< [IN] Sub-system bitmask for "modem/lk/linux" partitions
117 );
118 
119 //--------------------------------------------------------------------------------------------------
120 /**
121  * Get the current "system" in use.
122  *
123  * @return
124  * - LE_OK On success
125  * - LE_FAULT On failure
126  * - LE_UNSUPPORTED The feature is not supported
127  */
128 //--------------------------------------------------------------------------------------------------
129 LE_SHARED le_result_t ifgen_le_dualsys_GetCurrentSystem
130 (
131  le_msg_SessionRef_t _ifgen_sessionRef,
132  le_dualsys_System_t* systemMaskPtr
133  ///< [OUT] Sub-system bitmask for "modem/lk/linux" partitions
134 );
135 /** @} **/
136 #endif // LE_DUALSYS_COMMON_H_INCLUDE_GUARD
#define LE_SHARED
Definition: le_basics.h:287
le_result_t
Definition: le_basics.h:46
struct le_msg_Session * le_msg_SessionRef_t
Definition: le_messaging.h:860