|
maliput
|
Describes a numeric range based rule.
Ranges are closed and continuous, defined by a minimum and maximum quantity. When only one extreme is formally defined, the other should take a semantically correct value. For example, if a speed limit only specifies a maximum value, the minimum value is typically zero.
#include <include/maliput/api/rules/range_value_rule.h>
Classes | |
| struct | Range |
| Defines a range for a RangeValueRule. More... | |
Public Member Functions | |
| MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN (RangeValueRule) | |
| RangeValueRule (const Rule::Id &id, const Rule::TypeId &type_id, const LaneSRoute &zone, const std::vector< Range > &ranges) | |
| Constructs a range based Rule. More... | |
| const std::vector< Range > & | states () const |
Public Member Functions inherited from Rule | |
| MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN (Rule) | |
| Rule (const Id &id, const TypeId &type_id, const LaneSRoute &zone) | |
| Constructs a Rule. More... | |
| virtual | ~Rule ()=default |
| const Id & | id () const |
| const TypeId & | type_id () const |
| const LaneSRoute & | zone () const |
Additional Inherited Members | |
Public Types inherited from Rule | |
| using | Id = TypeSpecificIdentifier< class Rule > |
| Alias for the Rule's unique ID across all Rule types. More... | |
| using | TypeId = TypeSpecificIdentifier< class Type > |
| Alias for the Rule's type. More... | |
| using | RelatedRules = std::map< std::string, std::vector< Id > > |
| Alias of a map holding groups of related rules. More... | |
| using | RelatedUniqueIds = std::map< std::string, std::vector< UniqueId > > |
| Alias of a map holding groups of related unique ids. More... | |
Protected Member Functions inherited from Rule | |
| void | ValidateRelatedRules (const RelatedRules &related_rules) const |
| void | ValidateRelatedUniqueIds (const RelatedUniqueIds &related_unique_ids) const |
| void | ValidateSeverity (int severity) const |
| RangeValueRule | ( | const Rule::Id & | id, |
| const Rule::TypeId & | type_id, | ||
| const LaneSRoute & | zone, | ||
| const std::vector< Range > & | ranges | ||
| ) |
Constructs a range based Rule.
| id | The Rule ID. |
| type_id | The Rule Type ID. |
| zone | LaneSRoute to which this rule applies. |
| ranges | A vector of possible ranges that this rule could enforce. The actual range that's enforced at any given time is determined by a RangeValueRuleStateProvider. This vector must have at least one Range, and each Range must respect that its min <= max and be unique. |
| maliput::common::rulebook_error | When ranges is empty. |
| maliput::common::rulebook_error | When any Range within ranges violates min <= max condition. |
| maliput::common::rulebook_error | When there are duplicated Range in ranges. |
| MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN | ( | RangeValueRule | ) |
| const std::vector<Range>& states | ( | ) | const |