13#ifndef RTCTK_COMPONENTFRAMEWORK_POPULATECONFIG_HPP
14#define RTCTK_COMPONENTFRAMEWORK_POPULATECONFIG_HPP
91 const std::string& explanation =
"");
241 const std::map<std::string, std::string>& requested_modes);
322 bool allow_non_dynamic_mode_options =
false);
385 void SetActiveModes(
const std::map<std::string, std::string>& active_modes);
387 void CopyDefaults(
const DataPointPath& active_deployment_path);
390 void ComputeParameterMappings();
394 log4cplus::Logger& m_logger;
403 struct IoFunctionMapEntry {
404 using CopyFunction = std::function<void(
407 using WriteBackFunction = std::function<void(
410 CopyFunction m_copy_function;
411 WriteBackFunction m_writeback_function;
414 std::map<DataPointPath, DataPointPath> m_psr_to_rtr_map;
415 std::map<DataPointPath, DataPointPath> m_rtr_to_psr_map;
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:77
Base interface for all Persistent Configuration Repository adapters.
Definition persistentRepoIf.hpp:25
RtctkException() noexcept
Definition exceptions.cpp:113
InvalidConfigException(const std::vector< std::string > &errors)
Constructs the exception indicating the configuration is not valid.
Definition populateConfig.cpp:459
InvalidDataPointException(const DataPointPath &path, const std::string &explanation="")
Constructs the exception indicating an invalid datapoint.
Definition populateConfig.cpp:465
RepositoryServiceException(const std::string &repository)
Constructs the exception indicating a problem occurred when accessing the named repository.
Definition populateConfig.cpp:452
void CopyHierarchy(const DataPointPath &source, const DataPointPath &target)
Copy a hierarchy of datapoints from the source to the target repository.
Definition populateConfig.cpp:793
PopulateConfig(const PopulateConfig &)=delete
This class cannot be copy constructed.
PopulateConfig()=delete
Do not allow construction with no arguments.
std::multimap< std::string, std::string > GetAvailableModes() const
Returns available modes for the active deployment set.
Definition populateConfig.cpp:595
void PopulateRuntimeRepo(StopToken stop_token, const std::map< std::string, std::string > &requested_modes)
Populates the Runtime Configuration Repository.
Definition populateConfig.cpp:533
void WriteBack(StopToken stop, const std::vector< DataPointPath > &datapoints)
Performs the a writeback operation.
Definition populateConfig.cpp:911
void ValidateWriteBack(const std::vector< DataPointPath > &datapoints)
Performs additional input validation for the WriteBack method.
Definition populateConfig.cpp:891
PopulateConfig & operator=(PopulateConfig &&)=default
Objects of this class can be moved with the move assignment operator.
void ValidatePersistentRepository() const
Perform various validation tests on the Persistent Configuration Repository.
Definition populateConfig.cpp:476
PopulateConfig(PopulateConfig &&)=default
Objects of this class can be moved.
void ClearConfig()
Wipes the contents of the Runtime Configuration Repository.
Definition populateConfig.cpp:508
PopulateConfig & operator=(const PopulateConfig &)=delete
This class cannot be copy assigned.
void CopyRequestedModes(const std::map< std::string, std::string > &requested_modes, bool allow_non_dynamic_mode_options=false)
Apply requested modes by copying datapoints from source to target repository.
Definition populateConfig.cpp:692
std::map< std::string, std::string > GetActiveModes()
Returns active modes for the active deployment set.
Definition populateConfig.cpp:630
bool IsDisableValidateFlagSet(const std::string &rtc_supervisor)
Checks if the disable_validate flag has been set for the RTC Supervisor.
Definition populateConfig.cpp:565
std::map< std::string, std::string > GetDefaultModes() const
Returns default modes for the active deployment set.
Definition populateConfig.cpp:615
bool IsDisablePopulateFlagSet(const std::string &rtc_supervisor)
Checks if the disable_populate flag has been set for the RTC Supervisor.
Definition populateConfig.cpp:549
void CopyActiveDeploymentSet()
Copies the active Deployment Set to the Runtime Configuration Repository.
Definition populateConfig.cpp:581
void ValidateRequestedModes(const std::map< std::string, std::string > &requested_modes) const
Performs input validation for requested_modes.
Definition populateConfig.cpp:665
void PrePopulateConfig(const std::string &active_deployment_set)
Performs a minimal, partial population of the Runtime Configuration Repository.
Definition populateConfig.cpp:527
void CopyDataPoint(const DataPointPath &source, const DataPointPath &target)
Copy a single datapoint from the source to the target repository.
Definition populateConfig.cpp:805
RtctkException() noexcept
Definition exceptions.cpp:113
Base interface for all Runtime Configuration Repository adapters.
Definition runtimeRepoIf.hpp:27
Logging Support Library based on log4cplus.
Definition commandReplier.cpp:22
rad::StopToken StopToken
Definition stopToken.hpp:20
PopulateConfig::InvalidDataPointException InvalidDataPointException
Definition populateConfig.cpp:34
PopulateConfig::RepositoryServiceException RepositoryServiceException
Definition populateConfig.cpp:32
PopulateConfig::InvalidConfigException InvalidConfigException
Definition populateConfig.cpp:33
Header file for PersistentRepoIf, which defines the API for PersistentRepoAdapter.
Header file for RuntimeRepoIf, which defines the API for RuntimeRepoAdapters.