|
| | FileRepository ()=delete |
| |
| | FileRepository (const FileRepository &)=delete |
| |
| FileRepository & | operator= (const FileRepository &)=delete |
| |
| | FileRepository (FileRepository &&)=default |
| |
| FileRepository & | operator= (FileRepository &&)=default |
| |
| | FileRepository (const ::elt::mal::Uri &datauri, const int dirdepth) |
| |
| virtual | ~FileRepository () |
| |
| void | CreateDataPoint (const DataPointPath &path, const std::string &type) override |
| | Creates a new datapoint in the repository with a specified type. More...
|
| |
| void | DeleteDataPoint (const DataPointPath &path) override |
| | Deletes a datapoint. More...
|
| |
| std::string | GetDataPointType (const DataPointPath &path) const override |
| | Fetches the type of the datapoint. More...
|
| |
| size_t | GetDataPointSize (const DataPointPath &path) const override |
| | Fetches the size of the datapoint's data. More...
|
| |
| bool | DataPointExists (const DataPointPath &path) const override |
| | Checks for the existence of a datapoint in the repository. More...
|
| |
| std::pair< StringList, StringList > | GetChildren (const DataPointPath &path) const override |
| | Queries the datapoints and child paths for a given path. More...
|
| |
| Response | SendReadRequest (const Request &request) const override |
| | Sends a request to read data from the repository. More...
|
| |
| Response | SendWriteRequest (const Request &request) override |
| | Sends a request to write data to the repository. More...
|
| |
| size_t | get_fits_write_threshold () const |
| |
| void | set_fits_write_threshold (size_t value) |
| |
| virtual void | CreateDataPoint (const DataPointPath &path, const std::string &type)=0 |
| | Creates a new datapoint in the repository with a specified type. More...
|
| |
| virtual void | DeleteDataPoint (const DataPointPath &path)=0 |
| | Deletes a datapoint. More...
|
| |
| virtual std::string | GetDataPointType (const DataPointPath &path) const=0 |
| | Fetches the type of the datapoint. More...
|
| |
| virtual size_t | GetDataPointSize (const DataPointPath &path) const=0 |
| | Fetches the size of the datapoint's data. More...
|
| |
| virtual bool | DataPointExists (const DataPointPath &path) const=0 |
| | Checks for the existence of a datapoint in the repository. More...
|
| |
| virtual std::pair< StringList, StringList > | GetChildren (const DataPointPath &path) const=0 |
| | Queries the datapoints and child paths for a given path. More...
|
| |
| virtual | ~RepositoryIf () |
| |
| template<typename T > |
| void | CreateDataPointV2 (const DataPointPath &path) |
| | Creates a new datapoint in the repository. More...
|
| |
| template<typename T > |
| void | CreateDataPointV2 (const DataPointPath &path, const T default_value) |
| | Creates a new datapoint in the repository and sets a default value. More...
|
| |
| template<typename T > |
| T | GetDataPoint (const DataPointPath &path) const |
| | Fetches a datapoint from the repository. More...
|
| |
| template<typename T > |
| void | SetDataPoint (const DataPointPath &path, const T value) |
| | Sets a datapoint in the repository. More...
|
| |
| template<typename T > |
| void | ReadDataPoint (const DataPointPath &path, T &buffer) const |
| | Reads a datapoint from the repository. More...
|
| |
| template<typename T > |
| void | WriteDataPoint (const DataPointPath &path, const T &buffer) |
| | Writes a datapoint to the repository. More...
|
| |
| void | WriteDataPoint (const DataPointPath &path, const char *buffer) |
| |
| template<> |
| void | CreateDataPointV2 (const DataPointPath &path, const char *default_value) |
| |
| template<> |
| void | SetDataPoint (const DataPointPath &path, const char *value) |
| |
Queries the datapoints and child paths for a given path.
This method will query all the available datapoints that are leaf nodes immediately below the given path and also the child paths, i.e. sub-folders when interpreting the repository as a hierarchical folder like structure. The set of immediate datapoint and child paths is returned as two separate lists.
If an error occurs when querying the the repository a std::runtime_error is thrown.
- Parameters
-
| [in] | path | The path in which to search for datapoints and child paths. |
- Returns
- A
std::pair or string lists, i.e. std::vector<std::string>, with the first list in the pair containing the datapoints found and the second list containing the child paths found. If no datapoints are found then the list for datapoints is empty. Similarly if not child paths are found then the child path list is empty.
Implements rtctk::componentFramework::RepositoryIf.
Queries the datapoints and child paths for a given path.
This method will query all the available datapoints that are leaf nodes immediately below the given path and also the child paths, i.e. sub-folders when interpreting the repository as a hierarchical folder like structure. The set of immediate datapoint and child paths is returned as two separate lists.
If an error occurs when querying the the repository a std::runtime_error is thrown.
- Parameters
-
| [in] | path | The path in which to search for datapoints and child paths. |
- Returns
- A
std::pair or string lists, i.e. std::vector<std::string>, with the first list in the pair containing the datapoints found and the second list containing the child paths found. If no datapoints are found then the list for datapoints is empty. Similarly if not child paths are found then the child path list is empty.
| Response rtctk::componentFramework::FileRepository::SendReadRequest |
( |
const Request & |
request | ) |
const |
|
overridevirtual |
Sends a request to read data from the repository.
This method allows non-blocking and asynchronous reading of datapoints form the repository. The method returns immediately, allowing other work to be done in the calling thread while the read request is completed in the background. If any callback handlers were registered in request, they will be called as soon as the data is available for the respective datapoint.
- Note
- The buffers for the datapoints added to
request must not be accessed until the Wait method of the response object returns successfully, i.e. without a timeout.
If an error occurs then a std::runtime_error is thrown.
- Note
- This method is not transactional or fully atomic. If an error occurs while reading the datapoints, some or all of the datapoint buffers registered with the read request may be left unmodified. It is however guaranteed that any particular datapoint buffer is either updated completely or not modified at all.
- Parameters
-
| [in] | request | The request object that contains all the datapoints to read. |
- Returns
- A response object that must be used to synchronise with the completion of the read request.
Implements rtctk::componentFramework::RepositoryIf.
| Response rtctk::componentFramework::FileRepository::SendWriteRequest |
( |
const Request & |
request | ) |
|
|
overridevirtual |
Sends a request to write data to the repository.
This method allows non-blocking writing of datapoints to the repository. The method returns immediately, allowing other work to be done in the calling thread while the write request is completed in the background. If any callback handlers were registered in request, they will be called as soon as the respective datapoint's data has been sent and the buffer will no longer be accessed by the API, i.e. the caller can modify or release the buffer from that point on.
- Note
- The buffers for the datapoints added to
request must not be modified or released until the Wait method of the response object returns successfully, i.e. without a timeout.
If an error occurs then a std::runtime_error is thrown.
- Note
- This method is not transactional or fully atomic. If an error occurs while writing the datapoints, only some of the datapoints registered with the write request may be actually updated in the repository. It is however guaranteed that any particular datapoint is either updated completely in the repository or not at all.
- Parameters
-
| [in] | request | The request object that contains all the datapoints to write. |
- Returns
- A response object that must be used to synchronise with the completion of the write request.
Implements rtctk::componentFramework::RepositoryIf.