RTC Toolkit
1.0.0
|
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... | |
PopulateConfig & | operator= (const PopulateConfig &)=delete |
This class cannot be copy assigned. More... | |
PopulateConfig (PopulateConfig &&)=default | |
Objects of this class can be moved. More... | |
PopulateConfig & | operator= (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... | |
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.
|
delete |
Do not allow construction with no arguments.
|
delete |
This class cannot be copy constructed.
|
default |
Objects of this class can be moved.
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.
[in] | source | The Persistent Configuration Repository that stores the Deployment Set information. |
[in] | target | The Runtime Configuration Repository that will be updated with the runtime configuration. |
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.
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.
[in] | source | The datapoint path in the Persistent Configuration Repository to copy from. |
[in] | target | The datapoint path in the Runtime Configuration Repository to copy to. |
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.
[in] | source | The datapoint path in the Persistent Configuration Repository to copy from. |
[in] | target | The datapoint path in the Runtime Configuration Repository to copy to. |
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.
true
if the flag was set and false
if it was not or the datapoint for the flag does not exist in the repository.
|
delete |
This class cannot be copy assigned.
|
default |
Objects of this class can be moved with the move assignment operator.