common_library: gettid is multiple declaration in cl_error
[staging/basesystem.git] / video_in_hal / systemservice / interface_unified / library / include / system_service / ss_power_service_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  * @file ss_power_service_protocol.h
19  * @brief \~english This file supports the Power Service interface.
20  */
21 /** @addtogroup BaseSystem
22  *  @{
23  */
24 /** @addtogroup system_service
25  *  @ingroup BaseSystem
26  *  @{
27  */
28 /** @addtogroup interface_unified
29  *  @ingroup system_service
30  *  @{
31  */
32 #ifndef POWER_SERVICE_CLIENT_INCLUDE_SYSTEM_SERVICE_SS_POWER_SERVICE_PROTOCOL_H_  // NOLINT (build/header_guard)
33 #define POWER_SERVICE_CLIENT_INCLUDE_SYSTEM_SERVICE_SS_POWER_SERVICE_PROTOCOL_H_
34
35
36 #include <native_service/frameworkunified_types.h>
37 #include <native_service/frameworkunified_service_protocol.h>
38 #include "system_service/ss_power_service.h"
39
40 /// \ingroup PSM_Local
41 /**
42  * power service protocol --> define all protocol messages in and out of power that are pertinent to the functionality offered by power.
43  */
44 typedef enum _SS_PowerServiceProtocol {
45   // Diagnostic Protocol
46   SS_POWER_PRINT_CONNECTIONS        = 0x32,   //!< client to service
47   SS_POWER_PRINT_STACK              = 0x33,   //!< client to service
48
49   SS_POWER_WAKEUP_COMPLETE          = 0x41,   //!< service to client  // used by power state machine
50   SS_POWER_SHUTDOWN_COMPLETE        = 0x42,   //!< service to client  // used by power state machine
51   SS_POWER_VOLTAGE_STATE            = 0x43,   //!< client to service
52   SS_POWER_LVI2_SHUTDOWN_COMPLETE   = 0x44,   //!< service to client
53   SS_POWER_CRANK_STATE              = 0x45,   //!< client to service
54
55
56   // System Manager commands
57   SS_POWER_WAKEUP_MODULES_CMPL_RSPN = 0x51,   //!< service to shadow
58   SS_POWER_SYSTEM_LAUNCH_COMPLETE   = 0x56,   //!< client to service
59
60
61   // SSM Service commands
62   SS_POWER_STATE_CHANGE_REQ         = 0x40,   //!< client to service : send wakeup to System Manager
63   SS_POWER_STATE_CHANGE_RESP        = 0x46,   //!< \~english Response to request of power state transition to power_supply_manager_shadow.
64
65   SS_POWER_COMM_WAKEUP              = 0x58,   //!< client to service : Power On expected
66
67   SS_POWER_SHUTDOWN_REQ             = 0x59,   //!< client to service : Comm Sleep from Shadow
68   SS_POWER_SHUTDOWN_RESP            = 0x57,   //!< service to shadow : Shutdown complete from System Manager
69
70   SS_POWER_CRNT_STATE_QUERY         = 0x60,   //!< client to service
71   SS_POWER_CRNT_STATE_QUERY_RSPN    = 0x61,   //!< service to client
72
73   SS_POWER_SYSTEM_MODE_INFO_REQ     = 0x63,   //!< Client (Shadow) to Service (Power Service)
74   SS_POWER_SYSTEM_MODE_INFO_RESP    = 0x64,   //!< Service to client *****
75
76   SS_POWER_INITCOMP_REP             = 0x70,   //!< Client (Shadow) to Service (Power Service)
77
78   //*************************************************************************
79   // CPMShowPowerPopup Notification Protocol:                               *
80   //                                                                        *
81   // Request by the Power Shadow to the Power Service to publish a          *
82   // 'Voltage State' notification.                                          *
83   //                                                                        *
84   // The Request message carries the requested notification.                *
85   // The Response message carries the EFrameworkunifiedStatus of the request.            *
86   SS_POWER_PUBLISH_POWER_POPUP_REQ,           //!< Shadow to Pwr Svc
87   SS_POWER_PUBLISH_POWER_POPUP_RESP,          //!< Pwr Svc to Shadow
88   //                                                                        *
89   // End of CPMShowPowerPopup Notification Protocol                         *
90   //*************************************************************************
91
92   //*************************************************************************
93   // Shutdown Condition Notification Protocol:                              *
94   //                                                                        *
95   // Request by the Power Shadow to the Power Service to publish the        *
96   // 'Shutdown Condition' notification.                                     *
97   //                                                                        *
98   // The Request message carries the requested PowerPopup.                  *
99   // The Response message carries the EFrameworkunifiedStatus of the request.            *
100   SS_POWER_PUBLISH_SHUTDOWN_CONDITION_REQ,    //!< Shadow to Pwr Svc
101   SS_POWER_PUBLISH_SHUTDOWN_CONDITION_RESP,   //!< Pwr Svc to Shadow
102   //                                                                        *
103   // End of Shutdown Condition Notification Protocol                        *
104   //*************************************************************************
105
106   //*************************************************************************
107   // Startup Confirmation Protocol:                                         *
108   //                                                                        *
109   // Request by the Power Shadow to the Power Service to forward to the     *
110   // System Manager the Startup Confirmation message.                       *
111   //                                                                        *
112   // The Request message carries the Startup Confirmation message.          *
113   // The Response message carries the EFrameworkunifiedStatus of the request.            *
114   SS_POWER_FWD_START_CONFIRMATION_MSG_REQ,    //!< Shadow to Pwr Svc
115   SS_POWER_FWD_START_CONFIRMATION_MSG_RESP,   //!< Pwr Svc to Shadow
116   //                                                                        *
117   // End of Startup Confirmation Protocol                                   *
118   //*************************************************************************
119
120   //*************************************************************************
121   // Power Request Protocol:                                                *
122   //                                                                        *
123   // Power Request message from the Power Shadow to the Power Service with  *
124   // _CWORD56_'s "Power_Request" IPC_Command data.                               *
125   //                                                                        *
126   // The Request message carries the _CWORD56_'s data.                           *
127   // The Response message will use the SS_POWER_STATE_CHANGE_RESP protocol  *
128   // ID.                                                                    *
129   SS_POWER_POWER_REQUEST_MSG,                 //!< Shadow to Pwr Svc
130   //                                                                        *
131   // End of Power Request Protocol                                          *
132   //*************************************************************************
133
134   //*************************************************************************
135   // Shutdown Request Protocol:                                             *
136   //                                                                        *
137   // Shutdown Request message from the Power Shadow to the Power Service    *
138   // with _CWORD56_'s "Shutdown_Request" IPC_Command data.                       *
139   //                                                                        *
140   // The Request message carries the _CWORD56_'s data.                           *
141   // The Response message will use the SS_POWER_STATE_CHANGE_RESP protocol  *
142   // ID.                                                                    *
143   SS_POWER_SHUTDOWN_REQUEST_MSG,              //!< Shadow to Pwr Svc
144   //                                                                        *
145   // End of Shutdown Request Protocol                                       *
146   //*************************************************************************
147
148   //*************************************************************************
149   // User Mode Protocol:                                                    *
150   //                                                                        *
151   // Request by the Power Service to the System Manager, originally from    *
152   // the Power Shadow, to turn on or off the video & audio output of HMI    *
153   // and Audio services.                                                    *
154   // User Mode 'On'  => turn video & audio output on                        *
155   // User Mode 'Off' => turn video & audio output off                       *
156   //                                                                        *
157   // The Request message carries the requested User Mode state.             *
158   // The Response message carries the actual User Mode state.               *
159   SS_POWER_USER_MODE_SET_RESP,                //!< Power Service to Shadow
160   //                                                                        *
161   // Note: See the corresponding Power Service / System Manager             *
162   // 'SS_SystemManagerProtocol' enums in /SystemServices/inc/               *
163   // ss_system_manager_protocol.h                                           *
164   //                                                                        *
165   // End of User Mode Protocol                                              *
166   //*************************************************************************
167
168   //*************************************************************************
169   // Heartbeat Protocol:                                                    *
170   //                                                                        *
171   // Request by the Power Service to the System Manager, originally from    *
172   // the Power Shadow, to support the heartbeat request response system.    *
173   //                                                                        *
174   // The Request message carries the expected application processor         *
175   // heartbeat response interval in units of seconds.                       *
176   // The Response message has a data length of zero and serves as a         *
177   // periodic heartbeat message to the boot micro.                          *
178   SS_POWER_HEARTBEAT_REQ,                     //!< Shadow to Power Service
179   SS_POWER_HEARTBEAT_RESP,                    //!< Power Service to Shadow
180   //                                                                        *
181   // End of Heartbeat Protocol                                              *
182   //*************************************************************************
183
184   //*************************************************************************
185   // Hard Reset Request Protocol :                                          *
186   //                                                                        *
187   // Request by the Power Service to the Shadow to support the sending of   *
188   // a reset request with type argument to the boot micro.                  *
189   //                                                                        *
190   // The Request message carries epsCpuResetReason as data payload.         *
191   SS_POWER_HARD_RESET_REQ,                    //!< Power Service to Shadow
192   //                                                                        *
193   // End of Hard Reset Request Protocol                                     *
194   //*************************************************************************
195 }SS_PowerServiceProtocol;
196
197 #endif /* POWER_SERVICE_CLIENT_INCLUDE_SYSTEM_SERVICE_SS_POWER_SERVICE_PROTOCOL_H_ */  // NOLINT (build/header_guard)
198 /** @}*/  // end of interface_unified
199 /** @}*/  // end of system_service
200 /** @}*/  // end of BaseSystem
201 // EOF