DEENESPTFRRUARHIKOZHNL

结构体 ara::per::FileInfo

[SWS_PER_00437] Upstream: RS_PER_00004, RS_AP_00122

struct FileInfo {...};

This structure contains additional information on a file returned by GetFileInfo.

Header-Datei#include "ara/per/file_storage.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per

用户指南人工智能生成

在自适应持久化模块中捆绑关于文件来源和更改的时间戳与状态信息。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: c3acbafda95f 来源 未决问题(3)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

在自适应持久化模块中捆绑关于文件来源和更改的时间戳与状态信息。

结构 ara::per::FileInfo 用作持久性文件的元数据容器,并由 GetFileInfo 返回。它提供用于创建 [SWS_PER_00441]、修改 [SWS_PER_00442] 和访问 [SWS_PER_00443] 的以纳秒为单位的基于 UTC 的时间戳,以及关于产生 [SWS_PER_00444] 和最后编辑 [SWS_PER_00445] 的状态信息。作为被动数据类型,它遵循应用程序的值语义,不提供自身的线程同步。

上下文

结构 ara::per::FileInfo 在 AUTOSAR Adaptive Platform 的模块 per(Persistency)中用作管理性文件元数据的结构化数据载体。对于通过头文件 ara/per/file_storage.h 的接口处理的文件操作,持久化模块将管理信息与实际文件内容分离。该结构作为操作 GetFileInfo 的结果提供,并在持久层与调用应用程序之间承担数据传输对象(Data Transfer Object)的功能。

在内容上,FileInfo 概括了两类属性:精确的时间记录数据,以及关于文件创建和维护的定性状态信息。时间信息包括创建时间 [SWS_PER_00441]、修改时间 [SWS_PER_00442] 以及最后访问时间 [SWS_PER_00443]。这些元数据通过描述性状态特征进行补充,这些特征描述了文件如何以及由谁创建 [SWS_PER_00444] 以及最后被修改 [SWS_PER_00445]。

生命周期

作为被动 C++ 结构(struct),FileInfo 没有独立的状态逻辑,也没有活动运行时生命周期。实例化通常在执行 GetFileInfo 期间在持久化实现内部发生。在此过程中,从底层文件系统读取元数据并传输到结构的数据字段中。向应用程序的传递推测是以值副本形式或打包在结果类型中进行,从而所有权和生命周期职责完全转移给调用组件。 问题 Q-f5a9cf72c47f805e (未决)

FileInfo 实例的生命周期绑定在应用程序声明变量的作用域;在离开作用域时,该结构会自动释放。由于 FileInfo 封装了纯数据字段且不提供内部同步机制,因此该结构不是线程安全的:当多个线程并发访问同一实例时,只要至少有一个访问是写入访问,应用程序端应该就需要显式同步。 问题 Q-139f5e8f58d3fe07 (未决)

使用路径

使用 FileInfo 的典型流程包括通过文件存储接口查询文件信息,随后由应用程序评估属性。应用程序通过调用 GetFileInfo 并指定目标文件来发起查询。成功返回后,所有元数据均可直接通过公共成员变量获取。

获取并评估文件元数据应用FileStorageFileInfoGetFileInfo(fileName)创建实例并填充字段返回 FileInfo检查时间戳和状态字段

时序图:通过 GetFileInfo 获取和评估文件元数据的典型流程。来源:[SWS_PER_00441]、[SWS_PER_00442]、[SWS_PER_00443]、[SWS_PER_00444]、[SWS_PER_00445]。

在评估时,应用程序读取时间戳:

  • creationTime 表示自 1970-01-01 UTC(Unix 纪元)以来以纳秒为单位的文件创建时间点 [SWS_PER_00441]。
  • modificationTime 以相同的纳秒格式指示最后一次内容更改的时间点 [SWS_PER_00442]。
  • accessTime 记录自 1970-01-01 UTC 以来以纳秒为单位的最后一次读取或写入访问时间点 [SWS_PER_00443]。

除了时间归属之外,应用程序还会检查属性 fileCreationState [SWS_PER_00444] 和 fileModificationState [SWS_PER_00445]。这些枚举值指示了在何种条件下以及由谁创建或修改了文件。这允许应用程序在对文件内容执行进一步读取或写入操作之前,验证文件是在生产运行中、恢复过程中还是通过更新过程常规创建的。

本类指南由 AI 助手根据 Release R25-11 的 AUTOSAR 规范生成。

成员图

类图

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__per__FileInfo503 «struct» FileInfo + accessTime + creationTime + fileCreationState + fileModificationState + modificationTime

详细视图

请在大纲中选择一个条目。

常量

accessTime 变量

Time in nanoseconds since midnight 1970-01-01 UTC at which the file was last accessed.

std::uint64_t accessTime;

Time in nanoseconds since midnight 1970-01-01 UTC at which the file was created.

std::uint64_t creationTime;

Information on how and by whom the file was created.

FileCreationState fileCreationState;

Information on how and by whom the file was last modified.

FileModificationState fileModificationState;

Time in nanoseconds since midnight 1970-01-01 UTC at which the file was last modified.

std::uint64_t modificationTime;

常量 / 变量文档

变量 accessTime [SWS_PER_00443] Upstream: RS_PER_00004

std::uint64_t accessTime;

Time in nanoseconds since midnight 1970-01-01 UTC at which the file was last accessed.

Header-Datei#include "ara/per/file_storage.h"
Scopestruct ara::per::FileInfo
SymbolaccessTime
Typstd::uint64_t

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00443
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00443@rel:R25-11#d44baad1
Content hash
d44baad1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00443
Status: valid/unmigrated Version: rel:R25-11#0c3b2ea7 Versionshistorie & Revisions (1 transition, 7 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_PER_00443@rel:R25-11#0c3b2ea7
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#a52f457e2026-09-30
  • R20-11rel:R20-11#c3c78f402026-10-14
  • R21-11rel:R21-11#1fd0675a2026-10-14
  • R22-11rel:R22-11#4d72990b2026-10-14
  • R23-11rel:R23-11#0c3b2ea72026-10-14
  • R24-11rel:R24-11#0c3b2ea72026-10-14
  • R25-11rel:R25-11#0c3b2ea72026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

变量 creationTime [SWS_PER_00441] Upstream: RS_PER_00004

std::uint64_t creationTime;

Time in nanoseconds since midnight 1970-01-01 UTC at which the file was created.

Header-Datei#include "ara/per/file_storage.h"
Scopestruct ara::per::FileInfo
SymbolcreationTime
Typstd::uint64_t

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00441
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00441@rel:R25-11#18cd553d
Content hash
18cd553d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00441
Status: valid/unmigrated Version: rel:R25-11#128ec43c Versionshistorie & Revisions (1 transition, 7 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_PER_00441@rel:R25-11#128ec43c
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#87034c822026-09-30
  • R20-11rel:R20-11#abb3400d2026-10-14
  • R21-11rel:R21-11#406c80992026-10-14
  • R22-11rel:R22-11#9868f2512026-10-14
  • R23-11rel:R23-11#3b4c30052026-10-14
  • R24-11rel:R24-11#3b4c30052026-10-14
  • R25-11rel:R25-11#128ec43c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

变量 fileCreationState [SWS_PER_00444] Upstream: RS_PER_00004

FileCreationState fileCreationState;

Information on how and by whom the file was created.

Header-Datei#include "ara/per/file_storage.h"
Scopestruct ara::per::FileInfo
SymbolfileCreationState
TypFileCreationState

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00444
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00444@rel:R25-11#6a2ef5c6
Content hash
6a2ef5c6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00444
Status: valid/unmigrated Version: rel:R25-11#c8568e53 Versionshistorie & Revisions (1 transition, 7 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_PER_00444@rel:R25-11#c8568e53
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#24e1cc7d2026-09-30
  • R20-11rel:R20-11#3a13cd782026-10-14
  • R21-11rel:R21-11#3a13cd782026-10-14
  • R22-11rel:R22-11#cb985c4a2026-10-14
  • R23-11rel:R23-11#c8568e532026-10-14
  • R24-11rel:R24-11#c8568e532026-10-14
  • R25-11rel:R25-11#c8568e532026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

变量 fileModificationState [SWS_PER_00445] Upstream: RS_PER_00004

FileModificationState fileModificationState;

Information on how and by whom the file was last modified.

Header-Datei#include "ara/per/file_storage.h"
Scopestruct ara::per::FileInfo
SymbolfileModificationState
TypFileModificationState

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00445
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00445@rel:R25-11#87190740
Content hash
87190740
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00445
Status: valid/unmigrated Version: rel:R25-11#6371f418 Versionshistorie & Revisions (1 transition, 7 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_PER_00445@rel:R25-11#6371f418
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#2450e4632026-09-30
  • R20-11rel:R20-11#c2a6b5522026-10-14
  • R21-11rel:R21-11#c2a6b5522026-10-14
  • R22-11rel:R22-11#5d73b03d2026-10-14
  • R23-11rel:R23-11#6371f4182026-10-14
  • R24-11rel:R24-11#6371f4182026-10-14
  • R25-11rel:R25-11#6371f4182026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

变量 modificationTime [SWS_PER_00442] Upstream: RS_PER_00004

std::uint64_t modificationTime;

Time in nanoseconds since midnight 1970-01-01 UTC at which the file was last modified.

Header-Datei#include "ara/per/file_storage.h"
Scopestruct ara::per::FileInfo
SymbolmodificationTime
Typstd::uint64_t

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00442
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00442@rel:R25-11#3b055032
Content hash
3b055032
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00442
Status: valid/unmigrated Version: rel:R25-11#58665943 Versionshistorie & Revisions (1 transition, 7 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_PER_00442@rel:R25-11#58665943
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#0ee0f8de2026-09-30
  • R20-11rel:R20-11#1094540b2026-10-14
  • R21-11rel:R21-11#2f2714482026-10-14
  • R22-11rel:R22-11#620d66d02026-10-14
  • R23-11rel:R23-11#586659432026-10-14
  • R24-11rel:R24-11#586659432026-10-14
  • R25-11rel:R25-11#586659432026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill