RTC Toolkit  1.0.0
Public Member Functions | Static Public Member Functions | List of all members
rtctk::componentFramework::OldbIf Class Reference

#include <oldbIf.hpp>

Inheritance diagram for rtctk::componentFramework::OldbIf:
rtctk::componentFramework::RepositoryIf rtctk::componentFramework::RepositorySubscriberIf rtctk::componentFramework::FileOldbAdapter rtctk::componentFramework::OldbAdapter rtctk::componentFramework::RuntimeRepoAdapter

Public Member Functions

virtual ~OldbIf ()=default
 
- Public Member Functions inherited from rtctk::componentFramework::RepositoryIf
virtual ~RepositoryIf ()
 
virtual void CreateDataPoint (const DataPointPath &path, const std::type_info &type)=0
 Creates a new datapoint in the repository with a specified type. More...
 
template<typename T >
void CreateDataPoint (const DataPointPath &path)
 Creates a new datapoint in the repository. More...
 
template<typename T >
void CreateDataPoint (const DataPointPath &path, const T default_value)
 Creates a new datapoint in the repository and sets a default value. More...
 
virtual void DeleteDataPoint (const DataPointPath &path)=0
 Deletes a datapoint. More...
 
virtual const std::type_info & 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, StringListGetChildren (const DataPointPath &path) const =0
 Queries the datapoints and child paths for a given path. More...
 
template<typename 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)
 
virtual Response SendReadRequest (const Request &request) const =0
 Sends a request to read data from the repository. More...
 
virtual Response SendWriteRequest (const Request &request)=0
 Sends a request to write data to the repository. More...
 
template<>
void CreateDataPoint (const DataPointPath &path, const char *default_value)
 
template<>
void SetDataPoint (const DataPointPath &path, const char *value)
 
- Public Member Functions inherited from rtctk::componentFramework::RepositorySubscriberIf
virtual ~RepositorySubscriberIf ()
 
virtual RepositoryIf::Response SendSubscribeRequest (const SubscribeRequest &request) const =0
 This is called to asynchronously send a subscription request for datapoints. More...
 
virtual RepositoryIf::Response SendUnsubscribeRequest (const UnsubscribeRequest &request) const =0
 This is called to asynchronously send a request to unsubscribe from various notifications. More...
 
template<typename T , typename F >
void Subscribe (const DataPointPath &path, T &buffer, F handler) const
 A convenience template function that will register a callback to receive new datapoint values in a synchronous manner. More...
 
void Unsubscribe (const DataPointPath &path) const
 A simple convenience function that will deregister all callbacks for receiving new datapoint values. More...
 

Static Public Member Functions

static std::unique_ptr< OldbIfCreateAdapter (const elt::mal::Uri &uri)
 Factory method used to create the appropriate OLDB adapter depending on the URI scheme. More...
 

Additional Inherited Members

- Public Types inherited from rtctk::componentFramework::RepositoryIf
using StringList = std::vector< std::string >
 

Constructor & Destructor Documentation

◆ ~OldbIf()

virtual rtctk::componentFramework::OldbIf::~OldbIf ( )
virtualdefault

Member Function Documentation

◆ CreateAdapter()

std::unique_ptr< OldbIf > rtctk::componentFramework::OldbIf::CreateAdapter ( const elt::mal::Uri &  uri)
static

Factory method used to create the appropriate OLDB adapter depending on the URI scheme.

The URI schemes supported by the factory method include the following:

  • cii.oldb - Will create an instance of OldbAdapter to access the real OLDB.
  • file - Will create an instance of FileOldbAdapter to access a simple file based repository suitable for testing.
Parameters
[in]uriThe URI of the repository that needs to be accessed.
Returns
A unique pointer to the newly created adapter object. The caller must clean the object up once it is no longer needed.

The documentation for this class was generated from the following files: