Logo
中文版
详情联系: neusar-support@reachauto.com
ReadWriteAccessorAPI

函数

 ara::per::ReadWriteAccessor::ReadWriteAccessor ()=delete
 The default constructor for ReadWriteAccessor shall not be used. 更多...
 
ara::core::Result< void > ara::per::ReadWriteAccessor::SyncToFile () noexcept
 Triggers flushing of the current file content to the physical storage. 更多...
 
ara::core::Result< void > ara::per::ReadWriteAccessor::SetFileSize (std::uint64_t size) noexcept
 Reduces the size of the file to ’size’, effectively removing the current content of the file beyond this size. 更多...
 
ara::core::Result< void > ara::per::ReadWriteAccessor::WriteText (ara::core::StringView s) noexcept
 Writes the content of a StringView to the file 更多...
 
ara::core::Result< void > ara::per::ReadWriteAccessor::WriteBinary (ara::core::Span< const ara::core::Byte > b) noexcept
 Writes the content of a Span of Byte to the file. 更多...
 
ReadWriteAccessorara::per::ReadWriteAccessor::operator<< (ara::core::StringView s) noexcept
 Writes the content of a StringView to the file. 更多...
 

详细描述

函数说明

◆ operator<<()

ReadWriteAccessor & ara::per::ReadWriteAccessor::operator<< ( ara::core::StringView  s)
noexcept

Writes the content of a StringView to the file.

Function Implementation

模板参数
N/A
参数
[in]sThe StringView containing the characters to be written.
[out]N/A
[in,out]N/A
返回
ReadWriteAccessor & ReadWriteAccessor对象
注解
Writes the content of a StringView to the file.This operator is just a comfort feature for non-safety critical applications. If an error occurs during this operation, it is silently ignored.
异常
N/A
Swsid
SWS_PER_00125
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadWriteAccessor @uptrace{SWS_PER_00530}

在文件 第 行定义.

◆ ReadWriteAccessor()

ara::per::ReadWriteAccessor::ReadWriteAccessor ( )
delete

The default constructor for ReadWriteAccessor shall not be used.

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
N/A
注解
The default constructor for ReadWriteAccessor shall not be used.
异常
N/A
Swsid
SWS_PER_00462
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
ara/per/readwrite_accessor.h
异常安全
N/A
分类
ara
范围
namespace ara::per::ReadWriteAccessor @uptrace{N/A}

◆ SetFileSize()

ara::core::Result< void > ara::per::ReadWriteAccessor::SetFileSize ( std::uint64_t  size)
noexcept

Reduces the size of the file to ’size’, effectively removing the current content of the file beyond this size.

Function Implementation

模板参数
N/A
参数
[in]sizeNew size of the file.
[out]N/A
[in,out]N/A
返回
ara::core::Result<void> A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
The current file position is unchanged if it is lower than ’size’, or set to the last valid position in the file otherwise. If ’size’ is 0, the current file position will also be set to 0.
异常
N/A
Swsid
SWS_PER_00428
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kInvalidSize Returned if the new size is larger than the current size.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadWriteAccessor @uptrace{SWS_PER_00532}

在文件 第 行定义.

引用了 .

函数调用图:

◆ SyncToFile()

ara::core::Result< void > ara::per::ReadWriteAccessor::SyncToFile ( )
noexcept

Triggers flushing of the current file content to the physical storage.

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
ara::core::Result<void> A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
Triggers flushing of the current file content to the physical storage.
异常
N/A
Swsid
SWS_PER_00122
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadWriteAccessor @uptrace{SWS_PER_00533}

在文件 第 行定义.

◆ WriteBinary()

ara::core::Result< void > ara::per::ReadWriteAccessor::WriteBinary ( ara::core::Span< const ara::core::Byte >  b)
noexcept

Writes the content of a Span of Byte to the file.

Function Implementation

模板参数
N/A
参数
[in]bA Span of Byte containing the bytes to be written.
[out]N/A
[in,out]N/A
返回
ara::core::Result<void> A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
The time when the content is persisted depends on the implementation of Persistency. SyncToFile can be used to force Persistency to persist the file content.
异常
N/A
Swsid
SWS_PER_00423
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kOutOfStorageSpace Returned if the available storage space is insufficient for the updated file size
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadWriteAccessor @uptrace{SWS_PER_00210, SWS_PER_00464, SWS_PER_00449, SWS_PER_00466, SWS_PER_00531}

在文件 第 行定义.

引用了 .

函数调用图:

◆ WriteText()

ara::core::Result< void > ara::per::ReadWriteAccessor::WriteText ( ara::core::StringView  s)
noexcept

Writes the content of a StringView to the file

Function Implementation

模板参数
N/A
参数
[in]sA StringView containing the characters to be written.
[out]N/A
[in,out]N/A
返回
ara::core::Result<void> A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
Writes the content of a StringView to the file.The time when the content is persisted depends on the implementation of Persistency. SyncToFile can be used to force Persistency to persist the file content.In case of an error, the file content might be corrupted, and the current position might or might not have changed
异常
N/A
Swsid
SWS_PER_00166
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kOutOfStorageSpace Returned if the available storage space is insufficient for the updated file size
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadWriteAccessor @uptrace{SWS_PER_00210, SWS_PER_00464, SWS_PER_00449, SWS_PER_00466, SWS_PER_00529}

在文件 第 行定义.

引用了 .

函数调用图: