RTC Toolkit  1.0.0
Public Types | Public Member Functions | List of all members
rtctk::rtcSupervisor::PopulateConfig Class Reference

A utility class used to populate the Runtime Configuration Repository. More...

#include <populateConfig.hpp>

Public Types

using DataPointPath = componentFramework::DataPointPath
 
using PersistentRepoIf = componentFramework::PersistentRepoIf
 
using RuntimeRepoIf = componentFramework::RuntimeRepoIf
 

Public Member Functions

 PopulateConfig ()=delete
 Do not allow construction with no arguments. More...
 
 PopulateConfig (const PopulateConfig &)=delete
 This class cannot be copy constructed. More...
 
PopulateConfigoperator= (const PopulateConfig &)=delete
 This class cannot be copy assigned. More...
 
 PopulateConfig (PopulateConfig &&)=default
 Objects of this class can be moved. More...
 
PopulateConfigoperator= (PopulateConfig &&)=default
 Objects of this class can be moved with the move assignment operator. More...
 
 PopulateConfig (const PersistentRepoIf &source, RuntimeRepoIf &target)
 Constructs the utility class with references to the repositories that should be used. More...
 
bool IsDisablePopulateFlagSet ()
 Checks if the disable_populate_runtime_repo flag has been set. More...
 
void CopyActiveDeploymentSet ()
 Copies the active Deployment Set to the Runtime Configuration Repository. More...
 
void CopyHierarchy (const DataPointPath &source, const DataPointPath &target)
 Copy a hierarchy of datapoints from the source to the target repository. More...
 
void CopyDataPoint (const DataPointPath &source, const DataPointPath &target)
 Copy a single datapoint from the source to the target repository. More...
 

Detailed Description

A utility class used to populate the Runtime Configuration Repository.

This implements relevant logic to interpret the persistent configuration information stored in the Persistent Configuration Repository and copy only the datapoints relevant for the runtime configuration to the target Runtime Configuration Repository.

Todo:
Currently the logic trivially copies all datapoints on a 1-to-1 basis to the target repository and no logic for interpreting Deployment Sets is actually implemented. This will be changed in future versions of the RTC Toolkit.
Thread Safety
thread-compatible – The copy methods require synchronisation.

Member Typedef Documentation

◆ DataPointPath

◆ PersistentRepoIf

◆ RuntimeRepoIf

Constructor & Destructor Documentation

◆ PopulateConfig() [1/4]

rtctk::rtcSupervisor::PopulateConfig::PopulateConfig ( )
delete

Do not allow construction with no arguments.

◆ PopulateConfig() [2/4]

rtctk::rtcSupervisor::PopulateConfig::PopulateConfig ( const PopulateConfig )
delete

This class cannot be copy constructed.

◆ PopulateConfig() [3/4]

rtctk::rtcSupervisor::PopulateConfig::PopulateConfig ( PopulateConfig &&  )
default

Objects of this class can be moved.

◆ PopulateConfig() [4/4]

rtctk::rtcSupervisor::PopulateConfig::PopulateConfig ( const PersistentRepoIf source,
RuntimeRepoIf target 
)

Constructs the utility class with references to the repositories that should be used.

The source and target repository must be specified. The source repository must be the Persistent Configuration Repository from which Deployment Set data will be read. The target repository must be the Runtime Configuration Repository to which the relevant runtime configuration datapoints will be copied.

Parameters
[in]sourceThe Persistent Configuration Repository that stores the Deployment Set information.
[in]targetThe Runtime Configuration Repository that will be updated with the runtime configuration.

Member Function Documentation

◆ CopyActiveDeploymentSet()

void rtctk::rtcSupervisor::PopulateConfig::CopyActiveDeploymentSet ( )

Copies the active Deployment Set to the Runtime Configuration Repository.

This will populate the target Runtime Configuration Repository set in the constructor, by performing a 1-to-1 copy of all the datapoints in the Persistent Configuration Repository, which is the source repository set in the constructor.

Note
Deployment Sets are not yet properly handled.
Thread Safety
thread-hostile❗ – Due to multiple requests to the underlying repositories.
Exception Safety
basic

◆ CopyDataPoint()

void rtctk::rtcSupervisor::PopulateConfig::CopyDataPoint ( const DataPointPath source,
const DataPointPath target 
)

Copy a single datapoint from the source to the target repository.

Copies a datapoint indicated by the source path from the source Persistent Configuration Repository, as set in the constructor, to the target path and target Runtime Configuration Repository.

Parameters
[in]sourceThe datapoint path in the Persistent Configuration Repository to copy from.
[in]targetThe datapoint path in the Runtime Configuration Repository to copy to.
Thread Safety
thread-hostile❗ – Due to multiple requests to the underlying repositories.
Exception Safety
basic

◆ CopyHierarchy()

void rtctk::rtcSupervisor::PopulateConfig::CopyHierarchy ( const DataPointPath source,
const DataPointPath target 
)

Copy a hierarchy of datapoints from the source to the target repository.

Copies an entire hierarchy of datapoints indicated by the source path from the source Persistent Configuration Repository, as set in the constructor, to the target path and target Runtime Configuration Repository.

Parameters
[in]sourceThe datapoint path in the Persistent Configuration Repository to copy from.
[in]targetThe datapoint path in the Runtime Configuration Repository to copy to.
Thread Safety
thread-hostile❗ – Due to multiple requests to the underlying repositories.
Exception Safety
basic

◆ IsDisablePopulateFlagSet()

bool rtctk::rtcSupervisor::PopulateConfig::IsDisablePopulateFlagSet ( )

Checks if the disable_populate_runtime_repo flag has been set.

The disable_populate_runtime_repo flag indicates if automated populating of the Runtime Configuration Repository should be suppressed by the RTC Supervisor.

This logic is part of PopulateConfig, since this class is responsible for identifying the configuration entries in the Persistent Configuration Repository for the active Deployment Set. Knowing the exact location of this flag for the active Deployment Set therefore requires similar logic.

Returns
true if the flag was set and false if it was not or the datapoint for the flag does not exist in the repository.
Thread Safety
thread-safe
Exception Safety
strong

◆ operator=() [1/2]

PopulateConfig& rtctk::rtcSupervisor::PopulateConfig::operator= ( const PopulateConfig )
delete

This class cannot be copy assigned.

◆ operator=() [2/2]

PopulateConfig& rtctk::rtcSupervisor::PopulateConfig::operator= ( PopulateConfig &&  )
default

Objects of this class can be moved with the move assignment operator.


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