Configuration of rules for the MagAO-X stateRuleEngine. More...
Go to the source code of this file.
Classes | |
struct | indiRuleMaps |
Structure to provide management of the rule and property maps. More... | |
struct | ruleRuleKeys |
Functions | |
void | extractRuleProp (pcf::IndiProperty **prop, std::string &element, indiRuleMaps &maps, const std::string §ion, const std::string &propkey, const std::string &elkey, const pcf::IndiProperty::Type &type, mx::app::appConfigurator &config) |
Extract a property from a rule configuration. More... | |
void | loadRuleConfig (indiRuleMaps &maps, std::map< std::string, ruleRuleKeys > &rrkMap, mx::app::appConfigurator &config) |
Load the rule and properties maps for a rule engine from a configuration file. More... | |
void | finalizeRuleValRules (indiRuleMaps &maps, std::map< std::string, ruleRuleKeys > &rrkMap) |
Finalize ruleVal rules. More... | |
Configuration of rules for the MagAO-X stateRuleEngine.
Definition in file indiCompRuleConfig.hpp.
struct ruleRuleKeys |
Definition at line 47 of file indiCompRuleConfig.hpp.
Class Members | ||
---|---|---|
string | rule1 | |
string | rule2 |
void extractRuleProp | ( | pcf::IndiProperty ** | prop, |
std::string & | element, | ||
indiRuleMaps & | maps, | ||
const std::string & | section, | ||
const std::string & | propkey, | ||
const std::string & | elkey, | ||
const pcf::IndiProperty::Type & | type, | ||
mx::app::appConfigurator & | config | ||
) |
Extract a property from a rule configuration.
Reads the property and element, adding the property to the property map if necessary.
mx::err::invalidconfig | if the property is already in the map but of a different type |
[out] | prop | pointer to the property, newly created or existing, which is in the map. |
[out] | element | the element name from the configuration |
[in] | maps | contains the property map to which the property is added |
[in] | section | name of the section for this rule |
[in] | propkey | the key for the property name |
[in] | elkey | the key for the element name |
[in] | type | the type of the property |
[in] | config | the application configuration structure |
Definition at line 58 of file indiCompRuleConfig.hpp.
Referenced by loadRuleConfig().
void finalizeRuleValRules | ( | indiRuleMaps & | maps, |
std::map< std::string, ruleRuleKeys > & | rrkMap | ||
) |
Finalize ruleVal rules.
///
check for insertion failure ///
add a constructor that has priority, message, and comparison, to reduce duplication
maps | [in/out] contains the rule and property maps with rules ot finalize | |
[out] | rrkMap | Holds the ruleVal rule keys aside for later post-processing |
Definition at line 326 of file indiCompRuleConfig.hpp.
Referenced by MagAOX::app::stateRuleEngine::loadConfigImpl().
void loadRuleConfig | ( | indiRuleMaps & | maps, |
std::map< std::string, ruleRuleKeys > & | rrkMap, | ||
mx::app::appConfigurator & | config | ||
) |
Load the rule and properties maps for a rule engine from a configuration file.
///
check for insertion failure ///
add a constructor that has priority, message, and comparison, to reduce duplication
[out] | maps | contains the rule and property maps in which to place the items found in config |
[out] | rrkMap | Holds the ruleVal rule keys aside for later post-processing |
[in] | config | the application configuration structure |
Definition at line 98 of file indiCompRuleConfig.hpp.
Referenced by MagAOX::app::stateRuleEngine::loadConfigImpl().