|
RTC Toolkit 6.0.0
|
An object representing one or more asynchronous I/O requests to a repository. More...
#include <rtctk/componentFramework/repositoryIf.hpp>
Public Member Functions | |
| 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) |
| Add a request to create a new datapoint. | |
| 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 |
| Add request to query the child datapoints and paths for a given parent path. | |
| 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) |
| Add request to write a datapoint. | |
| 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 |
| Add request to partially read a datapoint. | |
| 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) |
| Add request to partially write a datapoint. | |
| 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) |
Protected Attributes | |
| friend | RepositoryIf |
| RequestList | m_requests |
An object representing one or more asynchronous I/O requests to a repository.
|
virtualdefault |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::CreateDataPoint | ( | const DataPointPath & | path, |
| const std::any & | initial_value, | ||
| std::optional< std::reference_wrapper< const MetaData > > | metadata, | ||
| const CallbackType & | callback ) |
|
delete |
Creation of datapoints from an rvalue reference is not allowed.
| void rtctk::componentFramework::RepositoryIf::BatchRequest::CreateDataPoint | ( | const DataPointPath & | path, |
| const T & | initial_value, | ||
| std::optional< std::reference_wrapper< const MetaData > > | metadata = std::nullopt, | ||
| const CallbackType & | callback = nullptr ) |
Add a request to create a new datapoint.
This method will add an asynchronous request to the batch request to create a new datapoint in the repository with the given path and initial value. Actual creation of the datapoint will happen once the batch request is submitted to the repository adapter with SendRequest.
| [in] | path | The path of the new datapoint. |
| [in] | initial_value | Initial value of the new datapoint. |
| [in] | metadata | Optional additional metadata to set for the new datapoint. |
| [in] | callback | Optional callback that will be invoked on completion of the request. |
| DataPointAlreadyExists | If the datapoint with the given path already exists in the repository. |
| ServiceFailure | When the underlying back-end system indicates an unexpected failure. |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::CreateSymlink | ( | const DataPointPath & | dp, |
| const DataPointPath & | link, | ||
| const CallbackType & | callback = nullptr ) |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::DataPointExists | ( | const DataPointPath & | path, |
| bool & | result, | ||
| const CallbackType & | callback = nullptr ) const |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::DeleteDataPoint | ( | const DataPointPath & | path, |
| const CallbackType & | callback = nullptr ) |
|
delete |
Querying children with an rvalue reference for the result is not allowed.
| void rtctk::componentFramework::RepositoryIf::BatchRequest::GetChildren | ( | const DataPointPath & | path, |
| std::pair< PathList, PathList > & | result, | ||
| bool | recurse = false, | ||
| const CallbackType & | callback = nullptr ) const |
Add request to query the child datapoints and paths for a given parent path.
This method will add an asynchronous request to the batch request to query all the available datapoints that are leaf nodes immediately below the given path and also the non-leaf child paths, i.e. sub-folders when interpreting the repository as a hierarchical folder like structure.
The set of datapoint and child paths is returned by filling the path lists in result. If recurse is false then only the immediate children are returned. Otherwise all datapoint and child sub-folder paths are returned recursively in result.
| [in] | path | The path in which to search for datapoints and child paths. |
| [out] | result | A std::pair of path lists. The first list in the pair will be filled with the datapoints found and the second list will be filled with the child paths found. If no datapoints are found then the list for datapoints will be empty. Similarly if not child paths are found then the child path list will be empty. |
| [in] | recurse | Optional flag indicating if paths should be queried recursively. |
| [in] | callback | Optional callback that will be invoked on completion of the request. |
| DataPointDoesNotExist | If the path does not exist in the repository. |
| ServiceFailure | When the underlying back-end system indicates an unexpected failure. |
|
delete |
Reading from a datapoint into an rvalue reference is not allowed.
| 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 |
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 path. The data will be read from the index first, i.e. the index of the first element, up to index 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 d_first. The output buffer is similarly interpreted as a continuous array for this purpose.
| [in] | path | The path of the datapoint to read. |
| [out] | buffer | The output buffer object that will be filled with the data read. |
| [in] | first | The index of the first element to read from the datapoint. |
| [in] | last | The index of the last element to read from the datapoint. |
| [in] | d_first | The index into the output buffer where the first data element should be written. |
| [out] | metadata | Optional metadata that will be filled with the datapoint's metadata. |
| [in] | callback | Optional callback that will be invoked on completion of the request. |
| 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. |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::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 |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::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 ) |
|
delete |
Writing to a datapoint from an rvalue reference is not allowed.
| 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 ) |
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 path. The data will be written from the index first, i.e. the index of the first element, up to index 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 d_first. The output buffer is similarly interpreted as a continuous array for this purpose.
| [in] | path | The path of the datapoint to write. |
| [in] | buffer | The input buffer object that will be filled with the data. |
| [in] | first | The index of the first element to write to the datapoint. |
| [in] | last | The index of the last element to write to the datapoint. |
| [in] | d_first | The index in the datapoint where the first data element should be written. |
| [in,out] | 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. |
| [in] | callback | Optional callback that will be invoked on completion of the request. |
| 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. |
|
delete |
Reading from a datapoint into an rvalue reference is not allowed.
| void rtctk::componentFramework::RepositoryIf::BatchRequest::ReadDataPoint | ( | const DataPointPath & | path, |
| T & | buffer, | ||
| std::optional< std::reference_wrapper< MetaData > > | metadata = std::nullopt, | ||
| const CallbackType & | callback = nullptr ) const |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::ReadDataPointImpl | ( | const DataPointPath & | path, |
| std::any & | buffer, | ||
| std::optional< std::reference_wrapper< MetaData > > | metadata, | ||
| const CallbackType & | callback ) const |
|
delete |
Reading metadata into an rvalue reference is not allowed.
| void rtctk::componentFramework::RepositoryIf::BatchRequest::ReadMetaData | ( | const DataPointPath & | path, |
| MetaData & | metadata, | ||
| const CallbackType & | callback = nullptr ) const |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::UpdateSymlink | ( | const DataPointPath & | dp, |
| const DataPointPath & | link, | ||
| const CallbackType & | callback = nullptr ) |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::WriteDataPoint | ( | const DataPointPath & | path, |
| const std::any & | buffer, | ||
| std::optional< std::reference_wrapper< MetaData > > | metadata, | ||
| const CallbackType & | callback ) |
|
delete |
Writing to a datapoint from an rvalue reference is not allowed.
| void rtctk::componentFramework::RepositoryIf::BatchRequest::WriteDataPoint | ( | const DataPointPath & | path, |
| const T & | buffer, | ||
| std::optional< std::reference_wrapper< MetaData > > | metadata = std::nullopt, | ||
| const CallbackType & | callback = nullptr ) |
Add request to write a datapoint.
This method will add an asynchronous request to the batch request to write a specific datapoint.
| [in] | path | The path of the datapoint. |
| [in] | buffer | The value to be written. |
| [in,out] | 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. |
| [in] | callback | Optional callback that will be invoked on completion of the request. |
| DataPointDoesNotExist | If the path does not exist in the repository. |
| ServiceFailure | When the underlying back-end system indicates an unexpected failure. |
| void rtctk::componentFramework::RepositoryIf::BatchRequest::WriteMetaData | ( | const DataPointPath & | path, |
| const MetaData & | metadata, | ||
| const CallbackType & | callback = nullptr ) |
|
mutableprotected |
|
protected |