Public Member Functions | Public Attributes | List of all members
gnss_info::DayIndex Struct Reference

Object that can be used as an index into a cache and assigns all times from the same day the same cache index. More...

#include <cache_index.h>

Public Member Functions

 DayIndex (const ros::Time &time)
 Create an index entry for the given time. More...
 
 DayIndex (uint16_t year, uint8_t month, uint8_t day)
 Directly create an index entry for the given day. More...
 
 operator ros::Time () const
 Convert the index to a representative ROS Time. More...
 
bool operator== (const DayIndex &other) const
 Compare with another index. More...
 

Public Attributes

uint8_t day
 Day (starting with 1). More...
 
uint8_t month
 Month (starting with 1). More...
 
uint16_t year
 Year. More...
 

Detailed Description

Object that can be used as an index into a cache and assigns all times from the same day the same cache index.

Definition at line 16 of file cache_index.h.

Constructor & Destructor Documentation

◆ DayIndex() [1/2]

gnss_info::DayIndex::DayIndex ( const ros::Time time)
explicit

Create an index entry for the given time.

Parameters
[in]timeThe time to create the index entry for.

Definition at line 13 of file cache_index.cpp.

◆ DayIndex() [2/2]

gnss_info::DayIndex::DayIndex ( uint16_t  year,
uint8_t  month,
uint8_t  day 
)

Directly create an index entry for the given day.

Parameters
[in]yearThe year to represent.
[in]monthThe month to represent (starting with 1).
[in]dayThe day to represent (starting with 1).

Definition at line 22 of file cache_index.cpp.

Member Function Documentation

◆ operator ros::Time()

gnss_info::DayIndex::operator ros::Time ( ) const
explicit

Convert the index to a representative ROS Time.

Definition at line 27 of file cache_index.cpp.

◆ operator==()

bool gnss_info::DayIndex::operator== ( const DayIndex other) const

Compare with another index.

Parameters
[in]otherThe other index to compare.
Returns
Whether this index represents the same day.

Definition at line 36 of file cache_index.cpp.

Member Data Documentation

◆ day

uint8_t gnss_info::DayIndex::day

Day (starting with 1).

Definition at line 20 of file cache_index.h.

◆ month

uint8_t gnss_info::DayIndex::month

Month (starting with 1).

Definition at line 19 of file cache_index.h.

◆ year

uint16_t gnss_info::DayIndex::year

Year.

Definition at line 18 of file cache_index.h.


The documentation for this struct was generated from the following files:


gnss_info
Author(s): Martin Pecka
autogenerated on Fri Nov 24 2023 03:50:35