Class DomainExpertInterface
Defined in File DomainExpertInterface.hpp
Inheritance Relationships
Derived Types
public plansys2::DomainExpert
(Class DomainExpert)public plansys2::DomainExpertClient
(Class DomainExpertClient)
Class Documentation
-
class DomainExpertInterface
DomainExpertInterface is the interface for both DomainExpert and DomainExpertClient.
Subclassed by plansys2::DomainExpert, plansys2::DomainExpertClient
Public Functions
-
inline DomainExpertInterface()
Void constructor.
-
virtual std::string getName() = 0
Get the domain name.
- Returns:
A string containing the domain name.
-
virtual std::vector<std::string> getTypes() = 0
Get the types existing in the domain.
- Returns:
The vector containing the names of the types.
-
virtual std::vector<std::string> getConstants(const std::string &type) = 0
Get the details of a constants existing for a type.
- Parameters:
predicate – [in] The name of the type.
- Returns:
A list of constants names for the passed type
-
virtual std::vector<plansys2::Predicate> getPredicates() = 0
Get the predicates existing in the domain.
- Returns:
The vector containing the name of the predicates.
-
virtual std::optional<plansys2::Predicate> getPredicate(const std::string &predicate) = 0
Get the details of a predicate existing in the domain.
- Parameters:
predicate – [in] The name of the predicate.
- Returns:
A Predicate object containing the predicate name and its parameters (name and type). If the predicate does not exist, the value returned has not value.
-
virtual std::vector<plansys2::Function> getFunctions() = 0
Get the functions existing in the domain.
- Returns:
The vector containing the name of the functions.
-
virtual std::optional<plansys2::Function> getFunction(const std::string &function) = 0
Get the details of a function existing in the domain.
- Parameters:
function – [in] The name of the function.
- Returns:
A Function object containing the function name and its parameters (name and type). If the function does not exist, the value returned has not value.
-
virtual std::vector<plansys2::Predicate> getDerivedPredicates() = 0
Get the derived predicates existing in the domain.
- Returns:
The vector containing the derived predicates.
-
virtual std::vector<plansys2_msgs::msg::Derived> getDerivedPredicate(const std::string &predicate, const std::vector<std::string> ¶ms = {}) = 0
Get the details of a derived predicate existing in the domain.
- Parameters:
predicate – [in] The name of the predicate.
- Returns:
A Derived object containing the predicate name, its parameters (name and type), and preconditions. If the predicate does not exist, the value returned has not value.
-
virtual std::vector<std::string> getActions() = 0
Get the regular actions existing in the domain.
- Returns:
The vector containing the names of the actions.
-
virtual plansys2_msgs::msg::Action::SharedPtr getAction(const std::string &action, const std::vector<std::string> ¶ms) = 0
Get the details of an regular action existing in the domain.
- Parameters:
action – [in] The name of the action.
- Returns:
An Action object containing the action name, parameters, requirements and effects. If the action does not exist, the value returned has not value.
-
virtual std::vector<std::string> getDurativeActions() = 0
Get the temporal actions existing in the domain.
- Returns:
The vector containing the names of the actions.
-
virtual plansys2_msgs::msg::DurativeAction::SharedPtr getDurativeAction(const std::string &durative_action, const std::vector<std::string> ¶ms) = 0
Get the details of an durative action existing in the domain.
- Parameters:
action – [in] The name of the action.
- Returns:
A Durative Action object containing the action name, parameters, requirements and effects. If the action does not exist, the value returned has not value.
-
virtual std::string getDomain() = 0
Get the current domain, ready to be saved to file, or to initialize another domain.
- Returns:
A string containing the domain.
-
inline DomainExpertInterface()