|
RTC Toolkit
0.1.0-alpha
|
#include <mockRunTimeRepo.hpp>
Public Member Functions | |
| MockRuntimeRepo () | |
| virtual | ~MockRuntimeRepo () |
| 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... | |
| void | Subscribe (const Subscription &subscription) const override |
| void | Unsubscribe (const Subscription &subscription) const override |
| MOCK_CONST_METHOD2 (ReadVoid, void(const DataPointPath &path, void *)) | |
| MOCK_CONST_METHOD2 (ReadBool, void(const DataPointPath &path, bool *)) | |
| MOCK_CONST_METHOD2 (ReadInt, void(const DataPointPath &path, int32_t *)) | |
| MOCK_CONST_METHOD2 (ReadFloat, void(const DataPointPath &path, float *)) | |
| MOCK_CONST_METHOD2 (ReadDouble, void(const DataPointPath &path, double *)) | |
| MOCK_CONST_METHOD2 (ReadVectorFloat, void(const DataPointPath &path, std::vector< float > *)) | |
| MOCK_CONST_METHOD2 (ReadMatrixFloat, void(const DataPointPath &path, MatrixBuffer< float > *)) | |
| MOCK_CONST_METHOD2 (WriteVoid, void(const DataPointPath &path, void *)) | |
| MOCK_CONST_METHOD2 (WriteBool, void(const DataPointPath &path, bool)) | |
| MOCK_CONST_METHOD2 (WriteInt, void(const DataPointPath &path, int)) | |
| MOCK_CONST_METHOD2 (WriteFloat, void(const DataPointPath &path, float)) | |
| MOCK_CONST_METHOD2 (WriteDouble, void(const DataPointPath &path, double)) | |
| MOCK_CONST_METHOD2 (WriteVectorFloat, void(const DataPointPath &path, std::vector< float >)) | |
| MOCK_CONST_METHOD2 (WriteMatrixFloat, void(const DataPointPath &path, MatrixBuffer< float > &)) | |
| MockRuntimeRepo () | |
| virtual | ~MockRuntimeRepo () |
| 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... | |
| void | Subscribe (const Subscription &subscription) const override |
| void | Unsubscribe (const Subscription &subscription) const override |
| MOCK_CONST_METHOD2 (ReadVoid, void(const DataPointPath &path, void *)) | |
| MOCK_CONST_METHOD2 (ReadBool, void(const DataPointPath &path, bool *)) | |
| MOCK_CONST_METHOD2 (ReadInt, void(const DataPointPath &path, int32_t *)) | |
| MOCK_CONST_METHOD2 (ReadFloat, void(const DataPointPath &path, float *)) | |
| MOCK_CONST_METHOD2 (ReadDouble, void(const DataPointPath &path, double *)) | |
| MOCK_CONST_METHOD2 (ReadVectorFloat, void(const DataPointPath &path, std::vector< float > *)) | |
| MOCK_CONST_METHOD2 (ReadMatrixFloat, void(const DataPointPath &path, MatrixBuffer< float > *)) | |
| MOCK_CONST_METHOD2 (WriteVoid, void(const DataPointPath &path, void *)) | |
| MOCK_CONST_METHOD2 (WriteBool, void(const DataPointPath &path, bool)) | |
| MOCK_CONST_METHOD2 (WriteInt, void(const DataPointPath &path, int)) | |
| MOCK_CONST_METHOD2 (WriteFloat, void(const DataPointPath &path, float)) | |
| MOCK_CONST_METHOD2 (WriteDouble, void(const DataPointPath &path, double)) | |
| MOCK_CONST_METHOD2 (WriteVectorFloat, void(const DataPointPath &path, std::vector< float >)) | |
| MOCK_CONST_METHOD2 (WriteMatrixFloat, void(const DataPointPath &path, MatrixBuffer< float > &)) | |
Public Member Functions inherited from rtctk::componentFramework::RuntimeRepoApiIf | |
| virtual | ~RuntimeRepoApiIf () |
Public Member Functions inherited from rtctk::componentFramework::RepositoryIf | |
| 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) |
Additional Inherited Members | |
Public Types inherited from rtctk::componentFramework::RepositoryIf | |
| using | StringList = std::vector< std::string > |
|
inline |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
inlineoverridevirtual |
Creates a new datapoint in the repository with a specified type.
| [in] | path | The datapoint path that should be created. |
| [in] | type | A string indicating the type of the new datapoint. Valid values are indicated below. |
The following are the supported values for the type string:
Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Creates a new datapoint in the repository with a specified type.
| [in] | path | The datapoint path that should be created. |
| [in] | type | A string indicating the type of the new datapoint. Valid values are indicated below. |
The following are the supported values for the type string:
Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Checks for the existence of a datapoint in the repository.
| [in] | path | The datapoint path to check. |
true if the datapoint path exists in the repository and false otherwise. Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Checks for the existence of a datapoint in the repository.
| [in] | path | The datapoint path to check. |
true if the datapoint path exists in the repository and false otherwise. Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Deletes a datapoint.
| [in] | path | The path of the datapoint to delete in the repository. |
Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Deletes a datapoint.
| [in] | path | The path of the datapoint to delete in the repository. |
Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
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.
| [in] | path | The path in which to search for datapoints and child paths. |
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.
|
inlineoverridevirtual |
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.
| [in] | path | The path in which to search for datapoints and child paths. |
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.
|
inlineoverridevirtual |
Fetches the size of the datapoint's data.
This method will return one of the following values depending on the category of the datapoint's type:
1 for scalars such as RtcBool, RtcInt32, RtcInt64, RtcFloat, and RtcDouble. Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Fetches the size of the datapoint's data.
This method will return one of the following values depending on the category of the datapoint's type:
1 for scalars such as RtcBool, RtcInt32, RtcInt64, RtcFloat, and RtcDouble. Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Fetches the type of the datapoint.
This will return the type used when the datapoint was created with the CreateDataPoint method. If the CreateDataPointV2 method was used instead then this returns the type string that was inferred by that method.
Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Fetches the type of the datapoint.
This will return the type used when the datapoint was created with the CreateDataPoint method. If the CreateDataPointV2 method was used instead then this returns the type string that was inferred by that method.
Implements rtctk::componentFramework::RepositoryIf.
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadBool | , |
| void(const DataPointPath &path, bool *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadBool | , |
| void(const DataPointPath &path, bool *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadDouble | , |
| void(const DataPointPath &path, double *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadDouble | , |
| void(const DataPointPath &path, double *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadFloat | , |
| void(const DataPointPath &path, float *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadFloat | , |
| void(const DataPointPath &path, float *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadInt | , |
| void(const DataPointPath &path, int32_t *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadInt | , |
| void(const DataPointPath &path, int32_t *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadMatrixFloat | , |
| void(const DataPointPath &path, MatrixBuffer< float > *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadMatrixFloat | , |
| void(const DataPointPath &path, MatrixBuffer< float > *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadVectorFloat | , |
| void(const DataPointPath &path, std::vector< float > *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadVectorFloat | , |
| void(const DataPointPath &path, std::vector< float > *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadVoid | , |
| void(const DataPointPath &path, void *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | ReadVoid | , |
| void(const DataPointPath &path, void *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteBool | , |
| void(const DataPointPath &path, bool) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteBool | , |
| void(const DataPointPath &path, bool) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteDouble | , |
| void(const DataPointPath &path, double) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteDouble | , |
| void(const DataPointPath &path, double) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteFloat | , |
| void(const DataPointPath &path, float) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteFloat | , |
| void(const DataPointPath &path, float) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteInt | , |
| void(const DataPointPath &path, int) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteInt | , |
| void(const DataPointPath &path, int) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteMatrixFloat | , |
| void(const DataPointPath &path, MatrixBuffer< float > &) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteMatrixFloat | , |
| void(const DataPointPath &path, MatrixBuffer< float > &) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteVectorFloat | , |
| void(const DataPointPath &path, std::vector< float >) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteVectorFloat | , |
| void(const DataPointPath &path, std::vector< float >) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteVoid | , |
| void(const DataPointPath &path, void *) | |||
| ) |
| MockRuntimeRepo::MOCK_CONST_METHOD2 | ( | WriteVoid | , |
| void(const DataPointPath &path, void *) | |||
| ) |
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.
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.
| [in] | request | The request object that contains all the datapoints to read. |
Implements rtctk::componentFramework::RepositoryIf.
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.
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.
| [in] | request | The request object that contains all the datapoints to read. |
Implements rtctk::componentFramework::RepositoryIf.
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.
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.
| [in] | request | The request object that contains all the datapoints to write. |
Implements rtctk::componentFramework::RepositoryIf.
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.
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.
| [in] | request | The request object that contains all the datapoints to write. |
Implements rtctk::componentFramework::RepositoryIf.
|
inlineoverridevirtual |
Implements rtctk::componentFramework::RuntimeRepoApiIf.
|
inlineoverridevirtual |
Implements rtctk::componentFramework::RuntimeRepoApiIf.
|
inlineoverridevirtual |
Implements rtctk::componentFramework::RuntimeRepoApiIf.
|
inlineoverridevirtual |
Implements rtctk::componentFramework::RuntimeRepoApiIf.