RTC Toolkit  1.0.0
Functions
operations.cpp File Reference

Implementation of configTool Operations. More...

#include <cstddef>
#include <exception>
#include <iostream>
#include <optional>
#include <string>
#include <typeindex>
#include <typeinfo>
#include <utility>
#include <boost/core/demangle.hpp>
#include <boost/optional.hpp>
#include <boost/program_options.hpp>
#include <ciiConfigApi.hpp>
#include <ciiOldbUtil.hpp>
#include <meta/mdOldb.hpp>
#include <meta/mdOldbBinary.hpp>
#include <meta/mdOldbMatrix.hpp>
#include <../../../componentFramework/services/common/src/fitsIoFunctions.hpp>
#include <operations.hpp>
#include <rtctk/componentFramework/dataPointPath.hpp>
#include <rtctk/componentFramework/exceptions.hpp>
#include <rtctk/componentFramework/matrixBuffer.hpp>
#include <rtctk/componentFramework/persistentRepoIf.hpp>
#include <rtctk/componentFramework/runtimeRepoIf.hpp>
#include <rtctk/componentFramework/serviceDiscovery.hpp>
#include <rtctk/rtcSupervisor/populateConfig.hpp>

Functions

template<class T >
void print_vector (std::vector< T > vec, bool endline=true)
 
template<class T >
void print_matrix (MatrixBuffer< T > mat)
 
int GetData (std::unique_ptr< RepositoryIf > &&rtr, const DataPointPath &path)
 
int Delete (std::unique_ptr< RepositoryIf > &&rtr, const DataPointPath &path)
 
int DoList (std::unique_ptr< RepositoryIf > &&rtr, const DataPointPath &path)
 
int SetData (std::unique_ptr< RepositoryIf > &&rtr, const DataPointPath &path, std::string type, std::string value)
 
int DoRead (std::unique_ptr< RepositoryIf > &&rtr, const DataPointPath &path, const std::string &file)
 
int DoWrite (std::unique_ptr< RepositoryIf > &&rtr, const DataPointPath &path, std::string type, const std::string &file)
 
int GetDataWithServiceDiscovery (const elt::mal::Uri &endpoint, const DataPointPath &component_name, const DataPointPath &attribute)
 
std::unique_ptr< RepositoryIfGetRepository (std::string repo)
 
int GetType (std::unique_ptr< RepositoryIf > &&rtr, const DataPointPath &path)
 
int DoPopulate (const std::string &persistent_repo, const std::string &runtime_repo)
 
int DoInitMetadata ()
 Initialises the type metadata in the CII configuration service for the OLDB and Runtime Configuration Repository. More...
 

Detailed Description

Implementation of configTool Operations.

Function Documentation

◆ Delete()

int Delete ( std::unique_ptr< RepositoryIf > &&  rtr,
const DataPointPath path 
)

◆ DoInitMetadata()

int DoInitMetadata ( )

Initialises the type metadata in the CII configuration service for the OLDB and Runtime Configuration Repository.

Metadata related to various data types needs to be initialised in the CII configuration service before the RuntimeRepoAdapter or OldbAdapter can be used with the standard types supported by the RTC Toolkit. This function will initialise the needed metadata if it is missing. If the metadata for the types already exists then this function will reset it to the default initial values.

Returns
EXIT_SUCCESS if the metadata was successfully updated and EXIT_FAILURE if an error occurred. In case of error, an appropriate message is printed to standard output.

◆ DoList()

int DoList ( std::unique_ptr< RepositoryIf > &&  rtr,
const DataPointPath path 
)

◆ DoPopulate()

int DoPopulate ( const std::string &  persistent_repo,
const std::string &  runtime_repo 
)

◆ DoRead()

int DoRead ( std::unique_ptr< RepositoryIf > &&  rtr,
const DataPointPath path,
const std::string &  file 
)

◆ DoWrite()

int DoWrite ( std::unique_ptr< RepositoryIf > &&  rtr,
const DataPointPath path,
std::string  type,
const std::string &  file 
)

◆ GetData()

int GetData ( std::unique_ptr< RepositoryIf > &&  rtr,
const DataPointPath path 
)

◆ GetDataWithServiceDiscovery()

int GetDataWithServiceDiscovery ( const elt::mal::Uri &  endpoint,
const DataPointPath component_name,
const DataPointPath attribute 
)

◆ GetRepository()

std::unique_ptr<RepositoryIf> GetRepository ( std::string  repo)

◆ GetType()

int GetType ( std::unique_ptr< RepositoryIf > &&  rtr,
const DataPointPath path 
)

◆ print_matrix()

template<class T >
void print_matrix ( MatrixBuffer< T >  mat)

◆ print_vector()

template<class T >
void print_vector ( std::vector< T >  vec,
bool  endline = true 
)

◆ SetData()

int SetData ( std::unique_ptr< RepositoryIf > &&  rtr,
const DataPointPath path,
std::string  type,
std::string  value 
)