2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 /************************************************************************
18 * File name : INI_API.h
19 * System name : _CWORD107_
20 * Subsystem name : Staged Start and Termination Framework
21 * Title : Staged Start and End Framework API Header Files
22 ************************************************************************/
24 #ifndef POSITIONING_CLIENT_INCLUDE_INI_API_H_
25 #define POSITIONING_CLIENT_INCLUDE_INI_API_H_
27 #include <vehicle_service/positioning_base_library.h>
33 #define INI_EXTMEM_DUM 0 /* Message buffer header extension member */
36 #define INI_SUCCESS 0 /* Normal */
37 #define INI_FALSE (-1) /* Fail */
38 #define INI_ERRNOTRDY (-2) /* No destination process(Not wakeup) */
40 /* Stage start completion notification ID related Note: ACC-OFF process completion notification is also used. */
41 #define GINI_COMPID_INI 0x00000000 /* Initial value of completion notification ID */
42 #define GINI_COMPID_MASK 0x80000000 /* Completion notification ID mask value(Startup completion or for event completion determination) */
44 /* ID for Phase Start Event Completion Notification */
46 #define INI_INITCOMP_BTCOM_PRT 0x80000001 /* BT Communication Protocol Thread Startup Complete */
47 #define INI_INITCOMP_BTCOM_MNG 0x80000002 /* BT Communication Protocol Thread Startup Complete */
48 #define INI_INITCOMP_BTCOM_RCV 0x80000004 /* BT Communication Protocol Thread Startup Complete */
49 #define INI_INITCOMP_MC_UPCHK 0x80000008 /* To receive the confirmation notice of connection between microcomputers */
51 /************************************************************************
52 ID for Phase Start Event Completion Notification (For VUP)
53 ************************************************************************/
54 #define INI_FWRDCOMP__CWORD24_ 0x80000008 /* _CWORD24_ transmission completed */
55 #define INI_FWRDCOMP_VUP 0x80000010 /* VUPLoader transmission completed */
56 #define INI_INITCOMP_MFT 0x80000020 /* Module transfer thread start completion */
57 #define INI_INITCOMP_UPCHK 0x80000040 /* Receive Start Type Confirmation Notification */
59 /* ID for Phase ACC-OFF Event Completion Notification ID */
62 /*************************************************************************
63 Note: Maintenance Precautions*
64 Initial only affects the addition and deletion of startup parameters.
65 For addition or deletion of shared memory creation,The primary of each process is also affected
66 *************************************************************************/
69 GINI_STEPFORK_INI = 0, /* Initial state */
70 GINI_STEPFORK_COMMEM, /* Shared Memory Generation */
71 GINI_STEPFORK_FIRST, /* First start */
72 GINI_STEPFORK_SECOND, /* 2nd start */
73 GINI_STEPFORK_THIRD, /* 3rd start */
74 GINI_STEPFORK_FOURTH, /* 4th start */
75 GINI_STEPFORK_BUPCHK, /* Backup Data Check/Initialization */
76 GINI_STEPFORK_FIFTH, /* 5th start */
77 GINI_STEPFORK_SIXTH, /* 6th start */
78 GINI_STEPFORK_SEVENTH, /* 7th start */
79 GINI_STEPFORK_EIGHTH, /* 8th start */
80 GINI_STEPFORK_NINTH, /* 9th start */
81 GINI_STEPFORK_TENTH, /* 10th start */
82 GINI_STEPFORK_ELEVENTH, /* 11th start */
83 GINI_STEPFORK_TWELFTH, /* 12th start */
84 GINI_STEPFORK_THIRTEENTH, /* 13th start */
85 GINI_STEPFORK_FOURTEENTH, /* 14th start */
86 GINI_STEPFORK_FIFTEENTH, /* 15th Start */
87 GINI_STEPFORK_SIXTEENTH, /* 16th start */
88 GINI_STEPFORK_SEVENTEENTH, /* 17th Start */
89 GINI_STEPFORK_EIGHTEENTH, /* 18th Start */
90 GINI_STEPFORK_MAX /* Total number of startup phases */
96 GINI_ACCOFF_INI = 0, /* Early stage(Normal state) */
97 GINI_ACCOFF_FIRST, /* Stage 1 */
98 GINI_ACCOFF_SECOND, /* Step 2 */
99 GINI_ACCOFF_THIRD, /* Step 3 */
100 GINI_ACCOFF_FOURTH, /* Step 4 */
101 GINI_ACCOFF_FIFTH, /* Step 5 */
102 GINI_ACCOFF_MAX /* Total number of ACC-OFF steps */
105 /* Backup data check process type */
107 INI_BUPCHK_SRAM_INIT = 0, /* Initialization of SRAM */
108 INI_BUPCHK_SRAM_CHK, /* SRAM range-checking process */
109 INI_BUPCHK_USER_INIT, /* Initialization of personal information */
110 INI_BUPCHK_DRAM_INIT /* Initializing DRAM backups */
114 /*************************************************
115 Startup identification
116 *************************************************/
118 INI_CND_UNSET = 0, /* Startup identification value not set */
119 INI_CND_UNKNOWN, /* Startup identification unknown */
120 INI_CND_CLSTART, /* COLD START */
121 INI_CND_HTSTART, /* HOT START */
122 INI_CND_ERRRESET, /* Error Reset */
123 INI_CND_USERCL /* User-specified COLD */
126 /*************************************************
127 Startup Security State
128 *************************************************/
130 INI_ANTITHEFT_UNSET = 0, /* Not set condition */
131 INI_ANTITHEFT_UNLOCK, /* Unlocked status */
132 INI_ANTITHEFT_LOCK, /* Lock state */
133 INI_ANTITHEFT_INITIAL /* Initial state(Not used) */
136 /*************************************************
137 Version upgrade completion information
138 *************************************************/
140 INI_VUP_INFO_UNSET = 0, /* VUP information not set */
141 INI_VUP_INFO_NORMAL, /* VUP Information Normal(VUP not executed) */
142 INI_VUP_INFO_ERROR, /* VUP information error(VUP incomplete) */
143 INI_VUP_INFO_VUPFIN /* Completion of VUP information */
146 /*************************************************
147 +B Disconnect Information
148 *************************************************/
150 INI_BATTERY_INFO_UNSET = 0, /* +B Information not set */
151 INI_BATTERY_INFO_NORMAL, /* +B Information Normal(no disconnected) */
152 INI_BATTERY_INFO_DISCON /* +B Information with disconnected */
155 /*************************************************
156 User information initialization information
157 *************************************************/
159 INI_INITUSERDAT_UNSET = 0, /* User information not set */
160 INI_INITUSERDAT_ON, /* Personal Information Initialization Status Setting ON */
161 INI_INITUSERDAT_OFF /* Personal information initialization status setting OFF */
164 /*************************************************
165 DRAM back-up status at startup
166 *************************************************/
168 INI_DRAMBKUP_UNSET = 0, /* DRAM back-up status not set */
169 INI_DRAMBKUP_OK, /* DRAM back-up status OK */
170 INI_DRAMBKUP_NG /* DRAM backup status NG */
173 /****** STRUCT ******/
174 /*************************************************
175 Startup system information
176 *************************************************/
178 u_int8 boot_type; /* Startup identification */
179 u_int8 security_sts; /* Startup Security State */
180 u_int8 vup_info; /* Version upgrade completion information */
181 u_int8 battery_off_info; /* +B Disconnect Information */
182 u_int8 usrdat_init_info; /* User data initialization information */
183 u_int8 dram_bup_sts; /* DRAM back-up status */
184 u_int8 reserve[2]; /* Reserved */
185 u_int32 boot_time; /* Passed Time */
191 ***** STRUCTURE *****
193 /******************************************************************************
194 * TAG : T_PRIM_FORKCOMP
195 * ABSTRACT : Stage-up completion notification structure
196 * NOTE : Body portion of messages generated from API (Staged Start Completion Notification)
197 ******************************************************************************/
199 T_APIMSG_MSGBUF_HEADER head; /* Message buffer header */
200 u_int32 id; /* ID for start phase completion notification */
203 /******************************************************************************
204 * TAG : T_PRIM_ACCOFFSTART
205 * ABSTRACT : Structures for ACC-OFF Process Instructions
206 * NOTE : Body of messages generated from API(ACC-OFF process instructions)
207 ******************************************************************************/
209 T_APIMSG_MSGBUF_HEADER head; /* Message buffer header */
210 u_int32 id; /* ID for start phase completion notification */
211 } T_PRIM_ACCOFFSTART;
213 /******************************************************************************
214 * TAG : T_PRIM_ACCOFFCOMP
215 * ABSTRACT : Structures for notifying completion of ACC-OFF process
216 * NOTE : Main body of messages generated from API(ACC-OFF process completion notification)
217 ******************************************************************************/
219 T_APIMSG_MSGBUF_HEADER head; /* Message buffer header */
220 u_int32 id; /* Identifier for notifying completion of ACC-OFF process */
223 /******************************************************************************
224 * TAG : T_PRIM_INTERNAL_ACCOFFSTART
225 * ABSTRACT : Structures for in-function ACC-OFF indication
226 * NOTE : Body portion of messages generated from API (notification of completion of ACC-OFF process in function)
227 ******************************************************************************/
229 T_APIMSG_MSGBUF_HEADER head; /* Message buffer header */
230 u_int32 id; /* Identifier for notifying completion of ACC-OFF process */
231 } T_PRIM_INTERNAL_ACCOFFSTART;
233 /******************************************************************************
234 * TAG : T_PRIM_INTERNAL_ACCOFFCOMP
235 * ABSTRACT : Structures for notifying completion of ACC-OFF in functions
236 * NOTE : Body portion of messages generated from NOTEAPI (notification of completion of ACC-OFF process in function)
237 ******************************************************************************/
239 T_APIMSG_MSGBUF_HEADER head; /* Message buffer header */
240 u_int32 id; /* Identifier for notifying completion of ACC-OFF process */
241 } T_PRIM_INTERNAL_ACCOFFCOMP;
244 ***** PROTOTYPE *****
250 int32 IniInternalAccOffComp(PNO pno , u_int32 id);
251 void IniNotifyInit_CWORD69_Comp(void);
252 void IniWaitInit_CWORD69_Comp(void);
253 BOOL IniIsInit_CWORD69_Comp(void);
259 #endif // POSITIONING_CLIENT_INCLUDE_INI_API_H_