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.
18 * @brief backup_manager function header file
21 #ifndef BACKUP_MANAGER_CLIENT_INCLUDE_NATIVE_SERVICE_NS_BACKUP_H_
22 #define BACKUP_MANAGER_CLIENT_INCLUDE_NATIVE_SERVICE_NS_BACKUP_H_
24 #include <native_service/frameworkunified_types.h>
26 /** @addtogroup BaseSystem
29 /** @addtogroup native_service
33 /** @addtogroup backup_manager
34 * @ingroup native_service
39 * \~english Service availability notify
41 #define NTFY_BackupMgr_Availability "NS_BackupMgr/Availability"
44 * \~english Return value: terminated normally
46 #define BKUP_RET_NORMAL 0
49 * \~english Return value: abnormal termination(content not specified)
51 #define BKUP_RET_ERROR -1
54 * \~english Return value: parameter error
56 #define BKUP_RET_ERRPARAM -2
59 * \~english Return value: initializing
61 #define BKUP_RET_ERRINIT -3
64 * \~english Return value: terminating
66 #define BKUP_RET_ERRTERM -4
69 * \~english Return value: data does not exist
71 #define BKUP_RET_ERRNOENT -5
74 * \~english Return value: data size error
76 #define BKUP_RET_ERRSIZE -6
84 * \ingroup Backup_DataRd
85 * \~english @par Brief
86 * Read data from backup area
87 * \~english @param [in] tagID
88 * PCSTR - Area ID(character string of less than 64 bytes)
89 * \~english @param [in] uiOffset
90 * uint32_t - Offset from the beginning of the area(0~size of backup area identified by area ID)
91 * \~english @param [out] pvBuf
92 * void * - A pointer which point to buffer used to storage read data
93 * \~english @param [in] uiSize
94 * uint32_t - Read data size(0~size of backup area identified by area ID)
95 * \~english @retval BKUP_RET_NORMAL Terminated normally
96 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
97 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
98 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
99 * \~english @retval BKUP_RET_ERRNOENT Data dose not exist(Sync message transmission or reception(@ref McInvokeSync) fails [eFrameworkunifiedStatusFileLoadError])
100 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
101 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
102 * \~english @par Prerequisite
104 * \~english @par Change of internal state
105 * - Change of internal state according to the API does not occur.
106 * \~english @par Conditions of processing failure
107 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
108 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
109 * - If the buffer point(pvBuf) specified by the argument is NULL [BKUP_RET_ERRPARAM]
110 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
111 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
112 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
113 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
114 * - Sync message transmission or reception(@ref McInvokeSync) error
115 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
116 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
117 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
118 * - If the return value is eFrameworkunifiedStatusFileLoadError [BKUP_RET_ERRNOENT]
119 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
120 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
121 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
122 * - If the return value is other value [BKUP_RET_ERROR]
123 * - If the size specified by the argument does not match the actual read size [BKUP_RET_ERROR]
124 * \~english @par Detail
125 Judge the type and access destination according to specified area ID and then read data.
126 * - If appointed size is less than registered size, read data of appointed size. [BKUP_RET_NORMAL]
127 * - If the backup data does not exist, buffer is filled 0. [BKUP_RET_NORMAL]
129 * \~english @par Classification
131 * \~english @par Type
136 int32_t Backup_DataRd(PCSTR tag_id, uint32_t ui_offset, void *pv_buf, uint32_t ui_size);
138 * \ingroup Backup_DataWt
139 * \~english @par Brief
140 * Write data to backup area
141 * \~english @param [in] tagID
142 * PCSTR - Area ID(character string of less than 64 bytes)
143 * \~english @param [in] pvBuf
144 * void * - A pointer which point to buffer used to storage write data
145 * \~english @param [in] uiOffset
146 * uint32_t - Offset from the beginning of the area(0~size of backup area identified by area ID)
147 * \~english @param [in] uiSize
148 * uint32_t - Write data size(0~size of backup area identified by area ID)
149 * \~english @retval BKUP_RET_NORMAL Terminated normally
150 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
151 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
152 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
153 * \~english @retval BKUP_RET_ERRNOENT Data dose not exist(Sync message transmission or reception(@ref McInvokeSync) fails [eFrameworkunifiedStatusFileLoadError])
154 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
155 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
156 * \~english @par Prerequisite
158 * \~english @par Change of internal state
159 * - Change of internal state according to the API does not occur.
160 * \~english @par Conditions of processing failure
161 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
162 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
163 * - If the buffer point(pvBuf) specified by the argument is NULL [BKUP_RET_ERRPARAM]
164 * - If system call(mmap()) is error [BKUP_RET_ERROR]
165 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
166 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
167 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
168 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
169 * - Sync message transmission or reception(@ref McInvokeSync) error
170 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
171 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
172 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
173 * - If the return value is eFrameworkunifiedStatusFileLoadError [BKUP_RET_ERRNOENT]
174 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
175 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
176 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
177 * - If the return value is other value [BKUP_RET_ERROR]
178 * - If the size specified by the argument does not match the actual read size [BKUP_RET_ERROR]
179 * \~english @par Detail
180 * Judge the storage media type and access destination according to specified area ID and then write data.
181 * Calling @ref Backup_DataWt more than once for the same ID when writing data separately.
182 * Data integrity can not be guaranteed at power interruption.
183 * Data should be written at one time to guarantee data consistency.
184 * The work life of writing times depends on how the user writes,NS_BackupMgr doesn't guaranteed.
185 * \~english @par Classification
187 * \~english @par Type
192 int32_t Backup_DataWt(PCSTR tag_id, void *pv_buf, uint32_t ui_offset, uint32_t ui_size);
196 * \ingroup Backup_DataFil
197 * \~english @par Brief
198 * Write data to backup area with the specified pattern
199 * \~english @param [in] tagID
200 * PCSTR - Area ID(character string of less than 64 bytes)
201 * \~english @param [in] uiOffset
202 * uint32_t - Offset from the beginning of the area(0~size of backup area identified by area ID)
203 * \~english @param [in] ucPat
204 * uint8_t - Write pattern data(0x00~0xff)
205 * \~english @param [in] uiSize
206 * uint32_t - Write data size(0~size of backup area identified by area ID)
207 * \~english @retval BKUP_RET_NORMAL Terminated normally
208 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
209 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
210 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
211 * \~english @retval BKUP_RET_ERRNOENT Data dose not exist(Sync message transmission or reception(@ref McInvokeSync) fails [eFrameworkunifiedStatusFileLoadError])
212 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
213 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
214 * \~english @par Prerequisite
216 * \~english @par Change of internal state
217 * - Change of internal state according to the API does not occur.
218 * \~english @par Conditions of processing failure
219 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
220 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
221 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
222 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
223 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
224 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
225 * - Sync message transmission or reception(@ref McInvokeSync) error
226 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
227 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
228 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
229 * - If the return value is eFrameworkunifiedStatusFileLoadError [BKUP_RET_ERRNOENT]
230 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
231 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
232 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
233 * - If the return value is other value [BKUP_RET_ERROR]
234 * - If the size specified by the argument does not match the actual read size [BKUP_RET_ERROR]
235 * \~english @par Detail
236 * Judge the type and access destination according to specified area ID and then fill it with the specified pattern.
237 * The work life of writing times depends on how the usrs writes,NS_BackupMgr doesn't guaranteed.
238 * \~english @par Classification
240 * \~english @par Type
245 int32_t Backup_DataFil(PCSTR tag_id, uint32_t ui_offset, uint8_t uc_pat, uint32_t ui_size);
249 * \ingroup Backup_DataSz
250 * \~english @par Brief
251 * Get the size of the backup area.
252 * \~english @param [in] tagID
253 * PCSTR - Area ID(character string of less than 64 bytes)
254 * \~english @param [out] puiSize
255 * uint32_t * - A pointer which point to storage size
256 * \~english @retval BKUP_RET_NORMAL Terminated normally
257 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
258 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
259 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
260 * \~english @retval BKUP_RET_ERRNOENT Data dose not exist(Sync message transmission or reception(@ref McInvokeSync) fails [eFrameworkunifiedStatusFileLoadError])
261 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
262 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
263 * \~english @par Prerequisite
265 * \~english @par Change of internal state
266 * - Change of internal state according to the API does not occur.
267 * \~english @par Conditions of processing failure
268 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
269 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
270 * - If the pointer(puiSize) that stores the size specified by the argument is NULL [BKUP_RET_ERRPARAM]
271 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
272 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
273 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
274 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
275 * - Sync message transmission or reception(@ref McInvokeSync) error
276 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
277 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
278 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
279 * - If the return value is eFrameworkunifiedStatusFileLoadError [BKUP_RET_ERRNOENT]
280 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
281 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
282 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
283 * - If the return value is other value [BKUP_RET_ERROR]
284 * - If the size specified by the argument does not match the actual size [BKUP_RET_ERROR]
285 * \~english @par Detail
286 * Judge the type and access destination according to specified area ID and acquire the size of the target data.
287 * \~english @par Classification
289 * \~english @par Type
294 int32_t Backup_DataSz(PCSTR tag_id, uint32_t *pui_size);
297 * \ingroup Backup_DataRdByNumID
298 * \~english @par Brief
299 * Read data from backup area
300 * \~english @param [in] numID
301 * uint32_t - Area ID specified by number
302 * \~english @param [in] uiOffset
303 * uint32_t - Offset from the beginning of the area(0~size of backup area identified by area ID)
304 * \~english @param [out] pvBuf
305 * void * - A pointer which point to buffer used to storage read data
306 * \~english @param [in] uiSize
307 * uint32_t - Read data size(0~size of backup area identified by area ID)
308 * \~english @retval BKUP_RET_NORMAL Terminated normally
309 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
310 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
311 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
312 * \~english @retval BKUP_RET_ERRNOENT Data dose not exist(Sync message transmission or reception(@ref McInvokeSync) fails [eFrameworkunifiedStatusFileLoadError])
313 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
314 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
315 * \~english @par Prerequisite
317 * \~english @par Change of internal state
318 * - Change of internal state according to the API does not occur.
319 * \~english @par Conditions of processing failure
320 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
321 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
322 * - If the buffer point(pvBuf) specified by the argument is NULL [BKUP_RET_ERRPARAM]
323 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
324 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
325 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
326 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
327 * - Sync message transmission or reception(@ref McInvokeSync) error
328 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
329 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
330 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
331 * - If the return value is eFrameworkunifiedStatusFileLoadError [BKUP_RET_ERRNOENT]
332 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
333 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
334 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
335 * - If the return value is other value [BKUP_RET_ERROR]
336 * - If the size specified by the argument does not match the actual read size [BKUP_RET_ERROR]
337 * \~english @par Detail
338 * Judge the type and access destination according to specified area ID and then read data.
339 * Backup Non-volatile Data Read API for DIAG
340 * Use from the module other than DIAG is prohibited.
342 * \~english @par Classification
344 * \~english @par Type
349 int32_t Backup_DataRdByNumID(uint32_t num_id, uint32_t ui_offset, void *pv_buf, uint32_t ui_size);
353 * \ingroup Backup_DataSzByNumID
354 * \~english @par Brief
355 * Get the size of the backup area.
356 * \~english @param [in] numID
357 * uint32_t - Area ID specified by number
358 * \~english @param [out] puiSize
359 * uint32_t * - A pointer which point to storage size
360 * \~english @retval BKUP_RET_NORMAL Terminated normally
361 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
362 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
363 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
364 * \~english @retval BKUP_RET_ERRNOENT Data dose not exist(Sync message transmission or reception(@ref McInvokeSync) fails [eFrameworkunifiedStatusFileLoadError])
365 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
366 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
367 * \~english @par Prerequisite
369 * \~english @par Change of internal state
370 * - Change of internal state according to the API does not occur.
371 * \~english @par Conditions of processing failure
372 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
373 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
374 * - If the pointer(puiSize) that stores the size specified by the argument is NULL [BKUP_RET_ERRPARAM]
375 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
376 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
377 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
378 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
379 * - Sync message transmission or reception(@ref McInvokeSync) error
380 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
381 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
382 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
383 * - If the return value is eFrameworkunifiedStatusFileLoadError [BKUP_RET_ERRNOENT]
384 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
385 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
386 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
387 * - If the return value is other value [BKUP_RET_ERROR]
388 * - If the size specified by the argument does not match the actual size [BKUP_RET_ERROR]
389 * \~english @par Detail
390 * Judge the type and access destination according to specified area ID and acquire the size of the target data.
391 * Get Non-volatile backup data size API for DIAG
392 * Use from the module other than DIAG is prohibited.
393 * \~english @par Classification
395 * \~english @par Type
400 int32_t Backup_DataSzByNumID(uint32_t num_id, uint32_t *pui_size);
403 * \ingroup Backup_DataChk
404 * \~english @par Brief
406 * \~english @param [in] tagID
407 * PCSTR - Area ID(character string of less than 64 bytes)
408 * \~english @retval BKUP_RET_NORMAL Terminated normally
409 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
410 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
411 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
412 * \~english @retval BKUP_RET_ERRNOENT Data dose not exist(Sync message transmission or reception(@ref McInvokeSync) fails [eFrameworkunifiedStatusFileLoadError])
413 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
414 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
415 * \~english @par Prerequisite
417 * \~english @par Change of internal state
418 * - Change of internal state according to the API does not occur.
419 * \~english @par Conditions of processing failure
420 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
421 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
422 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
423 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
424 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
425 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
426 * - Sync message transmission or reception(@ref McInvokeSync) error
427 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
428 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
429 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
430 * - If the return value is eFrameworkunifiedStatusFileLoadError [BKUP_RET_ERRNOENT]
431 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
432 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
433 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
434 * - If the return value is other value [BKUP_RET_ERROR]
435 * - If the size specified by the argument does not match the actual read size [BKUP_RET_ERROR]
436 * \~english @par Detail
437 * Judge the type and access destination according to specified area ID and check the target data.
438 * \~english @par Classification
440 * \~english @par Type
445 int32_t Backup_DataChk(PCSTR tag_id);
448 * \ingroup Backup_DataDel
449 * \~english @par Brief
450 * Delete backup data.
451 * \~english @param [in] tag_id
452 * PCSTR - Area ID(character string of less than 64 bytes)
453 * \~english @retval BKUP_RET_NORMAL Terminated normally
454 * \~english @retval BKUP_RET_ERRPARAM Parameter error(Sync message transmission or reception(@ref McInvokeSync) error[eFrameworkunifiedStatusInvldParam])
455 * \~english @retval BKUP_RET_ERRINIT Initializing(Sync message send or receive(@ref McInvokeSync) error [eFrameworkunifiedStatusErrOther])
456 * \~english @retval BKUP_RET_ERRTERM Terminating(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusExit])
457 * \~english @retval BKUP_RET_ERRSIZE Data size error(Sync message transmission or reception(@ref McInvokeSync) error [eFrameworkunifiedStatusAccessError])
458 * \~english @retval BKUP_RET_ERROR Abnormal termination(@ref McOpenSender failed, or sync message transmission or reception(@ref McInvokeSync) error other than the above)
459 * \~english @par Prerequisite
461 * \~english @par Change of internal state
462 * - Change of internal state according to the API does not occur.
463 * \~english @par Conditions of processing failure
464 * - If the area ID(tagID) specified by the argument is NULL [BKUP_RET_ERRPARAM]
465 * - If the area ID(tagID) specified by the argument is 64 bytes or more than 64 bytes [BKUP_RET_ERRPARAM]
466 * - If system call(pctrl(PR_GET_NAME)) is error [BKUP_RET_ERROR]
467 * - If failed to open the message queue for transmission [BKUP_RET_ERROR]
468 * - If failed to genarate message queue name for synchronous communication [BKUP_RET_ERROR]
469 * - If failed to open the reception message queue for synchronous communication [BKUP_RET_ERROR]
470 * - Sync message transmission or reception(@ref McInvokeSync) error
471 * - If the return value is eFrameworkunifiedStatusInvldParam [BKUP_RET_ERRPARAM]
472 * - If the return value is eFrameworkunifiedStatusErrOther [BKUP_RET_ERRINIT]
473 * - If the return value is eFrameworkunifiedStatusExit [BKUP_RET_ERRTERM]
474 * - If the return value is eFrameworkunifiedStatusAccessError [BKUP_RET_ERRSIZE]
475 * - If the return value is eFrameworkunifiedStatusFail, it call will synchronization message transmission(@ref McInvokeSync) again after 100 milliseconds later
476 * If the return value is eFrameworkunifiedStatusFail, it will retry BKUP_RETRY_MAX(10) times
477 * - If the return value is other value [BKUP_RET_ERROR]
478 * \~english @par Detail
479 * Judge the type and access destination according to specified area ID and delete the target data.
480 * - If the target data does not exist, return value is terminated normally. [BKUP_RET_NORMAL]
481 * \~english @par Classification
483 * \~english @par Type
488 int32_t Backup_DataDel(PCSTR tag_id);
492 #endif /*__cplusplus */
494 /**@}*/ // end of backup_manager
495 /**@}*/ // end of native_service
496 /**@}*/ // end of BaseSystem
498 #endif // BACKUP_MANAGER_CLIENT_INCLUDE_NATIVE_SERVICE_NS_BACKUP_H_