函数 DeleteFile [SWS_DM_01335] Upstream: RS_Diag_04135
virtual auto DeleteFile (ara::core::String fileName, MetaInfo const &metaInfo, CancellationHandler cancellationHandler) noexcept -> ara::core::Future< void >=0;
Called for RequestFileTransfer with ModeOfOperation DeleteFile. This method is the complete operation of deleting a file
类 ara::diag::FileTransferService (SWS Diagnostics §8.18.1.2.3.1 “DeleteFile”,头文件 #include "ara/diag/file_transfer.h") 的方法 DeleteFile 在具有模式 DeleteFile 的 UDS 服务 RequestFileTransfer (0x38) 框架下处理文件的完整删除过程 [SWS_DM_01335]。该 UDS 服务在服务器端按照 ISO 14229-1 提供 [SWS_DM_01310] SWS Diagnostics §7.3.2.8.20 “Service 0x38 – RequestFileTransfer”。
调用时传递三个参数 [SWS_DM_01335]:
fileName(ara::core::String):目标文件的路径说明和名称(解释:尽管规范文本中编辑性地注明为“file to read”,但其仍指要删除的文件)。 问题 Q-cdbe1185bb030e87 (未决)metaInfo(MetaInfo const &):当前诊断请求的元信息。cancellationHandler(CancellationHandler):允许通过cancellationHandler.IsCanceled()检查取消状态,以及在当前会话中断时通过cancellationHandler.SetNotifier()注册通知函数。
作为异步结果,该函数返回一个 ara::core::Future<void> [SWS_DM_01335]。成功完成向诊断客户端指示积极的响应行为。在发生错误的情况下,必须在 Future 中通过 DiagUdsNrcErrc 提供符合 ISO 14229-1 的适用 UDS NRC [SWS_DM_01335]。
该函数被指定为 noexcept,并被视为异常安全(“exception safe”)[SWS_DM_01335]。对线程安全性的要求是有条件的,并通过传递给构造函数的 ConcurrencyType 进行控制 [SWS_DM_01335]。
本使用说明基于 AUTOSAR 规范 R25-11 自动生成。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/diag/file_transfer.h" |
|---|---|
| Scope | class ara::diag::FileTransferService |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | conditional whether the function has to be implemented thread safe or non-thread safe is determined by the ConcurrencyType given in the constructor |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| fileName | Path including name of the file to read |
| metaInfo | MetaInfo of the request. |
| cancellationHandler | This parameter is used to • Query the current cancellation status by calling cancellationHandler.IsCanceled. Returns TRUE in case, the current conversation has been cancelled and FALSE otherwise. • Register a notifier function by calling cancellationHandler.SetNotifier. The registered notifier is called if the current conversation is cancelled. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Future< void > | A Future with either a void data result to be reported to the UDS client (for a positive response message) or an UDS NRC value (for a negative response message). |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| Please use an applicable NRC, as defined in ISO 14229-1, using DiagUdsNrcErrc. | |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_DM_01335- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_DM_01335@rel:R25-11#8cf32cec- Content hash
8cf32cec- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_01335
Status: valid/unmigrated
Version: rel:R25-11#5a76fff5
Versionshistorie & Revisions (1 transition, 5 revision)
- Current State
valid/unmigrated- Reason
- mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
- Campaign
2026-08-13-status-backfill- Active Version
AUTOSAR/AP/record/SWS_DM_01335@rel:R25-11#5a76fff5
Recorded Revisions (5):
- R25-11
rel:R25-11#8332cd052026-09-30 - R22-11
rel:R22-11#36673d0f2026-10-14 - R23-11
rel:R23-11#73618cf32026-10-14 - R24-11
rel:R24-11#1c7c75ef2026-10-14 - R25-11
rel:R25-11#5a76fff52026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 德文原文