Autoware.Auto
autoware::common::state_estimation::SteadyTimeGrid Class Reference

This is a utility class that allows querying timestamps on a 1D grid. More...

#include <steady_time_grid.hpp>

Public Member Functions

 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 &current_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SteadyTimeGrid() [1/2]

autoware::common::state_estimation::SteadyTimeGrid::SteadyTimeGrid ( )
default

Allow empty initialization.

◆ SteadyTimeGrid() [2/2]

autoware::common::state_estimation::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_timestampThe timestamp of the message.
[in]interval_between_timestampsTime interval between consecutive timestamps.

Member Function Documentation

◆ get_next_timestamp_after()

std::chrono::system_clock::time_point autoware::common::state_estimation::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_timestampThe query timestamp.
Returns
The next timestamp on the 1D grid.

◆ is_initialized()

bool autoware::common::state_estimation::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: