This is a utility class that allows querying timestamps on a 1D grid.
More...
#include <steady_time_grid.hpp>
|
| | SteadyTimeGrid ()=default |
| | Allow empty initialization. More...
|
| |
| | SteadyTimeGrid (const std::chrono::system_clock::time_point &measurement_timestamp, const std::chrono::system_clock::duration &interval_between_timestamps) |
| | Constructs a new instance from the time the event has occurred (measurement was received) and its timestamp. More...
|
| |
| std::chrono::system_clock::time_point | get_next_timestamp_after (const std::chrono::system_clock::time_point ¤t_timestamp) const noexcept |
| | Get the next timestamp on the grid given a query one. More...
|
| |
| bool | is_initialized () const noexcept |
| | Determine if initialized with a non-zero timestamp. More...
|
| |
This is a utility class that allows querying timestamps on a 1D grid.
It is initialized with a start timestamp and an interval between consecutive timestamps and allows to query the next timestamp on the grid for any given query timestamp.
◆ SteadyTimeGrid() [1/2]
| autoware::prediction::SteadyTimeGrid::SteadyTimeGrid |
( |
| ) |
|
|
default |
Allow empty initialization.
◆ SteadyTimeGrid() [2/2]
| autoware::prediction::SteadyTimeGrid::SteadyTimeGrid |
( |
const std::chrono::system_clock::time_point & |
measurement_timestamp, |
|
|
const std::chrono::system_clock::duration & |
interval_between_timestamps |
|
) |
| |
|
inline |
Constructs a new instance from the time the event has occurred (measurement was received) and its timestamp.
- Parameters
-
| [in] | measurement_timestamp | The timestamp of the message. |
| [in] | interval_between_timestamps | Time interval between consecutive timestamps. |
◆ get_next_timestamp_after()
| std::chrono::system_clock::time_point autoware::prediction::SteadyTimeGrid::get_next_timestamp_after |
( |
const std::chrono::system_clock::time_point & |
current_timestamp | ) |
const |
|
inlinenoexcept |
Get the next timestamp on the grid given a query one.
- Parameters
-
| [in] | current_timestamp | The query timestamp. |
- Returns
- The next timestamp on the 1D grid.
◆ is_initialized()
| bool autoware::prediction::SteadyTimeGrid::is_initialized |
( |
| ) |
const |
|
inlinenoexcept |
Determine if initialized with a non-zero timestamp.
- Returns
- True if initialized, False otherwise.
The documentation for this class was generated from the following file: