SpeedLimitRule Class Reference

Rule describing speed limits. More...

#include <automotive/maliput/api/rules/speed_limit_rule.h>

Public Types

enum  Severity { kStrict = 0, kAdvisory }
 Severity classification. More...
using Id = TypeSpecificIdentifier< class SpeedLimitRule >

Public Member Functions

 SpeedLimitRule (const Id &id, const LaneSRange &zone, Severity severity, double min, double max)
 Constructs a SpeedLimitRule. More...
Id id () const
 Returns the persistent identifier. More...
const LaneSRangezone () const
 Returns the zone to which this rule instance applies. More...
Severity severity () const
 Returns the severity of this rule instance. More...
double min () const
 Returns the minimum limit. More...
double max () const
 Returns the maximum limit. More...
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 SpeedLimitRule (const SpeedLimitRule &)=default
SpeedLimitRuleoperator= (const SpeedLimitRule &)=default
 SpeedLimitRule (SpeedLimitRule &&)=default
SpeedLimitRuleoperator= (SpeedLimitRule &&)=default

Detailed Description

Rule describing speed limits.

Each rule instance describes speed limits applied to a longitudinal portion of a Lane (which may be the entire length of the Lane). Each instance is tagged with a severity; multiple instances with different severities may apply to the same region of the road network.

Each instance mandates a maximum speed limit as well as a minimum speed limit. Since neither limit may be less than zero, a minimum limit of exactly zero is equivalent to having no minimum limit at all.

Member Typedef Documentation

Member Enumeration Documentation

enum Severity

Severity classification.


A strict limit is the established mandatory limit.


An advisory limit is a recommendation, typically reflecting a road condition (e.g., a sharp curve).

Constructor & Destructor Documentation

SpeedLimitRule ( const SpeedLimitRule )
SpeedLimitRule ( SpeedLimitRule &&  )
SpeedLimitRule ( const Id id,
const LaneSRange zone,
Severity  severity,
double  min,
double  max 

Constructs a SpeedLimitRule.

idthe unique ID of this rule (in the RoadRulebook)
zoneLaneSRange to which this rule applies
severitySeverity of the rule
minminimum speed
maxmaximum speed

min and max must be non-negative, and min must be less than or equal to max, otherwise a runtime_error is thrown.

Member Function Documentation

Id id ( ) const

Returns the persistent identifier.

Here is the caller graph for this function:

double max ( ) const

Returns the maximum limit.

Here is the caller graph for this function:

double min ( ) const

Returns the minimum limit.

Here is the caller graph for this function:

SpeedLimitRule& operator= ( SpeedLimitRule &&  )
SpeedLimitRule& operator= ( const SpeedLimitRule )
Severity severity ( ) const

Returns the severity of this rule instance.

Here is the caller graph for this function:

const LaneSRange& zone ( ) const

Returns the zone to which this rule instance applies.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: