Class Query::Spacetime¶
Defined in File Query.hpp
Nested Relationships¶
This class is a nested type of Class Query.
Nested Types¶
Class Documentation¶
-
class
rmf_traffic::schedule::Query
::
Spacetime
A class to describe spacetime filters for a schedule Query.
Public Types
-
enum
Mode
This enumerator determines what Spacetime mode the query will be in.
Values:
-
enumerator
Invalid
Invalid mode, behavior is undefined.
-
enumerator
All
Request trajectories throughout all of space and time. This will still be constrained by the version field.
-
enumerator
Regions
Request trajectories in specific regions spacetime regions.
-
enumerator
Timespan
Request trajectories that are active in a specified timespan.
-
enumerator
-
using
Space
= geometry::Space
Public Functions
-
Spacetime
() Default constructor, uses All mode.
-
Spacetime
(std::vector<Region> regions) Regions mode constructor.
- Parameters
[in] regions
: The regions to use
-
Spacetime
(std::vector<std::string> maps) Timespan mode constructor.
This will query all trajectories across all time for the specified maps.
- Parameters
[in] maps
: The maps to query from
-
Spacetime
(std::vector<std::string> maps, Time lower_bound) Timespan mode constructor.
This will query all trajectories that have at least one waypoint active after the lower bound on the specified maps.
- Parameters
[in] maps
: The maps to query from[in] lower_bound
: The lower bound on time
-
Spacetime
(std::vector<std::string> maps, Time lower_bound, Time upper_bound) Timespan mode constructor.
This will query all trajectories that have at least one waypoint active after the lower bound and before the upper bound on the specified maps.
- Parameters
[in] maps
: The maps to query from[in] lower_bound
: The lower bound on time[in] upper_bound
: The upper bound on time
-
Regions &
query_regions
(std::vector<Region> regions = {}) Set the mode of this Spacetime to query for specific Regions.
- Parameters
[in] regions
: Specify the regions of Spacetime to use.
-
Regions *
regions
() Get the Regions of Spacetime to use for this Query. If this Spacetime is not in Regions mode, then this will return a nullptr.
-
Timespan &
query_timespan
(std::vector<std::string> maps, Time lower_bound, Time upper_bound) Query a timespan between two bounds for a set of maps.
-
Timespan &
query_timespan
(std::vector<std::string> maps, Time lower_bound) Query from a lower bound in time for a set of maps.
-
Timespan &
query_timespan
(std::vector<std::string> maps) Query for all trajectories on a set of maps.
-
Timespan &
query_timespan
(bool query_all_maps = true) Switch to timespan mode, and specify whether or not to use all maps.
-
Timespan *
timespan
() Get the Timespan of Spacetime to use for this Query. If this Spacetime is not in Timespan mode, then this will return a nullptr.
-
const Timespan *
timespan
() const const-qualified timespan()
-
class
All
This is a placeholder class in case we ever want to extend the features of the
All
mode.
-
class
Regions
A container class for rmf_traffic::Region instances. Using Regions mode will query for Trajectories that intersect the specified regions.
Public Types
-
using
iterator
= base_iterator<Region, IterImpl, Regions>
-
using
const_iterator
= base_iterator<const Region, IterImpl, Regions>
Public Functions
-
void
pop_back
() Remove the last Region that was added to this container.
-
iterator
begin
() Get the beginning iterator of this container.
-
const_iterator
begin
() const const-qualified begin()
-
const_iterator
cbegin
() const Explicitly const-qualified alternative to begin()
-
iterator
end
() Get the one-past-the-end iterator of this container.
-
const_iterator
end
() const const-qualified end()
-
const_iterator
cend
() const Explicitly const-qualified alternative to end()
-
using
-
class
Timespan
A class for specifying a timespan.
Public Functions
-
const std::unordered_set<std::string> &
maps
() const Get the maps that will be queried.
-
Timespan &
add_map
(std::string map_name) Add a map to the query.
-
Timespan &
remove_map
(const std::string &map_name) Remove a map from the query.
-
Timespan &
clear_maps
() Remove all maps from the query.
-
bool
all_maps
() const Returns true if all maps should be queried. If true, the set of maps mentioned above will be ignored.
-
Timespan &
all_maps
(bool query_all_maps) Set whether all maps should be queried. When true, the set of maps above will be ignored. When false, only the maps in the set above will be included in the query.
-
const Time *
get_lower_time_bound
() const Get the lower bound for the time range.
If there is no lower bound for the time range, then this returns a nullptr.
-
Timespan &
remove_lower_time_bound
() Remove the lower bound for the time range.
-
const Time *
get_upper_time_bound
() const Get the upper bound for the time range.
If there is no upper bound for the time range, then this returns a nullptr.
-
Timespan &
remove_upper_time_bound
() Remove the upper bound for the time range.
-
const std::unordered_set<std::string> &
-
enum