Class ModeInference
Defined in File mode_inference.hpp
Class Documentation
-
class ModeInference
Reads and parses the sytem modes and hierarchy file (SMH file) and provides getters to access the resulting model. Provides setters to inform inference about the live system state (update current state and mode targets as well as current parametization).
Public Functions
-
explicit ModeInference(const std::string &model_path)
-
virtual const std::vector<std::string> get_all_parts() const
-
virtual const std::vector<std::string> get_nodes() const
-
virtual const std::vector<std::string> get_systems() const
-
virtual const std::vector<std::string> get_all_parts_of(const std::string &system) const
-
virtual void update(const std::string&, const StateAndMode&)
-
virtual void update_state(const std::string&, unsigned int)
-
virtual void update_mode(const std::string&, const std::string&)
-
virtual void update_param(const std::string&, rclcpp::Parameter&)
-
virtual void update_target(const std::string&, StateAndMode)
-
virtual StateAndMode get(const std::string &part) const
-
virtual StateAndMode get_or_infer(const std::string &part)
-
virtual StateAndMode infer(const std::string &part)
-
virtual StateAndMode infer_node(const std::string &part)
-
virtual StateAndMode infer_system(const std::string &part)
-
virtual Deviation infer_transitions()
Infers latest transitions of systems
Returns map of last inferred transitions of systems into new states or new modes. State transitions of nodes don’t have to be inferred, as nodes publish their state transitions. For nodes, we only need to infer mode transitions.
-
virtual Deviation get_deviation()
Infers deviations of the target system state (state and mode of systems and nodes) and their respective actual state.
-
virtual StateAndMode get_target(const std::string &part) const
-
virtual ModeConstPtr get_mode(const std::string &part, const std::string &mode) const
-
virtual std::vector<std::string> get_available_modes(const std::string &part) const
-
virtual ~ModeInference() = default
Protected Functions
-
virtual bool matching_parameters(const rclcpp::Parameter&, const rclcpp::Parameter&) const
-
virtual void read_modes_from_model(const std::string &model_path)
-
virtual void add_param_to_mode(ModeBasePtr, const rclcpp::Parameter&)
-
explicit ModeInference(const std::string &model_path)