An object representing one or more asynchronous I/O requests to a repository.
More...
|
| virtual | ~BatchRequest ()=default |
| |
| template<typename T> |
| void | CreateDataPoint (const DataPointPath &path, const T &initial_value, std::optional< std::reference_wrapper< const MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) |
| |
| template<typename T> |
| void | CreateDataPoint (const DataPointPath &path, const T &&initial_value, std::optional< std::reference_wrapper< const MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr)=delete |
| | Creation of datapoints from an rvalue reference is not allowed.
|
| |
| void | DeleteDataPoint (const DataPointPath &path, const CallbackType &callback=nullptr) |
| |
| void | DataPointExists (const DataPointPath &path, bool &result, const CallbackType &callback=nullptr) const |
| |
| void | GetChildren (const DataPointPath &path, std::pair< PathList, PathList > &result, bool recurse=false, const CallbackType &callback=nullptr) const |
| |
| void | GetChildren (const DataPointPath &path, std::pair< PathList, PathList > &&result, bool recurse=false, const CallbackType &callback=nullptr) const =delete |
| | Querying children with an rvalue reference for the result is not allowed.
|
| |
| template<typename T> |
| void | ReadDataPoint (const DataPointPath &path, T &buffer, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) const |
| |
| template<typename T> |
| void | ReadDataPoint (const DataPointPath &path, T &&buffer, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) const =delete |
| | Reading from a datapoint into an rvalue reference is not allowed.
|
| |
| template<typename T> |
| void | WriteDataPoint (const DataPointPath &path, const T &buffer, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) |
| |
| template<typename T> |
| void | WriteDataPoint (const DataPointPath &path, const T &&buffer, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr)=delete |
| | Writing to a datapoint from an rvalue reference is not allowed.
|
| |
| template<typename T> |
| void | PartialReadDataPoint (const DataPointPath &path, T &buffer, size_t first, size_t last, size_t d_first, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) const |
| |
| template<typename T> |
| void | PartialReadDataPoint (const DataPointPath &path, T &&buffer, size_t first, size_t last, size_t d_first, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) const =delete |
| | Reading from a datapoint into an rvalue reference is not allowed.
|
| |
| template<typename T> |
| void | PartialWriteDataPoint (const DataPointPath &path, const T &buffer, size_t first, size_t last, size_t d_first, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) |
| |
| template<typename T> |
| void | PartialWriteDataPoint (const DataPointPath &path, const T &&buffer, size_t first, size_t last, size_t d_first, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr)=delete |
| | Writing to a datapoint from an rvalue reference is not allowed.
|
| |
| void | ReadMetaData (const DataPointPath &path, MetaData &metadata, const CallbackType &callback=nullptr) const |
| |
| void | ReadMetaData (const DataPointPath &path, MetaData &&metadata, const CallbackType &callback=nullptr) const =delete |
| | Reading metadata into an rvalue reference is not allowed.
|
| |
| void | WriteMetaData (const DataPointPath &path, const MetaData &metadata, const CallbackType &callback=nullptr) |
| |
| void | CreateSymlink (const DataPointPath &dp, const DataPointPath &link, const CallbackType &callback=nullptr) |
| |
| void | UpdateSymlink (const DataPointPath &dp, const DataPointPath &link, const CallbackType &callback=nullptr) |
| |
| template<> |
| void | CreateDataPoint (const DataPointPath &path, const std::any &initial_value, std::optional< std::reference_wrapper< const MetaData > > metadata, const CallbackType &callback) |
| |
| template<> |
| void | ReadDataPointImpl (const DataPointPath &path, std::any &buffer, std::optional< std::reference_wrapper< MetaData > > metadata, const CallbackType &callback) const |
| |
| template<> |
| void | WriteDataPoint (const DataPointPath &path, const std::any &buffer, std::optional< std::reference_wrapper< MetaData > > metadata, const CallbackType &callback) |
| |
| template<> |
| void | PartialReadDataPointImpl (const DataPointPath &path, std::any &buffer, size_t first, size_t last, size_t d_first, std::optional< std::reference_wrapper< MetaData > > metadata, const CallbackType &callback) const |
| |
| template<> |
| void | PartialWriteDataPoint (const DataPointPath &path, const std::any &buffer, size_t first, size_t last, size_t d_first, std::optional< std::reference_wrapper< MetaData > > metadata, const CallbackType &callback) |
| |
An object representing one or more asynchronous I/O requests to a repository.
- Thread Safety
- thread-compatible
template<typename T>
| void rtctk::componentFramework::RepositoryIf::BatchRequest::PartialReadDataPoint |
( |
const DataPointPath & | path, |
|
|
T & | buffer, |
|
|
size_t | first, |
|
|
size_t | last, |
|
|
size_t | d_first, |
|
|
std::optional< std::reference_wrapper< MetaData > > | metadata = std::nullopt, |
|
|
const CallbackType & | callback = nullptr ) const |
@brief Add request to partially read a datapoint.
This method will add an asynchronous request to the batch request to partially read out
the contents of a datapoint with the given @p path. The data will be read from the index
@p first, i.e. the index of the first element, up to index @p last of the datapoint's
data. For this purpose the datapoint's data is interpreted as a continuous array of
elements, and it is the user's responsibility to correctly calculate these indices.
The data is written to the indicated output buffer, starting from the index @p d_first.
The output buffer is similarly interpreted as a continuous array for this purpose.
@warning The user is responsible for sizing/resizing the output buffer that receives the
data read from the datapoint. If the output buffer is too small a BufferTooSmall
exception is thrown.
@param[in] path The path of the datapoint to read.
@param[out] buffer The output buffer object that will be filled with the data read.
@param[in] first The index of the first element to read from the datapoint.
@param[in] last The index of the last element to read from the datapoint.
@param[in] d_first The index into the output buffer where the first data element should
be written.
@param[out] metadata Optional metadata that will be filled with the datapoint's metadata.
@param[in] callback Optional callback that will be invoked on completion of the request.
\par Asynchronous Exceptions
\parblock The following exceptions are <b>not</b> immediately thrown by this method. They are possibly thrown later by:<ul><li>BatchResponse::Wait</li><li> BatchResponse::WaitFor</li></ul>
when completing the repository request.
<table class="exception">
DataPointDoesNotExist
If the path does not exist in the repository.
BufferTooSmall
If the output buffer is not big enough.
AccessOutOfBounds
If the output buffer is not big enough.
ServiceFailure
When the underlying back-end system indicates an unexpected failure.
\par Thread Safety
\parblock \ref thread-safety "thread-compatible" \endparblock
\par Exception Safety
\parblock \ref exception-safety "strong" \endparblock
template<typename T>
| void rtctk::componentFramework::RepositoryIf::BatchRequest::PartialWriteDataPoint |
( |
const DataPointPath & | path, |
|
|
const T & | buffer, |
|
|
size_t | first, |
|
|
size_t | last, |
|
|
size_t | d_first, |
|
|
std::optional< std::reference_wrapper< MetaData > > | metadata = std::nullopt, |
|
|
const CallbackType & | callback = nullptr ) |
@brief Add request to partially write a datapoint.
This method will add an asynchronous request to the batch request to partially write
a datapoint with the given @p path. The data will be written from the index
@p first, i.e. the index of the first element, up to index @p last of the datapoint's
data. For this purpose the datapoint's data is interpreted as a continuous array of
elements, and it is the user's responsibility to correctly calculate these indices.
The data is written to the indicated output buffer, starting from the index @p d_first.
The output buffer is similarly interpreted as a continuous array for this purpose.
@param[in] path The path of the datapoint to write.
@param[in] buffer The input buffer object that will be filled with the data.
@param[in] first The index of the first element to write to the datapoint.
@param[in] last The index of the last element to write to the datapoint.
@param[in] d_first The index in the datapoint where the first data element should
be written.
@param[inout] metadata An optional reference to a metadata object that can be used
for writing metadata together with the value or for retrieving specific
metadata after the request has finished.
@param[in] callback Optional callback that will be invoked on completion of the request.
\par Asynchronous Exceptions
\parblock The following exceptions are <b>not</b> immediately thrown by this method. They are possibly thrown later by:<ul><li>BatchResponse::Wait</li><li> BatchResponse::WaitFor</li></ul>
when completing the repository request.
<table class="exception">
DataPointDoesNotExist
If the path does not exist in the repository.
AccessOutOfBounds
If the output buffer is not big enough.
ServiceFailure
When the underlying back-end system indicates an unexpected failure.
\par Thread Safety
\parblock \ref thread-safety "thread-compatible" \endparblock
\par Exception Safety
\parblock \ref exception-safety "strong" \endparblock