common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / systemservice / interface_unified / library / include / system_service / ss_system_manager_protocol.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup system_manager
19 /// \file ss_system_manager_protocol.h
20 /// \brief    This file supports the System Manager client interface.
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #ifndef __SS_SYSTEM_MANAGER_PROTOCOL_H__  // NOLINT (build/header_guard)
24 #define __SS_SYSTEM_MANAGER_PROTOCOL_H__
25
26 #include <native_service/frameworkunified_types.h>
27 #include <native_service/frameworkunified_service_protocol.h>
28
29 /// \addtogroup   system_manager
30 /// @{
31
32 #define   SS_SM_MAX_MODULE_NAME_LENGTH        (256)
33 #define     SS_SM_MAX_TEST_CASE_NAME_SIZE           (128)
34 #define     SS_SM_MAX_RESP_MSG_SIZE                 (2048)
35
36 // system manager protocol --> define all protocol messages in and out of system manager
37 // that are pertinent to the functionality offered by system manager.
38 /**
39  * \~english System control protocol type.
40  */
41 typedef enum _SS_SystemManagerProtocol {
42   // System Manager - command Protocol
43     SS_SYSTEM_MANAGER_PROTOCOL_BEGINNING_INDEX = 0x800,   //!< \~english
44   SS_SM_NOTIFY_SYSTEM_LAUNCH_COMPLETE = SS_SYSTEM_MANAGER_PROTOCOL_BEGINNING_INDEX  //!< System Manager to Power manager
45   , SS_SM_PROTOCOL_INTERFACE_END          //!< \~english
46
47   // SystemManager-command Protocol
48   , SS_SM_START                           //!< \~english Normal-boot start request.
49   , SS_SM_START_COMPL_RSPN                //!< \~english Normal-boot start completion notification.
50   , SS_SM_STOP                            //!< \~english Shutdown request.
51   , SS_SM_STOP_COMPL_RSPN                 //!< \~english Shutdown completion notification.
52   // SystemManager-command Protocol
53   , SS_SM_WAKEUP_MODULES_CMPL_RSPN        //!< \~english Response to request of power state transition to power_service.(message format to use: \ref _wakeinfo "wakeInfo")
54   , SS_SM_SHUTDOWN_MODULES_CMPL_RSPN      //!< SM to power
55
56   , SS_SM_WAKEUP_MODULES                  //!< client to service
57   , SS_SM_POWER_OFF_MODULES               //!< client to service
58   , SS_SM_SHUTDOWN_MODULES                //!< client to service
59
60   , SS_SM_CRNT_STATE_QUERY                //!< client to service
61   , SS_SM_CRNT_STATE_QUERY_RSPN           //!< service to client
62   , SS_SM_SYSTEM_MODE_INFO_REQ            //!< client to service
63   , SS_SM_SYSTEM_MODE_INFO_RSPN           //!< service to client
64   , SS_SM_INITCOMP_REP                    //!< client to service
65
66   , SS_SM_PROTOCOL_OPEN_SESSION_REQ       //!< \~english
67   , SS_SM_PROTOCOL_OPEN_SESSION_ACK       //!< \~english
68
69     //*************************************************************************
70     // Get Extended Parameter Protocol                                        *
71     //                                                                        *
72     // Protocol between applications and SM                                   *
73   , SS_SM_GET_START_EXT_INFO              //!< FrameworkunifiedOnStart Extended Parameter
74   , SS_SM_GET_STOP_EXT_INFO               //!< FrameworkunifiedOnStop Extended Parameter
75     // End of Get Extended Parameter Protocol                                 *
76     //*************************************************************************
77
78   //*************************************************************************
79   // Reset Mode Protocol:                                                   *
80   //                                                                        *
81   // Request by Privileged clients to set the data reset mode:              *
82   //     None, UserData Reset or                                            *
83   //     Factory Reset                                                      *
84   //                                                                        *
85   // The Set Request message carries the requested reset Mode.              *
86   // Set Result message is not defined, because the Set Request is send by  *
87   // FrameworkunifiedInvokeSync()                                                        *
88   , SS_SM_DATA_RESET_MODE_SET_REQ         //!< Client to Service (Sys Mgr)
89   //                                                                        *
90   // End of Reset Mode Protocol                                             *
91   //*************************************************************************
92
93   //*************************************************************************
94   // Program Update Status Protocol:                                        *
95   //                                                                        *
96   // Request by Privileged clients to set the program update status:        *
97   //     None or Program Updated                                            *
98   //                                                                        *
99   // The Set Request message carries the requested program update status.   *
100   // Set Result message is not defined, because the Set Request is send by  *
101   // FrameworkunifiedInvokeSync()                                                        *
102   , SS_SM_PROG_UPDATE_STATE_SET_REQ       //!< Client to Service (Sys Mgr)
103   //                                                                        *
104   // End of Reset Mode Protocol                                             *
105   //*************************************************************************
106
107   //*************************************************************************
108   // 'CPU Reset' Protocol:                                                  *
109   //                                                                        *
110   // CPU Reset request from applications to SM and SM to PS                 *
111   //                                     /// < Client to Service when       *
112   //                     ///    message originating from    *
113   //                     ///    Application to SS\SM.       *
114   //                                     /// < Service to Client when       *
115   //                     ///    message originating from    *
116   //                     ///    SS\SM to SS\PS.             *
117   , SS_SM_CPU_RESET_REQ                   //!< \~english
118   //                                                                        *
119   // End of CPU Reset Protocol                                              *
120   //*************************************************************************
121
122   //*************************************************************************
123   // 'Local Data Reset' Protocol:                                           *
124   //                                                                        *
125   // Local Data Reset request from applications to SM.                      *
126   //                                     /// < Client to Service when       *
127   //                     ///    message originating from    *
128   //                     ///    Application to SS\SM.       *
129   , SS_SM_LOCAL_DATA_RESET_REQ            //!< \~english
130   //                                                                        *
131   // End of Local Data Reset Protocol                                        *
132   //*************************************************************************
133
134   //*************************************************************************
135   // 'Remote Data Reset' Protocol:                                          *
136   //                                                                        *
137   // Remote Data Reset request from SM to PS                                 *
138   //                                     /// < Service to Client when       *
139   //                     ///    message originating from    *
140   //                     ///    SS\SM to SS\PS.             *
141   , SS_SM_REMOTE_DATA_RESET_REQ           //!< \~english
142   //                                                                        *
143   // End of Remote Data Reset Protocol                                      *
144   //*************************************************************************
145
146
147   //*************************************************************************
148   // Startup Confirmation Protocol:                                         *
149   //                                                                        *
150   // Request by the Power Shadow to the Power Service to forward to the     *
151   // System Manager the Startup Confirmation message.                       *
152   //                                                                        *
153   // The Request message carries the Startup Confirmation message.          *
154   // The Response message carries the EFrameworkunifiedStatus of the request.            *
155   , SS_SM_FWD_STARTUP_CONFIRMATION_MSG_REQ  //!< Pwr Svc to Sys Mgr
156   , SS_SM_FWD_START_CONFIRMATION_MSG_RESP   //!< Sys Mgr to Pwr Svc
157   //                                                                        *
158   // End of Startup Confirmation Protocol                                   *
159   //*************************************************************************
160
161   //*************************************************************************
162   // Power Request Protocol:                                                *
163   //                                                                        *
164   // Power Request message from the Power Shadow to the System Manager with *
165   // _CWORD56_'s "Power_Request" IPC_Command data.                               *
166   //                                                                        *
167   // The Request message carries the _CWORD56_'s data.                           *
168   // The Response message carries the EFrameworkunifiedStatus of the request.            *
169   , SS_SM_POWER_REQUEST_MSG               //!< \~english Startup process start request from power_service.
170   , SS_SM_POWER_REQUEST_MSG_RESP          //!< Sys Mgr to Pwr Svc
171   //                                                                        *
172   // End of Power Request Protocol                                          *
173   //*************************************************************************
174
175   //*************************************************************************
176   // User Mode Protocol:                                                    *
177   //                                                                        *
178   // Request from the Power Service to the System Manager, originally from  *
179   // the Power Shadow, to turn on or off the video & audio output of HMI    *
180   // and Audio services.                                                    *
181   // User Mode 'On'  => turn video & audio output on                        *
182   // User Mode 'Off' => turn video & audio output off                       *
183   //                                                                        *
184   // The Request message carries the requested User Mode state.             *
185   // The Response message carries the actual User Mode state.               *
186   , SS_SM_USER_MODE_SET_RESP              //!< Service (Sys Mgr) to Client (Pwr Svc)
187   //                                                                        *
188   // Note: See the corresponding Power Shadow / Power Service               *
189   // 'SS_PowerServiceProtocol' enums in                                     *
190   // /SystemServices/inc/ss_power_service_protocol.h                        *
191   // End of User Mode Protocol                                              *
192   //*************************************************************************
193
194   , SS_SM_NEXT_WAKEUP_TYPE_SET_REQ        //!< \~english
195
196     //*************************************************************************
197     // Error Event Protocol                                                   *
198     //
199     , SS_SM_EVENT_ERROR                         //!< SM  to HMI(_CWORD77_)
200     , SS_SM_EVENT_ERROR_TO_SSL                  //!< SM  to SSL
201     , SS_SM_ERROR_EVENT_LOGGING_START_REQ       //!< SSL to SM
202     , SS_SM_ERROR_EVENT_LOGGING_START_RSPN      //!< SM  to SSL
203     , SS_SM_ERROR_EVENT_ARTIFACT_REQ            //!< SSL to SM
204     , SS_SM_ERROR_EVENT_ARTIFACT_RSPN           //!< SM  to SSL
205     , SS_SM_ERROR_EVENT_LOGGING_COMPLETE        //!< SSL to SM
206     , SS_SM_ERROR_EVENT_LOGGING_COMPLETE_RSPN   //!< SM  to SSL
207
208     , SS_SM_ERROR_EVENT_TIMER_ID_LOGGER_START_REQ     //!< \~english
209     , SS_SM_ERROR_EVENT_TIMER_ID_DEBUG_DUMP_RSPN      //!< \~english
210     , SS_SM_ERROR_EVENT_TIMER_ID_BOOT_MICRO_LOG_RSPN  //!< \~english
211     , SS_SM_ERROR_EVENT_TIMER_ID_CORE_FILE_POLL       //!< \~english
212
213     , SS_SM_USER_INVOKED_LOG_REQ            //!< Key Shadow to SM
214
215     , SS_SM_ERROR_EVENT_EEL_EXPORT_REQ      //!< SSL to SM
216     , SS_SM_ERROR_EVENT_INTERFACEUNIFIED_EMMC_LOGS_REQ   //!< SSL to SM
217     , SS_SM_ERROR_EVENT_INTERFACEUNIFIED_EMMC_LOGS_RSPN  //!< SM  to SVC
218     , SS_SM_ERROR_EVENT_CLR_LOGS_REQ        //!< SVC to SM
219     , SS_SM_ERROR_EVENT_PROCESS_EXIT        //!< SM\CD to SM
220     , SS_SM_ERROR_EVENT_DIAG_LOG_REQ        //!< SSL to SM
221     , SS_SM_ERROR_EVENT_CAN_LOG_REQ         //!< SSL to SM
222     , SS_SM_ERROR_EVENT_DTC_LOG_REQ         //!< SSL to SM
223     //
224     // End of Error Event Protocol                                            *
225     //*************************************************************************
226
227   , SS_SM_GROUP_LAUNCH_TRIGGER            //!< \~english
228
229     //*************************************************************************
230     // Debug Dump Protocol                                                    *
231     //                                                                        *
232     // Protocol between applications and SM                                   *
233     , SS_SM_DEBUG_DUMP                    //!< SM to client
234     , SS_SM_DEBUG_DUMP_RSPN               //!< client to SM
235     //                                                                        *
236     // End of Debug Dump Protocol                                             *
237     //*************************************************************************
238
239     //*************************************************************************
240     // IAT Propagate Error (Module Relaunch Request)                          *
241     //                                                                        *
242     // Protocol between applications and SM                                   *
243     , SS_SM_MODULE_RELAUNCH_REQ           //!< client to SM
244     //                                                                        *
245     // End of IAT Propagate Error (Module Relaunch Request)                   *
246     //*************************************************************************
247
248     //*************************************************************************
249     // CPU High Load                                                          *
250     //                                                                        *
251     // Protocol between SS_CPU_Monitor and SM                                 *
252     , SS_SM_CPU_HIGH_LOAD_DETECTED        //!< client to SM
253     //                                                                        *
254     // End of CPU High Load                                                   *
255     //*************************************************************************
256
257     //*************************************************************************
258     // IAT Propagate Error (System Error)                                     *
259     //                                                                        *
260     // Protocol between application and SM                                    *
261     , SS_SM_PROPAGATE_SYSTEM_ERROR        //!< client to SM
262     //                                                                        *
263     // End of IAT Propagate Error (System Error)                              *
264     //*************************************************************************
265
266     //*************************************************************************
267     // _CWORD56_ HeartBeat Request Protocol                                        *
268     //                                                                        *
269     // Protocol between Power Services and SM                                 *
270     , SS_SM__CWORD56__HEARTBEAT_REQ            //!< PS to SM
271     , SS_SM__CWORD56__HEARTBEAT_RSPN           //!< SM to PS
272     //                                                                        *
273     // End of _CWORD56_ HeartBeat Request Protocol                                 *
274     //*************************************************************************
275
276     //*************************************************************************
277     // User Data Reset Event Protocol                                         *
278     //                                                                        *
279     // Protocol between SM and Service                                        *
280     , SS_SM_EVENT_USER_DATA_RESET         //!< SM to MS
281     //                                                                        *
282     // End of User Data Reset Event Protocol                                  *
283     //*************************************************************************
284
285     //*************************************************************************
286     // Boot Micro Logging Protocol                                            *
287     //                                                                        *
288     // Protocol between SS_Logger and SM.                                     *
289     , SS_SM_BOOT_MICRO_RESET_NTF          //!< Logging Shadow to SM
290     , SS_SM_BOOT_MICRO_LOG_REQ            //!< SM to Logging Shadow
291     , SS_SM_BOOT_MICRO_LOG_RSP            //!< Logging Shadow to SM  aka ENDING_INDEX
292     //                                                                        *
293     // End Boot Micro Logging Protocol                                        *
294     //*************************************************************************
295
296   // SystemManager-command Protocol
297   , SS_SM_PRE_START                    //!< \~english Pre-boot(+BA) start request.
298   , SS_SM_PRE_START_COMPL_RSPN         //!< \~english Pre-boot(+BA) start completion notification.
299   , SS_SM_PRE_STOP                     //!< \~english Pre-boot(+BA) stop request.
300   , SS_SM_PRE_STOP_COMPL_RSPN          //!< \~english Pre-boot(+BA) stop completion notification.
301   , SS_SM_BACKGROUND_START             //!< \~english Background-boot(+BA) start request.
302   , SS_SM_BACKGROUND_START_COMPL_RSPN  //!< \~english Background-boot(+BA) start completion notification.
303   , SS_SM_BACKGROUND_STOP              //!< \~english Background-boot(+BA) stop request.
304   , SS_SM_BACKGROUND_STOP_COMPL_RSPN   //!< \~english Background-boot(+BA) stop completion notification.
305
306     // UPDATE IF ANOTHER 'LAST' ENUMERATION IS ADDED !
307     , SS_SYSTEM_MANAGER_PROTOCOL_ENDING_INDEX = SS_SM_BACKGROUND_STOP_COMPL_RSPN  //!< \~english
308 } SS_SystemManagerProtocol;
309
310 typedef struct _SS_SMCurrentState {
311   CHAR  testCaseIdString[SS_SM_MAX_TEST_CASE_NAME_SIZE];
312   CHAR  respMsgString[SS_SM_MAX_RESP_MSG_SIZE];
313 }SS_SMCurrentState;
314
315 typedef struct _SMCompleteAck {
316   UI_16 unSessionId;
317   CHAR  szServiceName[MAX_QUEUE_NAME_SIZE];
318 } SMStopCompleteAck;
319
320 typedef struct _SMGroupLaunchTrigger {
321     UI_32 NextGroupId;
322 }SMGroupLaunchTrigger;
323 //*************************************************************************
324
325
326 /// @}
327
328 #endif /* __SS_SYSTEM_MANAGER_PROTOCOL_H__ */  // NOLINT (build/header_guard)
329 // EOF